Mesh Renders Black
Exporting from 3DS to MS X-File format using conv3ds, I''ve typically had pretty good success with textures. However, I''m having trouble with one complex character mesh I downloaded. The mesh renders black (as if vertex materials were set very dark). I cannot get a texture to render to the mesh. When I apply the same material to a teapot (or other 3ds export), the engine renders the texture just fine. I''ve tried flipping the face normals in Max, and in conv3ds. I''ve tried modifying the material, etc. What could cause the sample mesh (teapot) to render properly?
I think someone else had a similar problem in another forum (DirectX?) recently... it was suggested that all the face normals had been scaled up, which in turn meant that all the lighting calculations ended up scaled down. Check all the normals are indeed normalised.
[ MSVC Fixes | STL | SDL | Game AI | Sockets | C++ Faq Lite | Boost | Asking Questions | Organising code files | My stuff ]
[ MSVC Fixes | STL | SDL | Game AI | Sockets | C++ Faq Lite | Boost | Asking Questions | Organising code files | My stuff ]
If I remember correctly, and maybe depending on the 3d-engine,
and render type etc. A mesh needs at least face to be smoothed,
otherwise the exporter will not include ANY info about
normals/smoothing, and the engine will not find this info,
ie rendering it black.
It worked for me anyway.
and render type etc. A mesh needs at least face to be smoothed,
otherwise the exporter will not include ANY info about
normals/smoothing, and the engine will not find this info,
ie rendering it black.
It worked for me anyway.
As we suspected, it is a problem with the normal data. When I amped up the ambient lighting, the mesh appeared as expected. However, since it had a very "flat" or "silhouetted" look, I can tell the normals are off. Specifically, when I set an exported sphere next to it, the sphere is shaded properly, while all polygons on the complex figure mesh are shaded equally, producing a "cutout" look. I guess I could try a normal modifier, smoothing, or debug output of the normal data.
Your thoughts?
Your thoughts?
Yeah. Smoothing corrects the normal information. Don''t really understand the details, but I suppose smoothing would improve the normal data by averaging the planar normals? Or maybe the model itself had vertices with no normal data in the export file so we had to prompt the software to generate them? Anyway, thanks Oakstar!
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement