Add smooth_normals option to load_blender_scene#605
Add smooth_normals option to load_blender_scene#605BurntRanch wants to merge 4 commits intopokepetter:masterfrom
Conversation
|
I think it would be better if it uses the flat/smooth setting in blender to do this. Calling generate_normals() inside the importer doesn't really have any upsides compared to just calling it after it's been imported. It's also error prone, since it would automatically replace all the normals. |
Ursina doesn't actually care about the setting, From what I found setting smooth shading did nothing, But I might be able to look for a better solution that is less error prone when I get back to my computer, From what I tested this looks good enough on its own but might be, as you said, complicating for other blender scenes. |
The normals array will always get converted to numpy and converted back to string, Which shouldn't affect the normals in any way.
|
Didn't mean to close it, My bad, But I modified the code, including updating to the latest commit which did fix smoothing, but for me, made my textures completely messed up, This should smooth the normals instead of replacing them entirely. |
This'll run generate_normals() and when generating normals in _blender_scene_to_ursina.py if smooth_normals == True, If it isn't true, then the original algorithm will be used, That's the default behavior in order to not break old code.