importing Sketchup models into trainz

jbcz

New member
I am a new Trainz user, and I am attempting to import sketchup models of my town into trainz. I have been successful with several imports using the TMIX app. However, a few of the building models will not import. I get this message when importing: "parse error file: line 1: expected float, found 'NaN'. If I proceed with the import the entry in my file content is printed in red and indicates it is faulty. It has to do with the mesh file import, but I am clueless as to why some import just fine and others do not. Any advice is appreciated.
 
While I have no answers for your particular problem, I will say that the whole issue of importing Sketchup models into Trainz is something that will generate a lot of heated posts in these forums. Many of those posts will be very firmly against the idea for a number of reasons - ultra high poly counts, poor texture mapping, excessive use of materials, no LOD, etc. Sketchup was never designed or intended for the creation of objects in an animated 3D gaming environment. But that is my opinion.

When I look through the DLS to decide what to download, I exclude anything that has "created in Sketchup" in its description or has a very large file size (Sketchup will usually create asset files for simple objects that are many megabytes in size).
 
While I have no answers for your particular problem, I will say that the whole issue of importing Sketchup models into Trainz is something that will generate a lot of heated posts in these forums. Many of those posts will be very firmly against the idea for a number of reasons - ultra high poly counts, poor texture mapping, excessive use of materials, no LOD, etc. Sketchup was never designed or intended for the creation of objects in an animated 3D gaming environment. But that is my opinion.

When I look through the DLS to decide what to download, I exclude anything that has "created in Sketchup" in its description or has a very large file size (Sketchup will usually create asset files for simple objects that are many megabytes in size).


I try to avoid them like the plague. I agree with everything you said.
 
I am a new Trainz user, and I am attempting to import sketchup models of my town into trainz. I have been successful with several imports using the TMIX app. However, a few of the building models will not import. I get this message when importing: "parse error file: line 1: expected float, found 'NaN'. If I proceed with the import the entry in my file content is printed in red and indicates it is faulty. It has to do with the mesh file import, but I am clueless as to why some import just fine and others do not. Any advice is appreciated.

Please don't use Sketchup.

I would recommend you try creating with Blender. Sketchup is fine for a very, very simple building ie a cube other than it creates far too many texture files by default. When two cubes cross the ploy count starts to go through the roof.

Cheerio John
 
Sketchup Models in Trainz

As a 77 year old Trainz newbie I was hoping for some helpful advice, but received 3 reprimands instead. I understand that Sketchup may not be ideal for importing into Trainz, however, I have spent the past several years building Sketchup models of my hometown for other purposes and learned about Trainz afterward. My intention is not to make my models available for download, and I intend to use them in my own personal game, not available to anyone else. So I don't see how the reprimand was appropriate. It is not feasible for me to rebuild all of these models in Blender or other similar apps. Maybe someone could advise how helpful it might be to import these files into Blender, then to Trainz. I am still open to helpful comments on successful importing of .skp files into Trainz.
 
Mea culpa, mea culpa, mea maxima culpa. Yesterday I exported a very simple Sketchup model into Trainz and then uploaded it to the DLS. The problem with Blender is that it's horrible to try and learn to use which means that people naturally look for simpler alternatives. I don't really plan on uploading anymore Sketchup models by the way it was just an experiment, - so you can put the pitchforks and burning torches away now.

The OP asked a valid question and was hoping for some help and not a visit from the Inquisition. He has stated that he's not going to upload his models and thereby ruin the sanctity of the DLS, - so how about helping him out. Unfortunately my skill with 3D modelling is next to zero so I can't offer any advice this time around.
 
While I generally agree with KotangaGirl, the whole issue can become heated very quickly, I will make a few points.


  • The OP did not mention that he did not intend uploading his creations to the DLS until his later post. So what were we to assume?
  • I too lack any skills in 3D modelling, which is why I prefaced my response with "While I have no answers for your particular problem".
  • I see no "inquisition" in any of the above responses, certainly not compared to the flames that have erupted in other Sketchup threads.

In particular I would recommend looking at John's post ...

Please don't use Sketchup.

I would recommend you try creating with Blender. Sketchup is fine for a very, very simple building ie a cube other than it creates far too many texture files by default. When two cubes cross the ploy count starts to go through the roof.

Inquisition or friendly advice?

If someone wants to use Sketchup for their own purposes and not to upload to the DLS then that is fine by me and others. But they should be aware of the technical problems, especially poor to terrible frame rates, that Sketchup can create particularly if you intend to model an entire town in the one scene.

My advice.
 
