Closed lordfeck closed 2 years ago
Hey, thanks for reporting this!
I've fixed the issue, please pull and recompile.
That error is very misleading. c-ray currently doesn't support ngons. The wavefront parser encountered some in the mesh you provided, and then silently swallowed that error because I don't build with assertions in release mode. Whoops! So the error you're seeing is just a side effect of the asset parser continuing in an unknown state after that silent error.
I've modified the parser so instead of asserting, it now skips ngons and shouts into the debug log (which you can see with the -v flag) that it found one. The scene you provided works now. I took the liberty to modify it a bit, and I've attached it here. I just loaded an environment map and a ground plane to give a bit more context. You are free to use this scene file I provided for any purpose.
You can see that the armchair has some gaps in a few places, these are the ngons that were (mostly) skipped during parsing. You can re-export the mesh with only triangles and quads, and the gaps should go away.
armchair2-2022-01-04T20:05:22.zip
Let me know if you encounter any further issues - c-ray is still experimental software, and especially the asset parsing likely contains many bugs. And thanks again for checking this out! Always fun to see someone else giving it a go.
Tagging @lordfeck since I noticed I don't get notified by GH unless I get tagged.
@vkoskiv Thanks very kindly for the prompt and detailed response, I wasn't expecting it at all! I've since rebuilt with your latest commits and I can confirm the bug is fixed :ok_hand:
I've enjoyed playing with C-Ray! If I ever make my own 3D models I know where I'll have them raytraced. There is still much of 3D rendering that is unknown to me...
Thank you for the nice bug report! I'll close this issue since it's resolved, but if you have any further questions or ideas for improvement, feel free to open further issues or ping me on discord directly with the handle vkoskiv#3100
When I run c-ray with the attached JSON file, I get the following error:
armchair.zip
I'm trying to render an armchair OBJ file I found on the internet (included are textures and mtl file). I'm not sure why the error is happening.
@