PDA

View Full Version : large object LOD



martinvk
July 26th, 2015, 04:17 PM
Is it possible for a very large object to have different parts at different LOD levels? So the part that is where the camera is located will be at LOD0 while parts farther away can be at LOD1 or LOD2 while really distant parts can be at LOD3. Sort of like the effect when you look down the track, nearby is at LOD0 while very far away track is at LOD3. How could I do that for a static object that is not a track?

WindWalkr
July 26th, 2015, 07:11 PM
Depends on what you call an 'object'.

A single MeshObject can only be at one mesh-table LOD level at a time. If an asset is comprised of multiple MeshObjects (say, through attached child assets) then each MeshObject can be at a different LOD level.

Each LM.txt LOD file instance is evaluated independently, so a MeshObject comprised of LM files will have a number of LOD levels simultaneously.

That said, it's typically better that you should create several smaller objects rather than one massive object. It gives more flexibility to your user and is less likely to run into unexpected performance issues.

chris

martinvk
July 27th, 2015, 08:09 PM
So in order to upgrade my angle guide, I used some LOD processes. The main object is now a skeleton with only the central pivot and attachment points every 1000m in LOD0 and just the attachment points with labels in LOD1. A second object, common to all attachment points, is a 1000m set of alignment bars in LOD0 and LOD1 varieties.

From 0 to 2000m, I can rotate and see the objects. At 3000m I can still see the objects but cannot rotate them. Somewhere between 3000m and 4000m the object disappears unless I look straight down on it. Beyond that, it is not visible anymore.

In TRS2004 it was over 10km long and worked very well. Really great for aligning tracks and distant object too.

At the origin. The large LOD label is only temporary for testing
719

At 3km and it still looks OK even if I can't grab it set a rotation angle.
720

Here is the TRS2004 version, still visible at 11km
721

WindWalkr
July 27th, 2015, 11:29 PM
I'm not entirely sure what your point is, nor what the screenshots are showing. I'm guessing that you're expecting it to be visible further out than it currently is? Is this with LOD values tuned for TS12 or something else? If you think that there's an issue with the code, send in a test asset and let me know how the outcome differs from your expectations and i'll take a look at what's going on.

chris

martinvk
July 28th, 2015, 06:36 AM
OK, I'll wrap them in a CDP tonight. Remind me where to send it.

The point was to show that it used to be visible at much greater distances and could be rotated from a far too. In T:ANE it winks out past 3km and can't be selected to rotate much beyond 2km. No LOD was applied in TRS2004 so that is a difference. Perhaps the LOD I applied in T:ANE is not optimal.

So my expectations:
stay visible beyond 3km
be rotatable beyond 2km

WindWalkr
July 28th, 2015, 07:52 AM
Send to trainzdev@auran.com.

How are you achieving the distances? Placing the mesh and then backing up over multiple baseboards? Zooming out the camera? What technique are you using to measure the actual distance? What draw distance and scenery detail have you configured?

chris

clam1952
July 29th, 2015, 05:27 AM
Martin, you have an audience on this one and I've been asked mention this, I would imagine you are well aware of this but just in case.



Hi Malc,

Just looking at the TrainzDev forum and martinvk was discussing his ruler (Large Object LOD).



He mentioned that the ruler kept diappearing. I was playing with a 500m ruler which was doing the same until I realised that I was moving in front of the start of the object. When I changed my settings to 'Process Objects behind Camera the ruler came back into view.



I know he's an experienced Trainzer but he may have missed that.



Neil

martinvk
July 29th, 2015, 06:31 AM
Almost had a duh moment and was ready to be suitably embarrassed. I've seen that setting umpteen times whenever I open the Settings dialog. Since the angle guide doesn't wink-out until several thousand meters away from its insertion point, it didn't click that processing object behind camera was involved. It's been behind the camera for a long distance and besides, some of the object is still in front of the camera. But let's turn on that setting and now it winks-out just after the 4km mark. a small improvement but still not close to the 11 km that TRS2004 was capable of. Still have to prepare a package for Chris to look at but this might be a case of "as good as it gets."

"Experienced Trainzer," hmmm, thanks.

martinvk
August 2nd, 2015, 09:43 PM
Send to trainzdev@auran.com.

