PDA

View Full Version : Why can't Trainz draw perfectly round circles?



JonMyrlennBailey
August 15th, 2015, 01:40 AM
If you notice the wheels on trains closely, they are polygonal in shape: a series of flat spots all around.

shaneturner12
August 15th, 2015, 01:59 AM
There's a very simple reason for that, and it's not likely to change even if a suggestion is put forward.

Pretty much everything in Trainz is drawn using triangles.

Shane

ray_whiley
August 15th, 2015, 02:01 AM
As far as GMax is concerned, it's because everything is drawn as straight lines and a number have to be used to simulate a circle - the moe lines, the better the appearance. No doubt the same is true of all 3D creation programs - so it's not the fault of Trainz but of the creation programs used and presumably of computer technology!

Ray

JonMyrlennBailey
August 15th, 2015, 03:21 AM
Word processors can apparently draw a perfectly round letter "O". What about vector graphics as CorelDraw?
The object is, at least, to create the illusion to the human eye that a PC-generated object is quite round anyway.

Much of it may have to do with pixel count or lines of resolution??


Actually, the tires on kree8tivit's 1950's GM cars look pretty darn round to mine eyes.

<kuid:404071:1211> 1954olds2009 green


Wecsailor's '57 Plymouth suburban wagon has ridiculously-shaped tires, like an octagon nut or bolt head:

<kuid2:67261:29072:1> 1957 ply suburban




Hopefully, Trainz, and 3D gaming in general, will evolve into the era of HD, high definition.

The next Trainz might be called even "T:ANE HD".

pcas1986
August 15th, 2015, 03:28 AM
Word processors can apparently draw a perfectly round letter "O". What about vector graphics as CorelDraw?

If you zoom up very close you are sure to see very short straight lines. Content creators can probably create visually very round wheels but Trainz would grind to a halt trying to draw them. In other words its a compromise between speed and visual quality. There are some techniques we can use with textures to make curves look less chunky.

pcas1986
August 15th, 2015, 03:33 AM
....
Actually, the tires on kree8tivit's 1950's GM cars look pretty darn round to mine eyes.

<kuid:404071:1211> 1954olds2009 green
...

Just looked at those wheels and there are 32 triangles making up those circles.

JonMyrlennBailey
August 15th, 2015, 03:36 AM
Even so, but kree8tivit sure has my eyes fooled!

Kree8tivit should create wheels for train cars using his '54 Oldsmobile wide whitewall tires
as a model for roundness.

pcas1986
August 15th, 2015, 03:44 AM
Even so, but kree8tivit sure has my eyes fooled!
...

That's one of the characteristics of a good model maker.

JonMyrlennBailey
August 15th, 2015, 03:47 AM
So, the compromise is between geometrical perfection and gaming speed, I see.
Word processors can draw nice, round (static) O's but don't have to animate them in high-speed action.

Something has to give somewhere. In another 5 years they will have this whole thing advanced, maybe.

JonMyrlennBailey
August 15th, 2015, 03:50 AM
Maybe he used something like CorelDraw or CAD. His 50's GM cars are very nice right down to the chrome steering wheel horn rings. Does Trainz support content made with vector graphics software?

JonMyrlennBailey
August 15th, 2015, 03:54 AM
Not likely to change....I was hoping the Trainz community was more open-minded, forward-thinking and optimistic than that.

I think not a lot of serous R&D money is put into PC railroad simulation because train buffs, mostly, are a dying breed, old men, like railroading itself. The young gaming generation is totally into Xbox. Young people are not train buffs. They like other gaming themes. It is all market demand, I guess.

I have not heard of one Xbox version of Trainz proposed also unless I am mistaken.

Would Trainz benefit by becoming an "open source" franchise world-wide, like Mozilla or Linux?

Open source software is software that can be freely used, changed, and shared (in modified or unmodified form) by anyone.

oknotsen
August 15th, 2015, 04:09 AM
I was hoping the Trainz community was more open-minded, forward-thinking and optimistic than that.Most of the stuff you post is based on unsupported assumptions, rude to content creators or rude to the creators of the game and usually shows a lack of understanding of the game or IT / software development. That makes it hard to still be open-minded to the things you post.

