importing Sketchup models into trainz

There are lots of buildings on the DLS already, check out the ones by Dave Snow, for example. But there were all these hotels on the 3D Warehouse and there is a lack of US style hotels including Hampton Inn, Holiday Inn, etc. in Trainz, Dave Snow made a Holiday Inn Express and a reskinned Red Roof Inn, though. You could probably reskin his hotel with any hotel name you want. But I want different styled ones, like different Hampton Inns, Embassy Suites, etc. I never learned how to make buildings myself, it seems too complex. And forget about locomotives, I could never be a Jointed Rail or K&L Trainz. I just reskin other's models to get what I want. We need an easier to use modeling program at least for buildings, signs, etc. that can export directly to Trainz format.
 
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.


Hi, I hope your Trainz journey is on smooth track in the future.

I went through a little Sketchup phase many years back. I can't recall seeing an error message like that. I am wondering if new versions of Sketchup produce models that are not as compatible with the now-quite-old Ruby Tmix as they used to be.

In any case, others here have pointed out the flaws that RubyTmix produces for Trainz assets, but I found that assets more acceptable for Trainz could be made by 2 step simplifications:


1. Before generating the Trainz asset, simplify the Sketchup asset by stripping out as many polygons as you can, especially bits that are not visible or bits that are rounded excessively.

2. After generating the Trainz asset, modify it again by eradicating as much texture duplication as you can. This can be a time consuming task, depending on the asset of course.

As you can see, a fair bit of extra work is required to make "acceptable" Trainz assets with RubyTmix, and may require knowledge you do not have as yet. I made a Trainz version of the London olympic stadium (it is on the DLS) using these techniques and managed to make an asset that, while still very big, is at least useable in Trainz without slaughtering the frame rate in cold blood. I hope it goes well for you.

A71
 
Everyone seems to be stating issues with the performance of sketchup models based upon experiences from years ago. Has anyone tested them in the latest version of E2 engine?

Tony had this to say in MSGsapper's LOD thread.

Here is an example of the RMRX GP40-2. It goes from 200k polys at high detail (20 years ago this had to be more like 2,000 polys), down to 100 polys at low LOD.

Are these models over 200k polys?
 
Everyone seems to be stating issues with the performance of sketchup models based upon experiences from years ago. Has anyone tested them in the latest version of E2 engine?

Tony had this to say in MSGsapper's LOD thread.

Here is an example of the RMRX GP40-2. It goes from 200k polys at high detail (20 years ago this had to be more like 2,000 polys), down to 100 polys at low LOD.

Are these models over 200k polys?


Some on the DLS are over 500k polys. There isn't an easy way to do LOD in Sketchup. It's the number of polys and texture files that have the most impact and the version of Trainz doesn't make much difference to that.

Cheerio John
 
I was wondering the same thing. Today's systems process millions of polys per second.


Everyone seems to be stating issues with the performance of sketchup models based upon experiences from years ago. Has anyone tested them in the latest version of E2 engine?

Tony had this to say in MSGsapper's LOD thread.

Here is an example of the RMRX GP40-2. It goes from 200k polys at high detail (20 years ago this had to be more like 2,000 polys), down to 100 polys at low LOD.

Are these models over 200k polys?
 
I was wondering the same thing. Today's systems process millions of polys per second.


But some are running on laptops with integrated graphics. Numerically the number of systems that have high end graphics are way out numbered by those with lesser machines. Besides the less processing the machine does the less electricity it uses and that all helps global warming.

Remember a highly demanding Sketchup model and a lesser demanding model made in Blender etc will look exactly the same in the game. Well maybe not there are a number of things you can do with textures such as PBR etc you can do in Blender but I understand may not be available in Sketchup.

Cheerio John
 
There's another aspect of these models that we keep forgetting here. Unlike an optimized Blender model, the textures in a Sketch-up model are individual textures. With a single UVW mapped model, the textures for individual parts are loaded at once because like a decal sheet they are placed in a single file. This file is referenced internally by the mesh and it knows internally where to place the textures. A Sketch-up model has individual textures assigned to each part. This means that each window on a large skyscraper, if modeled, will have its own texture even though the texture maybe the same as its neighbor. The windows in this case will be called window_1.tga, window_2.tga..., window_1000.tga, etc. This may not seem like a lot when the individual files are small, but the constant fetching of these individual textures from disc slows things down. An SSD maybe fast, but it too is slower still than something that's floating up in the system memory and quickly accessed by DMA. The SSD is still bound to the buss it's connected to and the SATA buss is still maxed out a 6 MB/s on most motherboards. The access time on those the connect to the motherboard via the PCI/e buss are faster, but still this buss is not as fast as RAM.

