Specular map

Blitz3D Forums/Blitz3D Programming/Specular map

HNPhan(Posted 2004) [#1]
now that we can use Normal maps, has anyone tried coding specular pass? Ive looked at some sites and it seems that its possible to do it with Cubic maps...


Rob(Posted 2004) [#2]
www.redflame.net/d3b3d

To do this, create a small white blob texture. Then code a routine that does sphere mapping but from any viewpoint. Voila!


mrtricks(Posted 2004) [#3]
Lovely!


Avrigus(Posted 2004) [#4]
Excellent! Is it possible to isolate surfaces or textures on the model so that some parts have high specularity and others do not (eg. have the fat zombies skin highly specular while the clothing is not).

P.S. Any chance of a peek at the source code?


HNPhan(Posted 2004) [#5]
very nice, so your saying to put a spherical map or cubic map using the new modulate 2x blending mode eh?


HNPhan(Posted 2004) [#6]
** hey it works! **
sweet :D

http://invis.free.anonymizer.com/http://www.geocities.com/cgi008/specular_001.jpg

btw, what did u mean by Modulate 4x?
i thought we only had modulate 2x


Picklesworth(Posted 2004) [#7]
ooh, I've got to try this! This could be altered to achieve some pretty nice lighting in blitz...


Avrigus(Posted 2004) [#8]
I've got it working now as well, looks very nice! I'm loving this dot3 stuff, with kick ass high poly original models this effect looks amazing. I'm working on a character right now but since it's all high poly modeling to start with i'm afraid it'll prolly take me a few months to get the darn thing finished! ;-)

Anyway I was wondering if anyone can give me some coding pointers regarding the orientation of the specular spherical map relating to the position of the light entity. I just can't seem to get it working because it always wants to orientate itself to the camera. Any help would be grand!


HNPhan(Posted 2004) [#9]
use cubic map, its much easier and better results if you need realtime light movement where the specular follows the light


Avrigus(Posted 2004) [#10]
Cool, cubic map it is then. Now do you just create a cubic map where the small white "blob" is on the front projection or is it possible to create the cubic map and dynamically draw a specular highlight that moves position based on the light source orientation?

I've almost got it working just need a little help getting this specular map to move with the light.


HNPhan(Posted 2004) [#11]
you create the cube map from the reflective object's position, and then render only the light on the cube map on each frame.


Picklesworth(Posted 2004) [#12]
umm, I'm lost here. Can someone please post their source for this and I'll eventually pay you back with something? I've thought of a potential shadow system that could be done with this effect. Probably once I see this done with cube mapping I'll have it all figured out.
Thanks in advance!