.
Page 1 of 3 123 LastLast
Results 1 to 15 of 32

Thread: importing Sketchup models into trainz

  1. #1
    Join Date
    Oct 2020
    Location
    United States of America, MS, Petal
    Posts
    3
     

    Default importing Sketchup models into trainz

    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.

  2. #2
    Join Date
    Nov 2006
    Location
    Australia, NSW, Sydney
    Posts
    7,303
    Blog Entries
    3
     

    Default

    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).
    TRS19 Platinum Edition SP2 build 110491

  3. #3
    Join Date
    Nov 2006
    Location
    United States of America, Colorado, Colorado Springs
    Posts
    1,083
     

    Default

    Quote Originally Posted by pware View Post
    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.
    I7-8700K
    1070Ti
    Z370
    PCIe SSD operation ( build)

  4. #4
    Join Date
    Nov 2006
    Location
    Canada, Ontario, Ottawa
    Posts
    13,794
     

    Default

    Quote Originally Posted by jbcz View Post
    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

  5. #5
    Join Date
    Oct 2020
    Location
    United States of America, MS, Petal
    Posts
    3
     

    Default 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.

  6. #6
    Join Date
    Jun 2016
    Location
    New Zealand
    Posts
    3,908
     

    Default

    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.
    Narcolepsy is not napping.



  7. #7
    Join Date
    Nov 2006
    Location
    Australia, NSW, Sydney
    Posts
    7,303
    Blog Entries
    3
     

    Default

    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 ...

    Quote Originally Posted by johnwhelan View 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.
    TRS19 Platinum Edition SP2 build 110491

  8. #8
    Join Date
    Nov 2006
    Location
    Newcastle NSW Australia
    Posts
    6,755
     

    Default

    Quote Originally Posted by jbcz View Post
    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 by Dinorius_Redundicus; November 14th, 2020 at 06:26 PM.
    T:ANE SP4 (105946) & TRS2019 SP1 (105096).
    Win10, i7 5820K, 3.3GHz, 32GB ram, GTX 980Ti 6GB vram, 2x512GB SSD.

  9. #9
    Join Date
    Nov 2008
    Location
    Crewe, Cheshire, UK
    Posts
    16,637
     

    Default

    Quote Originally Posted by jbcz View Post
    "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.
    Malc


  10. #10
    Join Date
    Jun 2016
    Location
    New Zealand
    Posts
    3,908
     

    Default

    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 by KotangaGirl; November 14th, 2020 at 07:20 PM. Reason: more to say
    Narcolepsy is not napping.



  11. #11
    Join Date
    Nov 2006
    Location
    Canada, Ontario, Ottawa
    Posts
    13,794
     

    Default

    Quote Originally Posted by clam1952 View Post

    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...al_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

  12. #12
    Join Date
    Jun 2013
    Location
    Port Noarlunga South Australia
    Posts
    2,140
     

    Default

    Quote Originally Posted by johnwhelan View Post
    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...al_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 by dangavel; November 14th, 2020 at 09:57 PM.
    WARNING! The Surgeon General has determined that the use of the simulator Trainz is highly addictive,

  13. #13
    Join Date
    Nov 2006
    Location
    United States of America, Massachusetts, Haverhill
    Posts
    28,811
     

    Default

    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.
    John
    Trainz User Since: 12-2003
    Trainz User ID: 124863
    T:ANE Build: 94829
    TRS2019/Trainz-PLUS: 109641

  14. #14
    Join Date
    Oct 2020
    Location
    United States of America, MS, Petal
    Posts
    3
     

    Default 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.

  15. #15
    Join Date
    Dec 2009
    Location
    On my backside
    Posts
    406
     

    Default

    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
    Cheers

    Em

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •