Hard Light Productions Forums

Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: Spoon on April 13, 2012, 11:23:54 am

Title: Turret arm positioning broke
Post by: Spoon on April 13, 2012, 11:23:54 am
With recent builds, its not quite working as it used to:
(http://img841.imageshack.us/img841/3742/screen0153.png)
It still looks fine in pcs2 and this doesn't appear to happen in RC5. So something got changed/borked semi recently?
Title: Re: Turret arm positioning broke
Post by: zookeeper on April 13, 2012, 01:26:55 pm
Umm, what's the problem precisely? I can't really tell from the picture.
Title: Re: Turret arm positioning broke
Post by: Spoon on April 13, 2012, 02:24:52 pm
I figured that the majority of HLP would have at least touched WoD at some point in their lifes by now...

(http://img69.imageshack.us/img69/3165/screen0154.png)
This is what it should look like.
Title: Re: Turret arm positioning broke
Post by: Thaeris on April 13, 2012, 02:38:58 pm
The problem in visualizing this in general is visualizing this in general. Floaty translucent crystalline ships might be better observed in wireframe mode...

:nervous:
Title: Re: Turret arm positioning broke
Post by: General Battuta on April 13, 2012, 02:43:26 pm
The giant crystal ball should be floating above the turret base, instead it's stuck inside it.
Title: Re: Turret arm positioning broke
Post by: assasing123 on April 13, 2012, 02:45:39 pm
uh... whats WoD? :( i have been here for years and never seem taht before...
Title: Re: Turret arm positioning broke
Post by: General Battuta on April 13, 2012, 02:57:40 pm
uh... whats WoD? :( i have been here for years and never seem taht before...

Play Wings of Dawn, in terms of pure technical accomplishment and creativity it is easily the best campaign ever made.
Title: Re: Turret arm positioning broke
Post by: zookeeper on April 13, 2012, 03:52:01 pm
I've played WoD but that doesn't translate into me immediately seeing what's wrong from a picture like that. Anyway, it looks like the arm (likely!) gets drawn at 0,0,0 + arm's offset, rather than 0,0,0 + turret's offset + arm's offset. I dunno how it could do that though, without all other multiparts or other chained submodels getting similarly drawn wrong. Can you narrow down when it broke at all? Trunk, or .14? Sure it's on a standard build and not for instance Swifty's submodel rendering thingy build?
Title: Re: Turret arm positioning broke
Post by: Spoon on April 13, 2012, 05:14:48 pm
I can't narrow it down unforunately because nightlys have been disabled for like... forever.
It happens on all three builds that I have here, I think the oldest of these is a test build for weapon flyby sounds that Valathil coded. Alas I have no idea which revision or trunk version or whatever that is. So it could be somewhere inbetween that and whatever RC5 is at.
Title: Re: Turret arm positioning broke
Post by: headdie on April 13, 2012, 05:38:13 pm
uh... whats WoD? :( i have been here for years and never seem taht before...

Play Wings of Dawn, in terms of pure technical accomplishment and creativity it is easily the best campaign ever made.

translation, it is the only near total conversion to be done by a single person
Title: Re: Turret arm positioning broke
Post by: Spoon on April 13, 2012, 06:44:34 pm
Talking with the ever wise Swifty on IRC, we discovered that:
Quote
[01:34] <Swifty> valathil's fix for transparencies screwed up rotations and offsets if they're any deeper past detail0
[01:34] <Swifty> and transparent
And this turret just so happens to fit those conditions, being transparent and all that.
Title: Re: Turret arm positioning broke
Post by: Swifty on April 13, 2012, 06:50:04 pm
This is a result of the transparency fix that was done by Valathil a few months back. When the transparency code is saving submodels to render last, the code is only saving the submodel's matrix relative to it's parent while not even saving model offsets. That's fine for any transparency submodels that are direct children of the main detail model and don't have an offset other than (0, 0, 0). Any transparent models that go deeper than one past detail0 and positioned elsewhere on the model will look incorrect.
Title: Re: Turret arm positioning broke
Post by: zookeeper on April 14, 2012, 03:19:14 am
Right, transparency. So that's why no other chained submodels are affected. Makes sense. :yes:
Title: Re: Turret arm positioning broke
Post by: Valathil on May 01, 2012, 08:01:56 am
I was really sure i handled that in my code but ill take a look at it.
Title: Re: Turret arm positioning broke
Post by: Legate Damar on May 01, 2012, 09:19:49 am
Just say they redesigned the Adasya  :P
Title: Re: Turret arm positioning broke
Post by: Valathil on May 04, 2012, 04:27:09 pm
Fix is in trunk. Its now possible to have transparent submodels on an arbitrary depth in the submodel tree.
Title: Re: Turret arm positioning broke
Post by: Spoon on May 05, 2012, 10:10:43 am
Fix'd, good job  :yes: