Hello everybody,
specular lights don't look good with gouraud shading and low poly models. What do I have to do to get nice looking specular light on my low poly b3d sphere?
bye
Speculars with Gouraud on low poly
Re: Speculars with Gouraud on low poly
Use a pixel shader. The normal will be interpolated and should give you what you want.
Re: Speculars with Gouraud on low poly
Hello, so you say i should create a normal map in blender, save it as JPG and then load it in irrlicht, put it in material slot 2 and set the ~EMT_NORMAL_MAP material flag?mongoose7 wrote:Use a pixel shader. The normal will be interpolated and should give you what you want.
Why cant b3d (as irrlichts most favorit model format), not include a normal map
Or is there a alternative method that shortens the process? at the moment it is:
1. Blender: create and export model as FBX
2. Blender: create and export normal map as JPG
3: fragmotion: import FBX, export as B3D
4. irrlicht: load model as mesh
5. irrlicht: load normal map JPG as model-material-set-2
6. irrlicht: set model-material flag to normal map
7. irrlicht: drawAll()
I guess this is the workflow everybody is using?
Re: Speculars with Gouraud on low poly
Presumably you had already done something like this in order to make the statement in the original post. But, regardless, Irrlicht won't give you good specular on low poly models, so you will have to write a pixel shader. Therefore, it doesn't matter about setting the material, you just need to pass your textures to your pixel shader. And because the normal map is only valid in "tangent space", you will need a vertex shader to map the eye and light vectors into that space.
Re: Speculars with Gouraud on low poly
but wait, i thought that because irrlicht explicitly supports that material flag, it will create a standard pixelshader itself and use that and therefore make dealing manually with a pixelshader obsolete here (normalmap case). so you still have to manually create the pixelshader and implement the normal mapping? i hoped for a more comfortable solution for this very popular use case 
uhm, in the desciption of emt_normal_map_solid, i must totally misunderstand what is says:
quote:
EMT_NORMAL_MAP_SOLID = A solid normal map renderer.
First texture is the color map, the second should be the normal map. Note that you should use this material only when drawing geometry consisting of vertices of type S3DVertexTangents (EVT_TANGENTS). You can convert any mesh into this format using IMeshManipulator::createMeshWithTangents() (See SpecialFX2 Tutorial). This shader runs on vertex shader 1.1 and pixel shader 1.1 capable hardware and falls back to a fixed function lighted material if this hardware is not available. Only two lights are supported by this shader, if there are more, the nearest two are chosen.
What does that mean? it talks about it as a "map renderer" and SHADER. yet you say this material flag is not important for my case. am very confused!
uhm, in the desciption of emt_normal_map_solid, i must totally misunderstand what is says:
quote:
EMT_NORMAL_MAP_SOLID = A solid normal map renderer.
First texture is the color map, the second should be the normal map. Note that you should use this material only when drawing geometry consisting of vertices of type S3DVertexTangents (EVT_TANGENTS). You can convert any mesh into this format using IMeshManipulator::createMeshWithTangents() (See SpecialFX2 Tutorial). This shader runs on vertex shader 1.1 and pixel shader 1.1 capable hardware and falls back to a fixed function lighted material if this hardware is not available. Only two lights are supported by this shader, if there are more, the nearest two are chosen.
What does that mean? it talks about it as a "map renderer" and SHADER. yet you say this material flag is not important for my case. am very confused!
Re: Speculars with Gouraud on low poly
There is only one shader in Irrlicht, it is a parallel-mapping shader, coded in assembly. You tell me, but I don't think it supports specularity. But if EMT_NORMAL_MAP_SOLID works for you then good luck with it.