With a single UVW map, the texture-file is loaded once into memory and accessed by the mesh as needed since each window, using the example from above, is the same texture referenced within the same file and not an individual texture. This may not seem to be too much of an issue on a fast modern system, but when there's a lot of this going on, this can slow down the processing a lot and cause jitters and pauses when the model is loaded. This is most apparent on slower systems with slower components overall due to the fewer resources to start with.
 
The problem with Blender is it is very rich and we only use about 5% of it...

Cheerio John

The problem with Blender is that is tries to be the Swiss Army knife of graphics programs. Imagine an all in one program that supports 3-D graphics - using any combination of facets, meshes, and NURB and splines -, animation, digital sculpting, video editing, compositing, and God only knows what else. That's Blender. Now try to come up with a straight-forward, cohesive, at least somewhat intuitive user interface. What you get, instead is... Blender. Imagine how much better it could be as a suite of tools with a collection of common core elements. I did computer graphics for something like 30 years using a lot of different tools. Every once in a while, I'll get a fresh copy of Blender and try to do something simple. Then I leave it alone 'til the next time.

PS. Blender is perfectly capable of creating models with hundreds of thousands of faces and is quite good at it if the user doesn't pay attention.
 
Mark, is there a free or low-cost 3D program you feel would be better suited to most of what creators do in Trainz? That deals in the file and texture types Trainz uses?
 
The problem with Blender is that is tries to be the Swiss Army knife of graphics programs. Imagine an all in one program that supports 3-D graphics - using any combination of facets, meshes, and NURB and splines -, animation, digital sculpting, video editing, compositing, and God only knows what else. That's Blender. Now try to come up with a straight-forward, cohesive, at least somewhat intuitive user interface. What you get, instead is... Blender. Imagine how much better it could be as a suite of tools with a collection of common core elements. I did computer graphics for something like 30 years using a lot of different tools. Every once in a while, I'll get a fresh copy of Blender and try to do something simple. Then I leave it alone 'til the next time.

PS. Blender is perfectly capable of creating models with hundreds of thousands of faces and is quite good at it if the user doesn't pay attention.

But there isn't really anything else that has the capabilities to create content for Trainz that is free. Basically 3DS is out of the price range of many content creators. 3D canvas but you need the version that costs money. You need the tutorials as well and that is where Blender has the edge. There is a learning curve with these products so much so that many content creators still work in GMAX even with its limitations. Mind you GMAX is free but has limitations so I wouldn't recommend it for a beginner. The other thing to consider is support. If you can't do something in Blender you can ask in the forum, there are fewer users for products such as 3DS.

Cheerio John
 
But there isn't really anything else that has the capabilities to create content for Trainz that is free. Basically 3DS is out of the price range of many content creators. 3D canvas but you need the version that costs money. You need the tutorials as well and that is where Blender has the edge. There is a learning curve with these products so much so that many content creators still work in GMAX even with its limitations. Mind you GMAX is free but has limitations so I wouldn't recommend it for a beginner. The other thing to consider is support. If you can't do something in Blender you can ask in the forum, there are fewer users for products such as 3DS.

Cheerio John

Not been called 3d Canvas for a long time, it's now 3d Crafter http://amabilis.com/?page_id=26692 available free from the Microsoft Store. fbx exporter and other stuff on this linked page now contains the pro features.

The freeware version now includes many additional exporters including for Dovetail Game’s Train Simulator as well as many other rail simulation formats.
All of the 3D Crafter Pro Modelling Operations are now included in the free version as well as a number of Amabilis written extensions. User written extensions and scripts now can be used in the freeware version.
Amabilis has created a number of new extensions including an FBX exporter which are installed separately.
Download 3D Crafter 9.5 Extensions
These extensions are Open Source and available at GitHub.
 
The problem with Blender is that is tries to be the Swiss Army knife of graphics programs. Imagine an all in one program that supports 3-D graphics - using any combination of facets, meshes, and NURB and splines -, animation, digital sculpting, video editing, compositing, and God only knows what else. That's Blender. Now try to come up with a straight-forward, cohesive, at least somewhat intuitive user interface. What you get, instead is... Blender. Imagine how much better it could be as a suite of tools with a collection of common core elements. I did computer graphics for something like 30 years using a lot of different tools. Every once in a while, I'll get a fresh copy of Blender and try to do something simple. Then I leave it alone 'til the next time.

