Hard Light Productions Forums
Hosted Projects - Standalone => Wing Commander Saga => Topic started by: Bobboau on November 24, 2004, 12:13:32 am
-
I was just looking in your pimpage thread, and I see the shots of your hangers, and it gave me the inititive to code in some submodel detail code. the idea being you make a hanger submodel and it only renderes when you are inside of it, therefore the hanger submodel can be rediculusly over detailed (like 100,000 polys... eh maybe) I also coded in some controle on how it determines when to render the subobject
to activate it, copy and paste this
$detail_box: 1
into the submodel properties feild, the parser for this is realy _realy_ strict (i.e. poorly designed, there must be exactly one space after the colin for example)
(a negitive one should render an object only when you are _not_ inside it's bounding box)
there is also some untested code for added controle over the rendering box, might be fun if it works.
$box_min: min_x ,min_y , min_z
$box_max: max_x ,max_y , max_z
that would be, relitive to the center of the object, how far in x y and z you can go before it stops rendering.
I'm going to look into that nontargetable flag you wanted also, but that deals with with the subsystem code and the targeting code as well as the submodel code (the subsystem code is insane, I've had little experience with the targeting code)
http://freespace.volitionwatch.com/blackwater/fs2_open_r_hang.zip
-
this sounds very promising. In fact this is the way hangar was loded by origin sys. :)
-
good glad you like it :)
-
alright, I'm updateng the zip, I think I have gotten non-targetable submodel code working, but the way the targeting code is set up is nutty, every targeting option has it's own code path, and I may have put my code in the wrong place or missed some way of targeting something (the old 'J' bug that allowed you to target the Shivan fighters in the first mission were they showed up in FS1 is a good example of this) so test it, it worked in the quicky test I ran.
to activate, simply type
$nontargetable
into the subobject properties feild of any submodel you want to not be targetable.
the file will probly be uploaded by the time anyone reads this
-
Hey cool stuff...hope it works well then we could make some real nice stuff....just a question...what is shown when you use these code and are outside the renderingrange? Does it show the "normal" detail we have in their now?
Cause it way origin made it you got some odd looking effects, cause they closed the hangars with just a texture...and that textures was allways the same from every angle.
-
if you are out of the render range it will simply not be rendered, you can set up a seperate low detail model to be rendered in it's place, or several diferent models of varying complexity and have detail reagons along the way out from the hanger, or you could just make a bunch of detail added on top of geometry that is part of the ship's hull geometry (this and a combination of the one before it would probly be the best idea)
think of it as haveing a trigger regon for rendering or not rendering geometry.
-
Ok that sounds good...now we need somehting to test it.
Starman haven't you started a new hangar allready? Maybe you could try it with that.
-
there's actualy a lot of other things this could be used for, like adding super detaild bits into a model, if you've looked at my HTL deimos, the engine tubeing on the back would be an exelent place to use this sort of code. I have intentions of makeing a seperate submodel detail code (for hveing arrays of anteni and stuff) later but for big things (like stuff you might want to blow up or have animated) this would probly work better.
-
Dude, that's cool.
-
Man, this sounds awesome, this will be my best christmas-present :D Thanks for your efforts bobboau ;)
I'm not really sure I understand everything, gotta read it a few times.
Are now both versions active, meaning the "$detail_box: 1" and the "$nontargetable" ?
I will try the second one asap, but I'm currently not really sure how to do the detailed hangar-thing.
As for your question Lars, in the "hangar-project"-topic is the picture of the original hangar I build It had a rather low polycount, but wouldn't be so bad after Lynx laid his hands on.
I'm much interested in the subsystem thing, but I'm curious to see how the other thing is developing. :) Together with Goober5000's change for the fighterbay-selection we will be one big step forward.
I will update a hangar right now for testing ;)
-
Farking 'ell. You should post this in the news or SCP forum Bob, I could do with using this sort of thing.
-
both things are in this, they are totaly independent of each other so you can use one or the other or both or neither.
the detail box will by default use the subobjects bounding box as a render triger, you can specify your own box if you want useing the $box_min: and $box_max: thingys.
also I did all this from a fresh copy of the code, so I should be able to comit code for the first time in months.
-
Hm, when I use a table-entry with a modified model, the game
won't even start anymore and chrashes right instantly.
Flags used are :
fs2_open_r_hang.exe -glow -jpgtga -ambient_factor 100
The subsystem looks like this :
(Name : fighter01a)
$special=subsystem
$nontargetable
Table-Entry :
$Subsystem: fighter01a, 2, 0.0
I didn't specified a name, since it isn't targetable anyway.
Anything wrong ?
-
If it works, at least it will give us an excuse to owerwork some of our models again. It's almost like an addiction...the model is finished and some time later you think, "hey I actually don't like that and that, and that could be better...":D
-
try giveing it a name anyway, the test pof I have has a name specified, so it's posable there might be some dependency (though I doubt it). also make sure it works without the tag.
-
OK, I have given them names too in the needed syntax.
Game starts now, but Mission-loading fails. Older builds work though, and the new subsystems work there as they should too.
If Tolwyn's agrees, I can provide you model and maps for testing purpose.
(correction) Mission loading works, CTD comes when you enter the mission-area
-
hmmm,
/*waits for the model*/
wouldn't be the first time I got a model from you guys, so I think I'm not a security risk, but I understand protocol.
-
I do agree :) What are you waiting for, Starman? :D
-
Well, I should have his email-adress, so I can send a email with an attachment. :)
Or how about giving him internal access anyway? This would be much more convinient (and we must not discuss these things in puplic), then I could simply post a link for him.
What do you think, Admiral ? ;)
-
upload it, and PM me the link
(I have to go to work in about half an hour so I'm probly not going to get much done today, but I'll probly get it during the weekend)
-
good idea indeed, I will make sure he will be granted access in a few hours :)
-
@Bobboau : Check you PM ! :)
-
Now hw just has to cite the confederation service oth and he's in.:p
-
well I got the file and the it works fine,
it's realy an odd state when you are disapointed that you didn't get a crash, maybe there is something in the mission (but I wouldn't think so given that you said it only crashed in the new build)
though I did need to make a few changes to the table (changed the turrets to subachs) and there were like 3 textures missing (I'm guessing there generaic textures shared by many diferent ships)
-
Originally posted by Bobboau
it's realy an odd state when you are disapointed that you didn't get a crash,
Did I say that ? Maybe I wrote something wrong, that's possible. :)
I have a special misson for testing new ships (lot's of scripted and
player controlled events), maybe that's the problem. I have noticed that sometimes earlier, you could be right.
I will test it in a new mission. BTW, You said that you did use the
newest cvs, right ? I'm asking this, because Kazan made an important bugfix in the autopilot-code, but iif it is included in your build that case I can use now your build instead (if it works for me).
(edit) New Mission, no crash now. :) But it is not working either, I can still target fighter01a and fighter02a. Did I make something wrong, or must I use a special flag
-
what are you doing to target the fighters? there are a bunch of diferent ways to target subsystems and each of them is handeled seperately.
-
I'm switching through them using the "s" key, since it is a normal subsystem.
Haven't tried the other ones to be honest. What's left ?
"v" for target the subsystem under the crosshair,
"k" for turrets
are there more keys?
-
there's two or three others I think, I think I've got this bug to show up while testing something else
-
Originally posted by Lynx
Now hw just has to cite the confederation service oth and he's in.:p
the way I see it he should have access by now :D
-
I do :)
future things of this nature will be posted there
in fact I think I'm going to move this in there now