Marzac / le3d

A straightforward and easy to use 3D software renderer for real-time retro graphics.
https://marzac.github.io/le3d/
MIT License
60 stars 6 forks source link

only half of triangles being renderered from .blend file #21

Closed m0ppers closed 6 years ago

m0ppers commented 6 years ago

Created a simple sphere with blender...unfortunately only half the triangles are rendered.

The same happens to me when using the standard cube of blender. My .obj file is looking different. Is there a special flag when exporting that is currently mandatory?

Here is my file (really just a standard sphere 16x16)

https://www.file-upload.net/download-13132510/sphere.blend.html

After copy pasting the .obj from the examples the cube is looking fine.

grafik

Marzac commented 6 years ago

Here are the flags I use with Blender:

flags

Please note that there is at now a severe limitation in the obj file importer code. Texture coordinates MUST be exported, normal coordinates MUST NOT be exported. The parser is not yet flexible enough and I am going to fix this very soon (and include the obj exporter too).

m0ppers commented 6 years ago

That worked :D Thank you :)

Also the engine requires textures. I was thinking that I could create primitives with a fixed color using cpp only without having to use blender but I got hard crashes here:

https://github.com/Marzac/le3d/blob/master/engine/rasterizer_float.cpp#L97

So I went back to blender. No problem for now :)

Marzac commented 6 years ago

I have opened issues 15 & 16 for this problem.