model material:specular map and self-Illmination

You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers.
No questions about C++ programming or topics which are answered in the tutorials!
Post Reply
hongjunyu128
Posts: 18
Joined: Tue Sep 04, 2012 8:27 am

model material:specular map and self-Illmination

Post by hongjunyu128 »

hi everyone,i have a problem on model.
i have a .3ds model,there are four textures for it:diffuse map、normal map、specular map and self-Illmination.
i have set diffuse map and normal map for it,it looks like well.

codes like this:

Code: Select all

node->setMaterialTexture(0,driver->getTexture("D.tga"));
node->setMaterialTexture(1,driver->getTexture("N.tga"));
node->setMaterialType(EMT_NORMAL_MAP_SOLID);
but i found there are not E_MATERIAL_TYPE for specular map and self-Illmination.i have no idea what can i do.
and i have found setMaterialType() which is just can be used once,it can not mix type. :roll:
can anybody help me?i'm new coming... :D thanks a lot
mongoose7
Posts: 1227
Joined: Wed Apr 06, 2011 12:13 pm

Re: model material:specular map and self-Illmination

Post by mongoose7 »

You'll have to use a shader if you want a specular map. I think the Lighthouse tutorials have an example.
hongjunyu128
Posts: 18
Joined: Tue Sep 04, 2012 8:27 am

Re: model material:specular map and self-Illmination

Post by hongjunyu128 »

mongoose7 wrote:You'll have to use a shader if you want a specular map. I think the Lighthouse tutorials have an example.
do you mean example no.11 PerPixelLighting?i read main.cpp of it,i have found normal maps and parallax mapping.it seems that there is not specular map and self-Illmination.
Maybe you have some codes about specular map?
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Re: model material:specular map and self-Illmination

Post by hybrid »

No, it's a collection of shader examples on an external site. In Irrlicth examples you don't have such an example.
hongjunyu128
Posts: 18
Joined: Tue Sep 04, 2012 8:27 am

Re: model material:specular map and self-Illmination

Post by hongjunyu128 »

hybrid wrote:No, it's a collection of shader examples on an external site. In Irrlicth examples you don't have such an example.
can you provide me a address of the external site?thank you very much :D
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Re: model material:specular map and self-Illmination

Post by hybrid »

mongoose7
Posts: 1227
Joined: Wed Apr 06, 2011 12:13 pm

Re: model material:specular map and self-Illmination

Post by mongoose7 »

http://lmgtfy.com/?q=opengl+specular+map

(ha-ha, I've always wanted to do that!)
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Re: model material:specular map and self-Illmination

Post by hybrid »

But you were ten minutes late :-P
hongjunyu128
Posts: 18
Joined: Tue Sep 04, 2012 8:27 am

Re: model material:specular map and self-Illmination

Post by hongjunyu128 »

you mean that i have to make a sharder for specular map on opengl?Then use this sharder to create a new material type,like example no.10 sharder?
hongjunyu128
Posts: 18
Joined: Tue Sep 04, 2012 8:27 am

Re: model material:specular map and self-Illmination

Post by hongjunyu128 »

mongoose7 wrote:http://lmgtfy.com/?q=opengl+specular+map

(ha-ha, I've always wanted to do that!)
i try to do this tomorrow,thanks xoxo~ :)
Post Reply