Hard Light Productions Forums

Modding, Mission Design, and Coding => FS2 Open Tools => Topic started by: FUBAR-BDHR on October 10, 2010, 12:43:47 am

Title: Adding missing subobject properties
Post by: FUBAR-BDHR on October 10, 2010, 12:43:47 am
I've noticed that not all the available properties appear in the drop down box under properties.  Could they be added?  Some are new ($lod0_name=) but some have been there for ages. 
Title: Re: Adding missing subobject properties
Post by: Spicious on October 14, 2010, 01:48:26 am
If you post a list of missing properties, I can add them. I won't be rebuilding the windows executable for probably at least a week though.
Title: Re: Adding missing subobject properties
Post by: FUBAR-BDHR on October 14, 2010, 03:57:24 am
I went through the code and this is everything I found.  I know some are already there but it was easier to list them all.

$name=<string>                        Subsystem name
$fov=x                         Turret field of view default 180
$crewspot=<string>                        Not used
$rotate=x                        rotation speed
$pbank=<bank>                        use with $rotate for weapon controlled rotation
$stepped                        use with $rotate for stepped rotation
$steps=x                        use with $stepped number of steps default 8
$t_paused=x                        use with $stepped pause time default 2.0
$t_transit=x                        use with $stepped transition time default 2.0
$fraction_accel=x                        use with $stepped fraction of time spent in accel default 0.3
$triggered:                        animation code key
$dumb_rotate:                        no idea only comment is "Iyojj skybox 4" default 0.0
$special=subsystem                        defines subobject as subsystem
$special=no_rotate                        marks submodel which should not rotate
$no_collisions                        causes subobject and all under it not to have collision detection
$nocollide_this_only                        cause only this subobject not to have collision detection
$collide_invisible                        subobject should collide even if invisible
$gun_rotation:                        for animated weapon models
$lod0_name=<string>                        name to use for LOD0 for adding LODs to old models
$detail_box:                        defines this subobject as a detail box
$box_min:x,y,z                        $detail box minimum coordinates
$box_max:x,y,z                        $detail box maximum coordinates
$uvec:x,y,z                        turret orientation up vector (normal)
$fvec:x,y,z                        turret orientation front vector
Title: Re: Adding missing subobject properties
Post by: Bobboau on October 25, 2010, 03:03:27 am
it would be nice if uvec and fvec were actually produced on the fly when the POF was saved, and the submodel given an orientation matrix.

dumb_rotate is a different way of implementing rotation, where the angle of rotation is a function of time, this causes the rotation to show up in all circumstances, not just when attached to a subsystem on a ship, so for instance you can get rotation subobjects in skyboxes, or missiles.
Title: Re: Adding missing subobject properties
Post by: Spicious on October 25, 2010, 03:28:34 am
it would be nice if uvec and fvec were actually produced on the fly when the POF was saved, and the submodel given an orientation matrix.
I'm tempted to try this. It's more or less what I'm planning for the Collada importer/exporter.
Title: Re: Adding missing subobject properties
Post by: headdie on October 25, 2010, 05:32:42 am
it would be nice if uvec and fvec were actually produced on the fly when the POF was saved, and the submodel given an orientation matrix.
I'm tempted to try this. It's more or less what I'm planning for the Collada importer/exporter.

yay working multiparts on non vertical axis :D
Title: Re: Adding missing subobject properties
Post by: pecenipicek on October 25, 2010, 11:38:07 am
it would be nice if uvec and fvec were actually produced on the fly when the POF was saved, and the submodel given an orientation matrix.
I'm tempted to try this. It's more or less what I'm planning for the Collada importer/exporter.

yay working multiparts on non vertical axis :D
they work now too, its just a pain to figure out the uvec and fvec if you didnt do it a million times before.
Title: Re: Adding missing subobject properties
Post by: headdie on October 25, 2010, 11:43:57 am
it would be nice if uvec and fvec were actually produced on the fly when the POF was saved, and the submodel given an orientation matrix.
I'm tempted to try this. It's more or less what I'm planning for the Collada importer/exporter.

yay working multiparts on non vertical axis :D
they work now too, its just a pain to figure out the uvec and fvec if you didnt do it a million times before.

that's what I meant lol  :nod:
Title: Re: Adding missing subobject properties
Post by: Spicious on October 25, 2010, 07:45:48 pm
The subobject properties suggestions should match the list of available properties now.

Feel free to provide sample models for uvec/fvec importing. Create a helper called vec where the forward and up directions point in the fvec and uvec directions, respectively.
Title: Re: Adding missing subobject properties
Post by: FUBAR-BDHR on October 25, 2010, 08:17:56 pm
You need to remember that some axis info is flipped int he fvec/uvec stuff.  For instance yesterday I was just fixing some on the TBP Hyperion.  Turret faced forward and the normal was 1:0:0 but the while you would think that would be uvec:1,0,0 and fvec 0,0,1 you would be wrong.  the uvec was -1,0,0. 
Title: Re: Adding missing subobject properties
Post by: Spicious on November 02, 2010, 11:42:02 pm
That would be pcs2 flipping the x-coordinates of everything. I'm still not sure why that's done.
I'm planning the same sort of idea for rotations: add a rotate helper pointing in the axis of rotation and you'll get rotation around the closest standard axis.
Any objections/suggestions?
Title: Re: Adding missing subobject properties
Post by: FUBAR-BDHR on November 03, 2010, 12:05:05 am
Actually it's not PCS2 flipping x axis but half the SCP code expecting flipped axis and the other half not. 

BTW I take back what I said about the PCS2 interface being screwed up.  It seems to be fixed in the latest.  That hold shift to zoom crap was awful. 
Title: Re: Adding missing subobject properties
Post by: Spicious on November 03, 2010, 08:22:46 pm
PCS2 is definitely flipping the x-axis.

uvec, fvec and rotate should export and import to/from Collada now. I haven't tested it beyond a simple example so axis flipping may occur.
Title: Re: Adding missing subobject properties
Post by: FUBAR-BDHR on November 03, 2010, 10:31:40 pm
I wasn't talking about PCS2 to collada flipping the axis I was talking about PCS2 to pof and the code axis info.  Some things like the uvec/fvec are specified in the code flipped as others take the info just like it is in PCS2.  Tabled thrusters are another one (although not part of PCS2) they are opposite PCS2 thruster info. 

I haven't tested but is rotate still getting set on turrets?  It's not supposed to but did in some versions.  Turrets should never have rotation or axis defined.  While the code doesn't ***** about it like it does with other rotating subobjects it can't be good.
Title: Re: Adding missing subobject properties
Post by: Spicious on November 03, 2010, 11:23:12 pm
Rotations are no longer being set on turrets on import now.
Title: Re: Adding missing subobject properties
Post by: FUBAR-BDHR on November 03, 2010, 11:31:29 pm
Yea I should have checked email from mantis before I posted that. 
Title: Re: Adding missing subobject properties
Post by: Spicious on November 04, 2010, 02:39:38 am
I guess this is a "known issue:" exporting with rotations or uvec/fvec tends to leave behind blank lines in the subobject properties.
Title: Re: Adding missing subobject properties
Post by: Spicious on November 07, 2010, 07:57:49 pm
fvec and uvec x-coordinates should be correct now. A few other things have been fixed/added too.