stride3d / stride

Stride Game Engine (formerly Xenko)
https://stride3d.net
MIT License
6.34k stars 919 forks source link

LOD: Add a LOD script #39

Open xen2 opened 5 years ago

xen2 commented 5 years ago

Idea is to allow users to have LOD with a small custom script, while a better system is being designed. Starting point for such a script: https://github.com/xenko3d/xenko/issues/37#issuecomment-410456584

It could either be an asset template or a component in the Engine class (first option is maybe better so that it is not hardcoded in engine and user can customize/extend it).

Probably need to adjust how to find current camera, and ideally gamestudio should automatically fill the ModelComponent to the one contained in the Entity this script is added to.

kalysti commented 2 years ago

Working on a pr. Coming asap..

kalysti commented 2 years ago

Auto Lod is ready to rumble. Currently there is just one issue. For some reasons i cant generate Thumbnails. So mby somebody else can help me to understand the issue. image

tebjan commented 2 years ago

That's great news, thank you and welcome to the community!

If you make a PR and mark it as draft we can look into the code and make better suggestions. You could also point to the code where you want to generate the thumbnail.