3DC Envmap problem with Trainz

Ironically 2 or 3 textures doesn’t affect performance much.
It takes up twice the memory, but that’s not so much of an issue these days.

They are processed almost in parallel in the graphics card so the performance hit is minimal.

It is the number of primitives/draw calls (chunks in trainz speak) that affect performance more. These indicate switches of drawing state in the graphics cards.

I have a problem with exporting an environment map for Trainz. Not sure if it’s user error, a 3DC error or the Trainz plugin error.

First off the export to Trainz with envmap loaded with environment map button in the Material Palette just plain doesn’t work as the env texture is not exported at all and isn’t included in the list of textures used by the loco.

Using the secondary texture button on the material palette (as per Paul’s timex documentation included with the Trainz export plugin) and upon updating the material on the loco and exporting it does seem as though it has worked when viewed in Shape Viewer. However, when viewed in Trainz, the envmap (fisheye) has indeed produced a reflective effect but the original texture does not show underneath so I end up with a very shiny fisheye textured loco. Nice, but not really what I’m after <!– s:) –><img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile" /><!– s:) –> Is there a solution or have I done something stupid ?

Paul, sorry for bombarding you with e-mails and PMS about this (well.. one of each) but I’d just like an answer before I have to go back to real work [img:h8zq6ray]http&#58;//community&#46;groupee&#46;com/groupee_common/emoticons/icon_razz&#46;gif’%20alt=’Razz’%20width=’15’%20height=’15[/img:h8zq6ray]

Sorry for the delay Tony, I’m still catching up after a week away.
Can you e-mail me the 3DC model and textures and I’ll take a look at the output. I suspect the secondary texture blending factor is probably a bit too low – needs to be about 80 or 90 (default is 50)

Just another thought – try this version of the plugin for 7.1.2

I think I did report a bug to Richard and it may not have made it into the latest release.

Hi Paul, just tried that version of the plugin and unfortunately I get the same result. I’ve used pretty high blending settings as you suggested.

It seems as though Trainz reads the secondary texture only and ignores the primary if a secondary is selected. I tested this by mis-naming the envmap texture file and the loco became white in game.

Anyhow, I’ll package the model up and send it to you. Thanks for having a look at it.

Just a quick thought – did you put the new file in the pluginsimportexport folder and are you using the File/Export menu option?

Hi Paul, yes to both <!– s:) –><img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile" /><!– s:) –> Actually it seems I have a later version, 1.1.0.78 of the plugin to the one you posted which is 1.1.0.48. Strange <!– s:) –><img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile" /><!– s:) –>

Didn’t want to start a new thread but it seems there is also some problem with bump mapping on export. I get this error – ‘An error has occurred: 91 – Object variable or With block variable not set saveface’

I have no idea what this means <!– s:) –><img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile" /><!– s:) –>

I’m not 100% sure, but there may be a bump map on an object with no main texture. I think this error was reported a few months ago.

I would need to see the 3DC file to check.

Using the same .3dc as the one I sent you earlier. I simply reloaded the same body texture in as a bump map and updated the material on the body. Looked reasonably OK in 3DC and I could distinguish the effect but got the error above when I tried to export.

Aha! – the answer to this one was in your last posting.

Never use the same texture as a bump map, it confuses the exporter.

I’ll send you a bump map file. You can right click on the object and select properties. From there you can change the bump map file without having to reapply the material to the model.

Great! That’s another problem ticked off the list. I suspect there wouldn’t be so many of them if I were actually any good at modelling <!– s:) –><img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile" /><!– s:) –>

Just to follow up on this. First off, thanks again for all your help Paul. Much appreciated.

I found the method of right clicking on objects, selecting properties and then adding the envmap/bumpmap the one I prefer as it works and I understand it best. It’s then easy to select areas I don’t want the envmap and run the ‘update material’ plugin having removed that map from properties.

I found some unusual side effects from bumpmapping. It seems a model may require to be pretty high poly (or this may happen regardless) but I found that a lot of smoothing disappeared and in many areas I could see the poly lines of the model. Anyhow, another texture of same size as the main texture just isn’t worth the trade-off in performance in my case so I’ll give bump mapping a miss for now. I’m satisfied with knowing how to do it and the envmapping makes all the difference in the look of the model. Just happy to be on the right track again, until something else comes up <!– s:) –><img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile" /><!– s:) –>

You must be logged in to reply in this thread.

13 posts