I suggest you start making some content. Maybe that changes the attitude to some Content Creation choices (and your choice of working to Content Creators) and help you understand how the game works.

LNERlover5
August 15th, 2015, 04:34 AM
Oknotsen's post sounds about right. These nonsensical ramblings suggest a lack of background knowledge, with the statements sometimes being hurtful depending on an individuals background within Trainz.

I produce British locomotives, so as examples they may not interest you. I could pump twice as many polygons into each object to create the appearance of a rounded edge, however it never will be round because it's not a vector, it's based on triangles. I don't do this because there is little to gain the more polygons you add, which would have the knock on effect of burduning the GPU. You'll then have users complaining about poor performance, and given the present environment here, said users deciding it's appropriate to personally target the asset creator because it's not to their liking.

Jack

shaneturner12
August 15th, 2015, 05:05 AM
Not likely to change....I was hoping the Trainz community was more open-minded, forward-thinking and optimistic than that.

I think not a lot of serous R&D money is put into PC railroad simulation because train buffs, mostly, are a dying breed, old men, like railroading itself. The young gaming generation is totally into Xbox. Young people are not train buffs. They like other gaming themes. It is all market demand, I guess.

I have not heard of one Xbox version of Trainz proposed also unless I am mistaken.

Would Trainz benefit by becoming an "open source" franchise world-wide, like Mozilla or Linux?

Open source software is software that can be freely used, changed, and shared (in modified or unmodified form) by anyone.

Whilst the community is forward thinking, there are some limitations which are set by the technology we currently have in several areas.

Shane

narrowgauge
August 15th, 2015, 05:21 AM
The perimeter of a circle is an infinite number of straight lines. Trainz does not have the power to handle an infinite number. 12 segments is an adequate compromise. T:ane will possibly handle more.

Oknotsen has thrown down the gauntlet. Put up or shut up. Make some content then we can pick it to pieces and you will learn the limitations and compromises that bind us all.

Peter <narrowgauge>

cascaderailroad
August 15th, 2015, 06:28 AM
You shouldn't look at things up so close, in detail ... enjoy the overall effects of the asset.

Use rotating trackside cameras, and elevate the camera, or FOV pitch view a few degrees.

A 16 sided wheel has less polygons than a 256 sided wheel ... get used to it ... or be forever forlorn over the inadequacies of Trainz.

Nothing is going to change in Trainz ... anytime soon ... you will just have to get over that "Hump"

Speaking of Hump: https://www.cubbyusercontent.com/pli...95884a3ed12789 (https://www.cubbyusercontent.com/pli/PRR%20ALCO%20LAND-Hump%20Yard%202.cdp/_3d244001afcf4ecd9095884a3ed12789) <--- Shameless plug:hehe:

nicky9499
August 15th, 2015, 06:50 AM
OP really has not a clue how 3D models work does he?

Perfect O's in Microsoft Word. LMAO.

pware
August 16th, 2015, 05:02 AM
The original poster is at the same starting point that most of us were at when we got into Trainz - apart from a few lucky individuals who already "knew it all". I shudder to recall some of the first questions that I asked in these forums - fortunately, they were all erased in the "Great Forum Crash" that occurred sometime around (??????) (apologies to fans of the cartoon strip "Bristow" and his "Great Tea Trolley Crash at Chester-Perry") when much of the forum content disappeared into the ether.

There is nothing wrong with people asking question about how this works, why this is like that, what does this do, why do we have to do it that way, etc, etc. My philosophy has always been that stupid questions are the easiest to answer and your knowledgeable answers can make you look like a genuis- that's how I survived in teaching for over 30 years!

So, please fellas, lighten up. If you don't like responding to "newbie" questions, then don't. Its simple.

Hope I have not offended.

martinvk
August 16th, 2015, 09:40 AM
Although I agree with pware in the general sense, I think there is also an obligation by the questioner to do a little research. Back in the mists of time before the Great Forum Crash, I was there too, the resources to search were much less than today. Now with Google and Wikipedia, there is so much more information available. Anyone wondering how and why round objects are simulated using a small set of triangles can find loads of information online.

As for that "round" wheel in real life, get up close with a good magnifier or a small microscope and see all the flat spots. Plationic circles are ideals. Real ones all have flats, just a difference in degree not in kind.

