LOD's not working as expected on plane's or grid's?

I finally prepared a terrain mesh by splitting it up - https://github.com/domlysz/BlenderGIS/issues/172

And I intended to start testing applying LOD’s, initial attempts did not work.

So I opened the example LOD blend file from - https://github.com/armory3d/armory_examples/tree/master/lod

And switched to tests on simple shapes to try and understand how the LOD’s function:

Objects like Monkey, Cube and Sphere work fine and switch through the various LOD’s & different materials applied as you move away. However the Plane and Grid does not change it’s material (colour)? It appears to only show in Krom the last LOD’s material?

Anybody have an idea why this might happen?

My intention is to apply LOD’s to all of these tiles:

I’ve wondered how you would do landscape/terrain LODs. Maybe we can get a example blend , if it’s different than regular LODs.

1 Like

I might just be doing something wrong? - as Planes/Grids act a little different, for example I noticed the back face shows empty, but I assume that is expected re something to do with backface culling etc.

I have raised it as an issue so hopefully Lubos will clarify -

Feels like it’s within reach to work on terrain LOD’s if I can get past this confusion…

That is an option in the Armory Props in the Material panel for whatever material you are using. You can check “Double Sided” to have both sides rendered.

Also, does the LOD difference still occur on plains that are subdivided, i.e. more than a single quad?

Good question - I had actually subdivided my 2 existing planes a few times. But just to check I added another plane with no subdivision and that behaves the same without LOD’s cycling - or at least the material is definitely not, as I would not be able to tell if LOD mesh’s are cycling through!

Ticking ‘Two sided’ does indeed make both sides render now - I only ticked on the last LOD as that is the only one showing when run.

Hi, i opened an issue a year ago and made a feature request that wrap your issue here https://github.com/armory3d/armory/issues/385.

3 Likes

Ah I recollect seeing your article a while back - that’s amazing work.

Thought I’d update this post as a friend Miro found a work around which he posted on the github issue

“I had a look at your file and it seems that it’s mainly happening because of the fact those planes and grids have dimension Z = 0. I did a dirty trick and added a single vertex to each grid LOD’s mesh and shifted it 2 meters above grid mesh, this way it becomes “volume”(dimensionZ=2) and LODing starts working.”
Untitled-1

So LOD’s only function on a volume at the moment, for large mesh terrain it would be great to have LOD’ing possible on a grid.

1 Like

Is there any chance in the near future that LOD’s could be made to work on a grid as per findings above?

1 Like

Hi, the LOD should still work on a grid, if the grid has a volume. That is if it has some height values. If it does not have any values along the Z axis, and is simply a plane, you still can manually use the distance from the camera to the plane using a simple logic node setup and change the materials as required using the set material slot node here. And, the plane need not be a grid in the first place, since its a waste of polygons if the same can be represented by a simple quad.

Would you agree?

It would need to be a grid for my purposes as it will represent a terrain heightmap as per example below:

The testing was simply showing that both a grid and a plane did not appear to work re LOD’s

image

I guess your workaround re set material slot node, along with Miro’s trick noted above to make a grid a volume are the current options to play with.

I just tested a plain grid with a displacement modifier that had height information. I then did an auto LOD step to get the objects LODs. This essentially adds a decimate modifier on the LOD objects. I then manually changed the type of decimation of the objects from “collapse” to “Unsubdivide” since this is best suited for grids.

image

I then applied the modifiers on the LOD objects.

Then the LOD works just fine on the grid mesh as you can see.

Here is the blend file:
GridLodTest.blend (1.1 MB)

So, if your grid has a height values, LOD should work. If it does not have any height at all, then use the distance method.

2 Likes