LOD Help Please - NOW SOLVED

Your forum for all discussions around Modding.
User avatar
Dezza69
Posts: 375
Joined: Sun Aug 05, 2018 11:36 pm

LOD Help Please - NOW SOLVED

Post by Dezza69 »

Hello,

Am setting up LOD on a transformGroup on a map.

The close LOD (eg LOD0) doesn't display anything, when you get close has nothing visible.

The distance LOD (eg LOD1) is set to 300 and works, the shape is visible and "blends away" as you get close as would be expected.

Any hints to get the close LOD working please???


Thanks heaps...
Last edited by Dezza69 on Wed Aug 21, 2019 2:53 pm, edited 1 time in total.
User avatar
mcatalyst
Posts: 336
Joined: Tue Sep 22, 2015 6:19 am

Re: LOD Help Please

Post by mcatalyst »

Dezza69 wrote: Sun Aug 18, 2019 4:10 pm Hello,

Am setting up LOD on a transformGroup on a map.

The close LOD (eg LOD0) doesn't display anything, when you get close has nothing visible.

The distance LOD (eg LOD1) is set to 300 and works, the shape is visible and "blends away" as you get close as would be expected.

Any hints to get the close LOD working please???


Thanks heaps...

Code: Select all

        <TransformGroup nodeId="166933" lodDistance="0 100">
          <Shape shapeId="155" name="LOD0" clipDistance="100"/>
          <Shape shapeId="156" name="LOD1" clipDistance="300"/>
        </TransformGroup>
LOD0 = 0 - 100 distance
LOD1 = 101 - 300 distance
300+ is nothing.
Myrithis - Catalyzer Industries
User avatar
Dezza69
Posts: 375
Joined: Sun Aug 05, 2018 11:36 pm

Re: LOD Help Please

Post by Dezza69 »

Thank you for your reply and example.

Thought this would have been a fairly straight forward thing, yet for some reason it just isn't working for me. Obviously I'm doing something odd.

If two simple shapes (cubes) are created in a new file in the editor and inserted into a transformGroup set as an LOD master, the first shape inside the main LOD transfer group shows at distance and the second shape shows close!

This is what the editor created, which (for me) provides the behaviour described above - the first cube shows at distance and the second one close!!!

Code: Select all

    <TransformGroup name="LODTest" nodeId="7" lodDistance="0 300">
      <Shape shapeId="1" name="cube" translation="350 0 0" clipDistance="10000" nodeId="8" materialIds="4" distanceBlending="false"/>
      <Shape shapeId="1" name="cube" translation="350 -10 0" clipDistance="10000" nodeId="9" materialIds="4" distanceBlending="false"/>
    </TransformGroup>
When my Blender 2.79 meshes are used, the first shape (or transformGroup if used instead) never shows, it's always only the second.

Do the meshes/shapes need anything special, like a specific UV or the normal aligned to 37.8degrees toward the direction of Mars or something?? :lol: :lol:
User avatar
Dezza69
Posts: 375
Joined: Sun Aug 05, 2018 11:36 pm

Re: LOD Help Please

Post by Dezza69 »

Ok, worked it out!

For anyone else producing their own models and wanting to use LOD - be aware of your objects' "origin".

The model being played with (my first model where I wanted to use LOD ) was really, really big, and had it's origin set at "0.000, 0.000, 0.000" with the object being positioned on the map from inside the model shape itself. This is because I thought that it looked far neater in the map i3d having all the translations of "permanent fixtures" set to 0.000!!!!!

Yes, silly, OCD me! :blushnew:

Now the origin is set to the actual object, not a zeroe'd position - everything works as expected as the camera approaches the model, instead of moving away from it's origin.

Here I was thinking the normals needed aligning to some specific point on Mars...

Hope my hours of frustration help someone else at some point!
User avatar
Emanuel83
Posts: 965
Joined: Fri Aug 23, 2019 7:12 am

Re: LOD Help Please

Post by Emanuel83 »

Dezza69 wrote: Wed Aug 21, 2019 2:50 pm Ok, worked it out!

For anyone else producing their own models and wanting to use LOD - be aware of your objects' "origin".

The model being played with (my first model where I wanted to use LOD ) was really, really big, and had it's origin set at "0.000, 0.000, 0.000" with the object being positioned on the map from inside the model shape itself. This is because I thought that it looked far neater in the map i3d having all the translations of "permanent fixtures" set to 0.000!!!!!

Yes, silly, OCD me! :blushnew:

Now the origin is set to the actual object, not a zeroe'd position - everything works as expected as the camera approaches the model, instead of moving away from it's origin.

Here I was thinking the normals needed aligning to some specific point on Mars...

Hope my hours of frustration help someone else at some point!
Althought an old post, thanks a lot... had the same issue and your tip saved me from headache... its fully logical after I saw your post and after I corrected the origin... the origin is where the distance calculation starts... *thumbsup*

But you don't find much info about the lod system unfortunately
Des is gkupft wia ghatscht und bis zum Heiratn is wieda guat :coolnew:
Post Reply