Hard Light Productions Forums

Hosted Projects - Standalone => Wing Commander Saga => Topic started by: Bobboau on November 24, 2004, 12:13:32 am

Title: hey WCS guys, got a new toy for you
Post 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
Title: hey WCS guys, got a new toy for you
Post by: Tolwyn on November 24, 2004, 07:12:42 am
this sounds very promising. In fact this is the way hangar was loded by origin sys. :)
Title: hey WCS guys, got a new toy for you
Post by: Bobboau on November 24, 2004, 07:39:41 am
good glad you like it :)
Title: hey WCS guys, got a new toy for you
Post by: Bobboau on November 24, 2004, 08:52:18 am
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
Title: hey WCS guys, got a new toy for you
Post by: gevatter Lars on November 24, 2004, 10:25:47 am
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.
Title: hey WCS guys, got a new toy for you
Post by: Bobboau on November 24, 2004, 10:34:11 am
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.
Title: hey WCS guys, got a new toy for you
Post by: gevatter Lars on November 24, 2004, 10:40:09 am
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.
Title: hey WCS guys, got a new toy for you
Post by: Bobboau on November 24, 2004, 11:03:26 am
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.
Title: hey WCS guys, got a new toy for you
Post by: Lynx on November 24, 2004, 12:45:59 pm
Dude, that's cool.
Title: hey WCS guys, got a new toy for you
Post by: Starman01 on November 24, 2004, 01:31:45 pm
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 ;)
Title: hey WCS guys, got a new toy for you
Post by: aldo_14 on November 24, 2004, 06:44:50 pm
Farking 'ell.  You should post this in the news or SCP forum Bob, I could do with using this sort of thing.
Title: hey WCS guys, got a new toy for you
Post by: Bobboau on November 24, 2004, 06:47:06 pm
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.
Title: hey WCS guys, got a new toy for you
Post by: Starman01 on November 25, 2004, 12:53:15 pm
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 ?
Title: hey WCS guys, got a new toy for you
Post by: Lynx on November 25, 2004, 01:32:59 pm
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
Title: hey WCS guys, got a new toy for you
Post by: Bobboau on November 25, 2004, 02:00:17 pm
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.
Title: hey WCS guys, got a new toy for you
Post by: Starman01 on November 25, 2004, 03:04:19 pm
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
Title: hey WCS guys, got a new toy for you
Post by: Bobboau on November 25, 2004, 08:47:57 pm
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.
Title: hey WCS guys, got a new toy for you
Post by: Tolwyn on November 26, 2004, 02:06:02 am
I do agree :) What are you waiting for, Starman? :D
Title: hey WCS guys, got a new toy for you
Post by: Starman01 on November 26, 2004, 10:19:35 am
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 ? ;)
Title: hey WCS guys, got a new toy for you
Post by: Bobboau on November 26, 2004, 10:27:50 am
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)
Title: hey WCS guys, got a new toy for you
Post by: Tolwyn on November 26, 2004, 12:55:10 pm
good idea indeed, I will make sure he will be granted access in a few hours :)
Title: hey WCS guys, got a new toy for you
Post by: Starman01 on November 26, 2004, 01:45:19 pm
@Bobboau : Check you PM !  :)
Title: hey WCS guys, got a new toy for you
Post by: Lynx on November 26, 2004, 02:14:21 pm
Now hw just has to cite the confederation service oth and he's in.:p
Title: hey WCS guys, got a new toy for you
Post by: Bobboau on November 26, 2004, 08:56:42 pm
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)
Title: hey WCS guys, got a new toy for you
Post by: Starman01 on November 27, 2004, 07:57:08 am
Quote
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
Title: hey WCS guys, got a new toy for you
Post by: Bobboau on November 27, 2004, 02:06:41 pm
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.
Title: hey WCS guys, got a new toy for you
Post by: Starman01 on November 27, 2004, 04:48:17 pm
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?
Title: hey WCS guys, got a new toy for you
Post by: Bobboau on November 27, 2004, 10:31:23 pm
there's two or three others I think, I think I've got this bug to show up while testing something else
Title: hey WCS guys, got a new toy for you
Post by: Tolwyn on November 28, 2004, 10:38:55 am
Quote
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
Title: hey WCS guys, got a new toy for you
Post by: Bobboau on November 28, 2004, 01:19:40 pm
I do :)
future things of this nature will be posted there

in fact I think I'm going to move this in there now