As a 77 year old Trainz newbie I was hoping for some helpful advice, but received 3 reprimands instead. I understand that Sketchup may not be ideal for importing into Trainz, however, I have spent the past several years building Sketchup models of my hometown for other purposes and learned about Trainz afterward. My intention is not to make my models available for download, and I intend to use them in my own personal game, not available to anyone else. So I don't see how the reprimand was appropriate. It is not feasible for me to rebuild all of these models in Blender or other similar apps. Maybe someone could advise how helpful it might be to import these files into Blender, then to Trainz. I am still open to helpful comments on successful importing of .skp files into Trainz.

Well, you didn’t initially say what you were going to do with your models, so people can hardly be blamed for their cautionary but polite responses. They are just trying to protect a system which is not well-suited to Sketchup assets.

On a more helpful note, your problem sounds quite technical and specific to RubyTMix, so you could try to get in touch with the one person who might know the answer - ModellerMJ. I think that’s his Trainz forum nickname.

.
 
Last edited:
"parse error file: line 1: expected float, found 'NaN'. If I proceed with the import the entry in my file content is printed in red and indicates it is faulty. It has to do with the mesh file import, but I am clueless as to why some import just fine and others do not. Any advice is appreciated.

Not an error I have ever come across in Trainz I'm afraid, is the error generated by TRS19 or by the TMIX exporter? It is a few years old now and may not work well with newer Sketchup models, it was created when Google still owned Sketchup and hasn't been updated.

Not my favourite program, however there are assets with as bad poly counts created in Blender and 3ds max, it's not so much what you use but how you use it and there are items from Sketchup that are not excessively high. NaN is code speak for Not a Number, not that this helps although I suspect it relates to TMIX rather than Trainz.
 
I've noticed some comments from longtime Sketchup users that it's difficult to keep poly counts down in the later versions of Sketchup, - so that could be something to bear in mind if considering using Sketchup to make models for Trainz.

Edit: Perhaps I was being a bit harsh using words like 'Inquisition' and I apologise for that.
 
Last edited:
Not my favourite program, however there are assets with as bad poly counts created in Blender and 3ds max, it's not so much what you use but how you use it and there are items from Sketchup that are not excessively high. NaN is code speak for Not a Number, not that this helps although I suspect it relates to TMIX rather than Trainz.

Sketchup does something different. First it is not easy for a beginner to use a single texture file. Each texture file has an overhead of 200 poly equivalents. Secondly if you take two beams that are 12 polys each total 24 polys and cross them in Sketchup it breaks them up into five beams each with 12 polys for a total of 60 polys and that's how the poly count explodes. The more complex the model the higher the poly count. For something that doesn't render in real time it's not too bad but for trainz where you need to render 30 times per second it pushes the hardware. You get unseen faces as well. I don't think anyone has successfully done LOD in sketchup but I could be wrong.

If you stick with Blender 2.79b then https://en.wikibooks.org/wiki/Trainz/Tutorial_for_Blender try the moving house tutorial. The problem with Blender is it is very rich and we only use about 5% of it so Trainz specific tutorials are best. If you look in the forum there are video tutorials as well. The exporter for trainz only works with 2.79b. For 2.8 you need to use FBX and import into it could be a minimum of TANE I'm not totally sure.

Cheerio John
 
Sketchup does something different. First it is not easy for a beginner to use a single texture file. Each texture file has an overhead of 200 poly equivalents. Secondly if you take two beams that are 12 polys each total 24 polys and cross them in Sketchup it breaks them up into five beams each with 12 polys for a total of 60 polys and that's how the poly count explodes. The more complex the model the higher the poly count. For something that doesn't render in real time it's not too bad but for trainz where you need to render 30 times per second it pushes the hardware. You get unseen faces as well. I don't think anyone has successfully done LOD in sketchup but I could be wrong.

If you stick with Blender 2.79b then https://en.wikibooks.org/wiki/Trainz/Tutorial_for_Blender try the moving house tutorial. The problem with Blender is it is very rich and we only use about 5% of it so Trainz specific tutorials are best. If you look in the forum there are video tutorials as well. The exporter for trainz only works with 2.79b. For 2.8 you need to use FBX and import into it could be a minimum of TANE I'm not totally sure.

Cheerio John


I spent about 2 months back in 2011 learning sketchup as part of work commitments ,and then realised it was not the ideal vehicle for trainz. Blender is good but takes a long while to get used to, I simply dont have the time to commit to it to make models that would satisfy my standards and also make routes. Wouldn't it be nice if we could have a trainz specific version of blender ? A bit like gmax was a stripped down version of 3d max, its the time factor that prevents me from doing 3d stuff,I also started using gmax and found it quite easy as I'd used 3d max, but then it seemed pointless as its more or less been outmoded. What the community could really do with a is a program that was very easy to learn and trainz specific , eliminating all excess features ) and which was documented step by step ) no going to happen of course, but one can dream i suppose.
 
