FS2004 Tweaked mdl with inverted normals & rotated

Horst18519

Moderator
Staff member
Resource contributor
#1
I tried to tweak an object using MDL Tweaker (hour of day var (389)), but the result is a mdl that is rotated by 90° and has inverted normals, in FSX as well as when I open it in MCX. Is there some bug or limitation in MDL Tweaker II that leads to this kind of result?
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
#2
Which tool did you use to make the mdl? Mdl tweaker was designed for Gmax made file and other tools sometimes give a different structure to the mdl file.
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
#4
Ok, I think the modelconverterx structure is indeed different, so that will be the problem.

Since I don't develop mdl tweaker anymore the best option is to tweak your mdl manually.
 

Horst18519

Moderator
Staff member
Resource contributor
#5
That (kind of) works. I can tweak it using time of day or day of year (38Ah), but I want to use a more complex tweak that uses hour of day (389h) or zulu time minute (363h).
Using an IFIN1 tweak with day of year (38Ah), I can compile the mdl and load it into FSX or MCX, but if I use any of the two variables 389h or 363h, MCX and FSX crash if they want to load the compiled mdl. Is there some limitation to the use of those variables?
 

Horst18519

Moderator
Staff member
Resource contributor
#7
I just used a simple line:

IFIN1 tex_205, 038Ah, 311, 365
MATERIAL 0,1 ; _1 (dawn)
JUMP tex_continue
tex_205 label word

That works fine. If I replace the var, the compiled mdl is corrupt:

IFIN1 tex_205, 0389h, 20, 20
MATERIAL 0,1 ; _1 (dawn)
JUMP tex_continue
tex_205 label word

I'm using the more simple tod variable now, that works fine. Don't understand why the 389 var doesn't work though.
 

Horst18519

Moderator
Staff member
Resource contributor
#8
I just realised, the simple tweak won't do in this case.
If I'm not mistaken, the time of day var only knows these values:
1= DAY
2= DUSK/DAWN
4= NIGHT
So, there is no difference between dusk and dawn. Looks like I need to use the more complex tweak I was using in the first place. I just wonder why that hour of day variable doesn't work. :scratchch
 

Horst18519

Moderator
Staff member
Resource contributor
#9
Ok, I think I solved it. I forgot to add the "else" material assignment, so there were occasions when FSX didn't know what to render. I thought it would just render nothing in that case, but it crashes instead.
I also solved the dusk/dawn issue by using an IFIN2 command to check if the tod is dusk/dawn AND the time is after 1pm.
Case closed. :)
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
#10
Glad to hear you solved it.

Since you put the check only around the material command, not also around the command that draws the triangles, it would indeed still draw something when the checked failed. I wouldn't have guessed it would crash on that, but apparently it did :)
 
Top