• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

FS2004 Tweaked mdl with inverted normals & rotated

Horst18519

Moderator
Resource contributor
Messages
2,370
Country
germany
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
Messages
32,883
Country
netherlands
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.
 

Horst18519

Moderator
Resource contributor
Messages
2,370
Country
germany
It was a 3dsmax x file that was compiled to a fs9 mdl with MCX.
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
32,883
Country
netherlands
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
Resource contributor
Messages
2,370
Country
germany
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?
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
32,883
Country
netherlands
Shouldn't be, can you show your code?
 

Horst18519

Moderator
Resource contributor
Messages
2,370
Country
germany
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
Resource contributor
Messages
2,370
Country
germany
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
Resource contributor
Messages
2,370
Country
germany
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
Messages
32,883
Country
netherlands
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