Last edited:
When the Sketch-up models first appeared, we all thought it was the bees knees and uploaded a ton of content. Mia culpa here too as I uploaded a bunch of local buildings myself. At the time we didn't know the impact they had on the system and now we do.

To jbcz,

If we appear on edge with this, it's not your fault. We got burned ourselves and see this going down the same path and this is why we recommend not using Sketch-up for the reasons mentioned. They work well for some things, and a few here and there are okay, but like too much of anything, they can be hazardous. If you do in fact import your models, sans the one that can't translate, you'll find the performance will drop substantially in those locations where you have placed those models.

Now with that said, there are ways of taking the models and passing them through an other program such as Blender to fix them up so they will work better. You will still need to create LOD meshes and cull faces to reduce the mesh geometry so the whole model isn't loaded when it's not needed. Unfortunately, this is all beyond my basic skill set here, so if you're still interested, have someone explain what can be done even for your own pleasure since that will make your own route operate even better than if it does with the straight up Sketch-up models.
 
Importing Sketchup

Thanks for the attempts to explain the skepticism via Sketchup. Even though I still have the problem, I now understand the concerns. I have even researched info on Blender and may experiment with it. However, I cannot see that I will rebuild all my models in a new program. Maybe I can import them to Blender. I will look into that. I am still open to any info about my original problem.
 
Hi jbcz,

From memory, there is a way to turn a Sketchup model into a model that Blender, and other 3d modelling programs, can read.

Unfortunately, I do not have any experience in the Sketchup exporting side, so cannot help you there. Hopefully someone is able to help you with that :)
 
Probably what we need is a small library of textured Blender models that can be modified. That might tackle the learning curve problem.

Thoughts?

Thanks John
 
If you stick with Blender 2.79b then https://en.wikibooks.org/wiki/Trainz/Tutorial_for_Blender try the moving house tutorial. The problem with Blender is it is very rich and we only use about 5% of it so Trainz specific tutorials are best. If you look in the forum there are video tutorials as well. The exporter for trainz only works with 2.79b. For 2.8 you need to use FBX and import into it could be a minimum of TANE I'm not totally sure.

Cheerio John

How are you John? I have been trying to follow your Moving House Tutorial because I am at that point in Route Building where I really need to make some bespoke buildings. I bit the bullet, downloaded Blender (2.78) and sat down to go through your tutorial. I got to model the House and the bit where we move on to texturing. However, when I open up my house to start your tutorial, the base grid is missing and the house appears in a solid form with no toolbars showing. I can shut Blender down and restart to its default settings, but as soon as I open my house.blend file, it goes back to how I don't want it.

Do you know a way of getting the screens back without having to go back and start your tutorial all over again? Please?
 
I have used Sketchup to create simple buildings mostly for my own use. Some are on the DLS. Here are my thoughts:
1. I have stayed with Sketchup 8.
2. I installed Blender and even bought two books from Amazon: Blender for Dummies and 10 Minute Blender. If you believe you can learn Blender in 10 minutes, LOL
3. I am 95% certain you can import Sketchup models into Blender. I gave up on Blender due to it's non-standard user interface and complexity that far exceeded my needs.
4. Everything I do in Sketchup is very low poly with decent quality textures. Buildings only, or things like simple underpasses, building bases etc., and well below the limits beyond which N3V now requires LOD (500 polys I think)
5. I know how to use textures efficiently and I keep the number of texture files as low as reasonably possible.
6. I am convinced that part of Sketchup's poor reputation on this forum is that some users have gone to the 3d warehouse and downloaded someone else's model and put it onto the DLS. Many of these models have thousands or tens of thousands of polys and are unsuitable for video games whether created in Blender or Sketchup. Stop doing this.
 
How are you John? I have been trying to follow your Moving House Tutorial because I am at that point in Route Building where I really need to make some bespoke buildings. I bit the bullet, downloaded Blender (2.78) and sat down to go through your tutorial. I got to model the House and the bit where we move on to texturing. However, when I open up my house to start your tutorial, the base grid is missing and the house appears in a solid form with no toolbars showing. I can shut Blender down and restart to its default settings, but as soon as I open my house.blend file, it goes back to how I don't want it.

Do you know a way of getting the screens back without having to go back and start your tutorial all over again? Please?

Try <Crtl><up arrow> and see what happens.

Cheerio John
 
Back
Top