Hello.
I've got some models imported from AC3D via 3ds format. Although I can mark the surfaces as "smooth" in AC3D once in Irrlicht the dynamic lighting shows distinct edges along each surface. I'd like to get rid of this effect. I've written a couple of software renderers (many years ago) and would have done normal interpolation to smooth out the colour changes but I guess this is rather old fashioned now.
What's the "right" way to do this in Irrlict? (Or at least the right way to achive the same aim: hiding surface edges with smoothed lighting.)
The per-pixel lighting tutorial talks about createMeshWithTangent() in the context of parallax mapping but then requires an external normal map which it then applies to the mesh. I don't understand how I can generate a normal map for a whole model without a 1:1 mapping between uv space and the model surface (which I don't have).
Thanks,
Martin.
Smoth lighting
Re: Smoth lighting
You can call createMeshWithTangents() without a normal map. But you may need parallax mapping to do per-pixel lighting if you are not using your own shader. If you want a flat normal map, go into a paint program and set a colour as (127, 127, 255). Then create a small image with this colour. Make the image a power of 2, like 16x16, though I think you can use a 1x1 image.
Re: Smoth lighting
Thanks for the reply.
It turns out the answer is to import from a wavefront .obj file, not a .3ds file. You can then turn on Gouraud shading and your edges get smoothed out slightly.
It turns out the answer is to import from a wavefront .obj file, not a .3ds file. You can then turn on Gouraud shading and your edges get smoothed out slightly.
Re: Smoth lighting
You need to use a pixel shader that's all. 3ds loader does not support smoothing.