I’ve done a quick search, and I saw a couple of posts that looked similar, like THIS, but they don’t address my issue, which is really quite simple, to be frank.
I have a model, I select it’s geometry (in the SceneComposer), I hit Tools, Generate LOD, and I set the levels. I hit finish, and I look at the geometry’s properties, and my level of details are there. I close it, and I write the code that comes with it (per the docs for the LOD), and I run the code. It crashes, saying there is no LOD set on this mesh. I open up the Geometry in the SceneComposer again, and it’s right, my LOD is gone. Why didn’t the LOD save?
Save is greyed out as an option, so it either already saved, or doesn’t think a change has been made to save. What am I doing wrong?
Thanks @normen. That worked. But imagine I shouldn’t have to do that. Anything I can do to help fix that? Or is it already in the works.
Plus, if I could ask on more question. How do I set the distances for which the LOD’s kick in? Or rather, is that possible? Reading the LodControl tells me it determines the levels of details based on the area in pixels that the spatial takes up on the screen, and that it uses trisPerPixel to calculate what LOD it should be at. Should I be fiddling with trisPerPixel to achieve the appropriate LODs at the right distances?
@machspeeds said:
And I call myself a game developer...
Thanks @normen. That worked. But imagine I shouldn’t have to do that. Anything I can do to help fix that? Or is it already in the works.
Plus, if I could ask on more question. How do I set the distances for which the LOD’s kick in? Or rather, is that possible? Reading the LodControl tells me it determines the levels of details based on the area in pixels that the spatial takes up on the screen, and that it uses trisPerPixel to calculate what LOD it should be at. Should I be fiddling with trisPerPixel to achieve the appropriate LODs at the right distances?
I’ll look into it. The “can save the file” event not always fire as it should.
About the second question you do it through the LOD control yes.But you can make your own LODControl that kicks the LOD whenever you want.
My own LODControl? Or extend LODControl? Plus, using the trisPerPixel does work, which is fine with me, unless their is an efficiency issue with it. And if there is more customizing to be done with the LODControl, I’d be happy to fiddle around with.
EDIT:
Now that I look at it, are you suggesting I perhaps extend LODControl and override the controlRender? I don’t understand how the distTolerance is working in it, so I wouldn’t be sure how to begin that.