I have imported a mesh with LODs but it doesn't work. In this case it is a "manual" LOD because I have a separate mesh so it doesn't just use the same vertex buffer with a different index buffer specifying fewer triangles (I think that is the difference between manual and automatic LODs, correct me if I'm wrong). The code/comment at OgreMesh2.cpp-546 seems misleading because it says "So far we only import manual LOD levels." and then it only gets the LOD values from the mesh "if( !mesh->hasManualLodLevel() )".
So, overall, what's the current status of LODs? Am I missing something?
Thanks
[2.1] Are levels of detail (LODs) supported?
-
- Halfling
- Posts: 83
- Joined: Sun Feb 21, 2010 4:58 pm
- x 28
-
- OGRE Expert User
- Posts: 1148
- Joined: Sat Jul 06, 2013 10:59 pm
- Location: Chile
- x 168
Re: [2.1] Are levels of detail (LODs) supported?
Working for me using autogenerated lods:
and:
Code: Select all
Ogre::LodStrategyManager::getSingleton().setDefaultStrategy( "screen_ratio_pixel_count" );
Code: Select all
Ogre::MeshLodGenerator::getSingleton().generateAutoconfiguredLodLevels( myMesh );
-
- Halfling
- Posts: 73
- Joined: Tue Jun 14, 2016 12:26 pm
- x 19
Re: [2.1] Are levels of detail (LODs) supported?
For manual LODs check this thread:
viewtopic.php?f=25&t=93330
I am using SolarPortal's workaround and it seems to work fine.
viewtopic.php?f=25&t=93330
I am using SolarPortal's workaround and it seems to work fine.
-
- Halfling
- Posts: 83
- Joined: Sun Feb 21, 2010 4:58 pm
- x 28
Re: [2.1] Are levels of detail (LODs) supported?
What SolarPortal is doing is to simply assign values to mLodValues. That still assumes the LODs use the same vertex buffer as the original mesh with a different index buffer with fewer triangles (and I have actually tested that as well). I need to use a different mesh at each LOD, with different vertices. After digging through the code I found that v1 meshes use an array of MeshLodUsage (mMeshLodUsageList) to store LOD info and for "manual" LODs it stores the mesh name and loads it when needed. OgreMesh2.cpp has a bunch of commented code which references mMeshLodUsageList so I can confirm that this is not implemented.
And now I'm wondering what is necessary to support this feature.
And now I'm wondering what is necessary to support this feature.