How are you achieving the distances? Placing the mesh and then backing up over multiple baseboards? Zooming out the camera? What technique are you using to measure the actual distance? What draw distance and scenery detail have you configured?

chrisEmail sent with a CDP
The angle-guide is placed and extra baseboards are added.
The angle-guide has little markers every 1000m to show the distance.
Draw distance was increased to 15k. Scenery detail is normal. Process objects behind the camera is checked. All other settings are at their default positions.

WindWalkr
August 10th, 2015, 11:31 PM
Email sent with a CDP

Thanks.

There are basically two issues here, neither of which I consider to be a game bug.

1. The meshes are oversized. I don't recommend going beyond about 500m for any given object, and in fact you would normally want to keep things down to the sub-50m range except in very specific cases. You will start to have problems when you exceed this kind of number, and you're exceeding it by a lot. That's likely not a direct cause of your problem here, but you should be aware of it.

2. The asset itself is only 10m in size. It's the attachments which are huge. This is the underlying cause of your problems because the game is happily removing the asset from the scene once it's invisible, and the attachments won't continue to exist once their parents are gone.

chris

martinvk
August 11th, 2015, 06:20 AM
Thanks for looking and the hints.

Oversized!? Well this is a specific case.

So 1000m is excessive. Since I've made passenger platforms with over 100 attachment points, that is where I'll be going. I hope the game likes 100m attachments. Is there any rendering efficiency since they are all identical at each LOD level?

WindWalkr
August 11th, 2015, 06:25 AM
Oversized!? Well this is a specific case.

It is, although you could probably achieve the same thing with a series of smaller assets.



So 1000m is excessive. Since I've made passenger platforms with over 100 attachment points, that is where I'll be going. I hope the game likes 100m attachments. Is there any rendering efficiency since they are all identical at each LOD level?

I'm not really sure what you're referring to here. How many object instances, and what are the approximate dimensions of each object?

chris

martinvk
August 11th, 2015, 08:50 AM
Since I'm first aiming for 5km, that would require 50 attachments, each 100m long. If that works without any issues, I'll try for 10km and 100 attachments to recreate the TRS2004 look.

Each LOD0 attachment is 36 polys and about 14m wide. The LOD1 is 4 polys and about 2m wide. Since the detailed part of the guide is only used when close up, there is no need to show it at a distance.

WindWalkr
August 11th, 2015, 08:57 AM
Since I'm first aiming for 5km, that would require 50 attachments, each 100m long. If that works without any issues, I'll try for 10km and 100 attachments to recreate the TRS2004 look.

I'm not really sure where attachments enter into it. By their nature, attachments need a mesh to be attached to, so whether you're building a 5km-long object by 5km worth of polygons or 5km worth of attachment points, you're still talking about a single 5km-long object.

In your case, what you really need to do is stop relying on attached meshes which extend so far beyond the bounds of the underlying mesh.

The intention of attachments is to allow "fiddly bits" to be implemented onto the main body of the object, not to replace the main body.

chris

martinvk
August 11th, 2015, 09:08 AM
Hmmm, that sounds like creating surveyor guides is going to be a challenge. Unless there is another way to build it, I have to rely on attached meshes since a single long mesh doesn't work either. By its very nature the angle guide has to be very long to be useful. The main body is quite small, concentrated around the insertion point. Only the attachment points are spread out to 5km or more. Tonight I'll test to see how far I can push it.

WindWalkr
August 11th, 2015, 10:30 AM
Yes, that's exactly the model that isn't working for you. You really need the mesh extents to be substantially larger if you're going to have attachments way out there.

chris

martinvk
August 11th, 2015, 10:31 PM
Back from the drawing board.

Using 100m long meshes,, attached every 100m to attachment points in the main mesh, I can almost reach 5km. The location of the compass determines when the guide disappears and the draw distance determines where that happens. There is a linear relationship between draw distance and where the guide disappears: draw distance / 3.3

Doesn't look like I'll be able to make a 10km long guide after all. :(


draw dist compass dist
15000 4510
12500 3760
10000 3010
8000 2410
6000 1810
4000 1210
3500 1060
3000 920
2500 760
2000 610
1500 470





Views at the origin and at each km mark.
742741740739738

At the maximum distance from the origin before the guide disappears. Looking back towards the origin
743

Looking towards the 5km mark which is visible but not reachable.
744