Why Should Paul Have All The Fun? – Updated MSTS Exporter

One last feature. In the next release 3DC will export the root group’s animation.

Hi All,

I had to break the MSTS exporter anyhow, so I thought I would have a look at it to see if there were any improvements I could make. Turns out there was at least one.

In the next release the MSTS exporter will support per face specular/ambient. No longer will this be per group as in the past.

In the picture below I have circled an object where I have changed the specular level for a few faces.

[img:mw824dtx]http://www.3DC.com/images/PerFaceSpecularAmbient.GIF[/img:mw824dtx]

I think this should allow the collapsing of hierarchies in some models since it will no longer be necessary to group parts by material.

This was quite fun to write actually. I’ve been bogged down in ‘real work’ so long, I thought I would do something that required some sleuthing. I didn’t even ask Paul how to do it! <!– s:) –><img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile" /><!– s:) –>

GlossMap shaders too??? <!– s;) –><img src="{SMILIES_PATH}/icon_e_wink.gif" alt=";)" title="Wink" /><!– s;) –>

All good stuff – I’m still an MSTS1 developer at the moment.

Nice one <!– s:) –><img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile" /><!– s:) –>

Kevin

Paul, it could happen <!– s;) –><img src="{SMILIES_PATH}/icon_e_wink.gif" alt=";)" title="Wink" /><!– s;) –>

I did a bit of re-designing that made the code a tiny bit more readable, and a bit easier to modify. It’s still a bit on the awful side. I’d write it differently now. But, that’s partly because the 3DC API provides more.

Are bumpmaps really possible. I guess not, or you’d have shown us how by now.

Actually, MSTS1 is still quite usable, especially when your fixer lets complicated models in. There are so many routes etc., that there’s no reason it can’t be around and usable for a few years more.

On export, primitives are now automatically split when they exceed 2800 triangles. This makes it more likely for models to load correctly in MSTS.

It’s now somewhat less likely that you’ll need to use Paul’s Shape Fixer to use complex models in MSTS.

On export, sub-objects are now restricted to a maximum of 11000 triangles. Again, this makes it more likely for models to load correctly in MSTS.

I think with the upcoming release it’s really unlikely that anyone who exports from 3DC will NEED to use Paul’s Shape Fixer to use complex models in MSTS.

Sorry Paul, not trying to make you obsolete. <!– s:) –><img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile" /><!– s:) –>

Yes, bumpmaps do work, but only for solid materials.

This model uses both:
[img:13qmt959]http&#58;//www&#46;traksys&#46;freeuk&#46;com/SR333&#46;zip[/img:13qmt959]
<!– m –><a class="postlink" href="http://www.traksys.freeuk.com/SR333.zip">http://www.traksys.freeuk.com/SR333.zip</a>&lt;!– m –>

I’m glad you’re removing the need for shape fixer – one less thing to support, although I think I’ve only had one e-mail asking for help with it.

I’ve written the code to export models that gloss maps or bump maps or combined gloss maps and bump maps.

Gloss maps and combined gloss maps and bump maps work, but for some reason MSTS insists on the object being in it’s own group. Or at least with my export it insists. The shape viewer has no problems with it.

The bump maps alone, don’t work with either MSTS or the shape viewer. Perhaps its the light_model_cfg which I guessed at:

light_model_cfg ( 00000000
uv_ops ( 2
uv_op_copy ( 1 0 )
uv_op_copy ( 1 0 )
)
)

I don’t know for certain, but it makes the shape viewer crash! I’m happy to know I’m not the only one who can produce an error 91. <!– s:-) –><img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":-)" title="Smile" /><!– s:-) –>

This was pretty tricky to write actually. It wasn’t quite as much fun as some of the other MSTS stuff.

That’s enough MSTS for now. I just have a few fixes to do with the updated Train Sim Wizard, and I’ll leave MSTS.

The last new MSTS feature for this release is texture priorities. This allows viewing through multiple layers of translucency. It’s not very useful typically, but if you want your windows to be translucent when viewed from the interior, and when viewed from the exterior, you should be able to do it now.

In the new release you will have the option of setting a custom material field ‘Alpha Pr’ (alpha priority) which allows you to set the priority level of an alpha texture. For interior parts you would set it to ‘0’ for exterior parts ‘1’. You could concievably have up to three levels of translucency 0-2.

Also in the new release, you won’t use the ‘Translucency’ value of a material to set whether a texture is translucent or not. There is a new custom field called ‘Tx Alpha’ which you set to ‘None'(or blank), ‘Transparency’ or ‘Translucency’.

All of these changes I have made should make it possible to take complex models you have created for Rail Simulator and use them in MSTS.

I think that’s useful. There are a lot of detailed models being created for Rail Simulator that would be nice to be able to use in Train Simulator. Now, I think it’s possible.

I’m absolutely amazed at how much I broke the MSTS export while making these changes. This is why I haven’t wanted to make changes to it.

I think it’s OK now. Everything I try works.

You must be logged in to reply in this thread.

12 posts