JCitron
August 16th, 2015, 02:39 PM
Jon,

I can add to this, though most of the stuff you questioned has been answered. This is more of a real-life very much related story on this very subject. About 20 years ago I worked for a company that created training programs for the plastics industry. I did the multimedia authoring while another teammate did the 3d modeling. Keep in mind our PCs in the office were not powerful in fact pretty paltry even for those days. The fastest machine was a Pentium 90 and that was the modeling workstation. The rest of us had 486s with less than a gig of RAM and barely enough steam to get out of their own way. even when editing text in Word.

We had a big project to do. A consulting project which required imported models from various sources with one of them being some older models generated by the company owner's brother. These were some rather nicely detailed injection molding machines which were all animated to show parts being created, rods moving, and other stuff. The 3d modeler assembled these models into the scene and setup the animation. We were using 3d Studio R4 for DOS, which like the current versions allows for multiple machines to render the scene in a round-robin fashion. This means there's a control list generated by the main program which is read by the connected workstations. Each PC only needs the software installed and no dongle or key-code is needed for rendering because nothing else is enabled. Each one of these machines, with and without the dongle, read the control file and grab whatever frames are ready in sequence for rendering. This means some of the individual images were on one machine, while some on another. In the end, they are batch copied to the final rendering machine to generate the animation. This sounds a bit complex but it's not.

Anyway, we set up the machines to render and we went home, figuring that the animation would render completely by the time we got in the next day. We came in and only 20 seconds of the full 2 minute animation was rendered! What??? Huh??. I got called to look into the problem while the animator got busy checking out the models. The workstations were all working fine. The network was there, and the control file showed who had grabbed what frames. My paltry system was already at a 100:1 disadvantage being a '486, and had rendered only 10 frames out of the 20 seconds of video.

We adjusted some things, thinking we fixed the problem and went home. Got in the next day only to find the same problem! We couldn't figure it out. The boss was getting antsy over wasted time and money and I was sent off to do something else while the animator looked at the scene again. We repeated the process again, only to have the same issue. We couldn't figure out what was going on because all the models looked fine. Hmmm... We thought. Those machines look so great, but maybe we should replace those just because, besides they were the only things left in the scene that hadn't been touched.

The animator pulled those from the scene and we tried a test animation. What had taken all night to render 600 frames of animation rendered in about an hour. Hey what's going on here... He pulled the machines apart in the modeler and found that the original guy, the owner's brother, had put nine beautifully very, very high polygon feet on the machine. Each foot was set with the highest amount of polygons capable of the software. This most polygons any of us had ever seen, let alone on something that was never seen in the video. After removing those feet, the animation rendered in a few hours overnight.

Sure things aren't always this extreme, but it shows how much smoothing can affect a model. For the most part, the Trainz modelers do a good job optimizing their models so they look good, yet aren't so overly built, like the machine feet, that the game comes to a complete stop. Even today this can become a problem and it something to keep in mind should you ever come across some really bad performance on a route. Go through and replace the assets in that area and see if that helps. It could be one of the objects is a bit heavy and dragging the system down.

John

EverTrainz
August 16th, 2015, 03:45 PM
Please do a little research on 3D modeling, and how integers are handled by GPU's. Word, and other text-processing applications have perfect, round 'O's because they are a large, pixelated, 2D texture. Using that logic, would you rather have single-sided, flat 2D wheels, with no 3D volume?

I too can only hope that one day a sort of 'virtual' polygon system would be implemented to the modelling world, but that seems out too far. If anything, it'd be nice to have seamless transitions between smooth-shaded faces and flat ones. I'd be happy if that's atleast discovered.

pware
August 16th, 2015, 05:31 PM
Word, and other text-processing applications have perfect, round 'O's because they are a large, pixelated, 2D texture.

That point links nicely to another question (another thread) by JonMyrlennBailey on the effect of the anti-aliasing setting in T:ANE. If you look very very closely at any curved text character - "c", "e", "o", etc - you will not only see that the "curve" is in fact a series of horizontal steps (the individual pixels) but that some of the surrounding pixels are greyed - or a blend of the text and background colours. This is the anti-aliasing effect and is another example of how graphic designers "fool" your eyes into thinking that the shape is a smooth curve, not a series of horizontal steps.