Apply Bumpmapping to Q3 Level

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
Lambda
Posts: 126
Joined: Wed Feb 27, 2008 3:00 pm
Location: Spain, Huelva
Contact:

Apply Bumpmapping to Q3 Level

Post by Lambda »

I have been trying to apply bumpmap to the Q3 example of the Irrlicht SDK without success.

I have read the PerPixelLighting example and checking how its done, i have made something similar but without success.

Does anyone have a idea to achieve this?
Image
Katsankat
Posts: 178
Joined: Sun Mar 12, 2006 4:15 am
Contact:

Post by Katsankat »

It is done via a Q3 shader.
Lambda
Posts: 126
Joined: Wed Feb 27, 2008 3:00 pm
Location: Spain, Huelva
Contact:

Post by Lambda »

Katsankat wrote:It is done via a Q3 shader.
Yes i have seen that, but is a fake bumpmapping since its rendered into the lightmap, i want to make users able to enable/disable the bumpmapping from the game options.

Also, i have been testing some other things and i have got it "working" with some errors.

If i call createMeshWithTangents the lightmaps are screwed up.
I dont want to have a light in the scene to view the bumpmapped surface, if i dont put any light the surface is black.

Any ideas?
Image
FuzzYspo0N
Posts: 914
Joined: Fri Aug 03, 2007 12:43 pm
Location: South Africa
Contact:

Post by FuzzYspo0N »

Bumpmapping is a technique that fakes depth USING Light. You cant do it without light, unless its faked.

Try setting the materials type to be EMT_LIGHTMAP_LIGHT_ (it might be called emt_light_lightmap_) That allows lightmaps to exist, as well as allowing the light to affect the mesh still (allowing bump maps).

The most probable cause of errors is the fact that the normal map / bump shaders use a specific texture channel , and the lightmaps might be using that same channel ( 1 )
Kalango
Posts: 157
Joined: Thu Apr 26, 2007 12:46 am

Post by Kalango »

Have you tried to load them on irredit and then readapting them?
Lambda
Posts: 126
Joined: Wed Feb 27, 2008 3:00 pm
Location: Spain, Huelva
Contact:

Post by Lambda »

Kalango wrote:Have you tried to load them on irredit and then readapting them?
I Want to use the Q3 lightmaps, but well, viewing the situation i should use the fake bumpmapping from the q3map2 (wich i cant get it working :/)
Image
Post Reply