ursina
ursina copied to clipboard
Add smooth_normals option to load_blender_scene
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.
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.
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.
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.