Astral-C / PyJ3DUltra

Python Bindings for J3DUltra
MIT License
3 stars 1 forks source link

Sort function doesn't handle transparent materials well #4

Open LagoLunatic opened 2 weeks ago

LagoLunatic commented 2 weeks ago

Test model: model.zip

With PyJ3DUltra's current sort function, the water in this custom model renders like this: image

It renders correctly in Jekyll: image

If I copy Jekyll's sorting function (SortFuncTest) to PyJ3DUltra, it fixes the water: image But moving or rotating the camera from its default position at all makes most of the model start rendering as transparent, which didn't happen with the original sort function: image

I'm not sure what's causing this rendering issue, but it happens for both the example test/model_viewer.py in this repo, and for GCFT, but not in Jekyll, so I suspect it's an issue in this repo and not with J3DUltra or GCFT's code.

Astral-C commented 2 weeks ago

Yeah the default sort method isn't very good, should probably make it so user code can define and set the sort function.