PS. Blender is perfectly capable of creating models with hundreds of thousands of faces and is quite good at it if the user doesn't pay attention.

I certainly agree with the Swiss Army Knife analogy and for years thought that Blender was aimed at those doing hi detailed models with studio lighting, animated movies, etc. As John said, we struggled to use more than 5-10% of its capabilities.

But I suggest in recent years there has been a subtle move towards hard surface modelling and production of meshes suitable for games. There are addons for working with a number of game engines or material/texture tools such as Substance. The move by N3V to FBX and PBR has opened up far more potential for Trainz creators to use Blender features not previously available to most.

There is a cost though and that is a steeper learning curve for new creators. PBR is conceptually easy but requires a little education on how to make it work in Blender for use in Trainz. There is no seamless solution that I can see at this time.

Blender's interface has always been a topic for discussion and probably always will be. Part of the issue is the number of ways the interface can be tailored. And those responsible for it keeping changing it!

FWIW, I did write a Trainz friendly version of the Blender FBX exporter but the Blender base code kept changing and I didn't have the time to keep updating my version. So I contented myself with defining some Trainz friendly export profiles and that works for me. I think there is potential for Trainz specific addons such as mesh creation for some commonly used Trainz components.
 
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.
welp kotangagirl the new and old trainz users will use sketchup models
 
I realize this is an old thread, but wanted to throw in my "2 cents". Because Sketchup and TMIX were the only way I knew about to get custom structures in Trainz, that was what I learned to do. However, I make the original models in a 3rd party, paid modeling program, and optimize the models for the fewest polygons that still do a good job on representing the structure. I then pass the models through Sketchup to apply the texture maps - again, trying to use one or two maps at most; and optimizing as much as possible. My models have generally come out quite small, and with modern computers, have not presented a problem in operation. Could they be better? Probably. But I'm too set in my ways to learn new tricks when this seems to work.
Ron
 
Sure Ron, the most important is to have fun creating, no matter what tools or ways
you already do your best to optimize, full 3d work is not for everyone
it's up to any user if they want to use or not what you share.
 
Once again, digging up a long dead thread, but I want to give my support for Sketchup and rubyTMX

Like most things when you say "sketchUp" it gives a bad taste in the mouth, but that is normally due to people not knowing how to use it. The game Kerbal Space Program used Sketchup to create its assets.

But if you are smart, if you apply "real" game design logic to this, you can prosper. Make a single texture map (square) and then use that one texture to paint the whole asset, using the "texture>position" option in the right click menu. and then create multiple versions of the same asset with your own manual LOD's and then arrange the exported meshes into one folder using this method:

https://online.ts2009.com/mediaWiki/index.php/HowTo/Make_your_first_Trainz_Asset

in a very very basic test i have done with creating my own manual lod files, i created a commie block that was as "high" as 426 ploys, and as low as 12. https://imgur.com/a/IhgTW9G

It is very easy to get good quality and usable models from SketchUp. I did another "test" where i picked 50 assets at random, and not one of them had any sort of LOD.

So yes, you take a model from sketchup warehouse and want to upload it to trainz, it might be poly heavy. RubyTMX doesn't do LOD's by default. and if you aren't "clever" about creating your file you may have issues, the example of a cube with a cube protruding. if you build them as a merged entity, there will be more polys, than if they just overlap and never digitally interact with each other. If you are an engineer this will be screaming at you, but for videogame assets, it is what is expected.


so i think every criticism put against sketchUp can be worked around, but that is just it, a workaround. Blender can do this for you, but I have never got on with Blender. of course Blender also has a much better way of handling more advanced textures natively.
 
There is only one way to get past the fact that you "never got on with Blender." And that is to just use it. I really understand anyone using any Blender version prior to 2.8 and not liking it... but the User Interface changes since 2.8 make it much more usable by the average 'joe'. Perseverance is the key here. And nobody expects you to learn everything about Blender. Just learn what you need. Like just basic understanding of the Modeling, UV, and Shader tabs gets you making actual models you can import. When looking for Blender tutorials, focus on the ones that talk about "Hard Surface Modeling".
 
Back
Top