Normal(Bump) mapped test :D

Community Forums/Showcase/Normal(Bump) mapped test :D

Ross C(Posted 2004) [#1]
UPDATED.

Hey everyone. I've been messing around with the normal mapping stuff in blitz and combined it with my torch lighting. Check it out. Usual FPS controls :)

www.rosscrooks.pwp.blueyonder.co.uk/normal.zip






Matty(Posted 2004) [#2]
Not sure if what I saw was what I was meant to see. A limited view through a circular region at the ground which was fairly bumpy.

Also, what is blend mode 4? You used entityblend "entity",4 - I have not seen that before.


jfk EO-11110(Posted 2004) [#3]
Is there a screenie somewhere?


Ross C(Posted 2004) [#4]
I used TextureBlend 4. Which is the Modx2 lighting. The ground is normal mapped to give it a bumpy look, and adjusts to the camera angle. If you point the camera at the floor, then turn round, then you should see normal mapping in action :)

Anyway, just posted to see you opinions of it. The torchy bit, the limited view through the circular region, is supposed to be a torch light. It's kinda sucky right now :)


Ross C(Posted 2004) [#5]
.


Rob(Posted 2004) [#6]
lovely :)


MRaven(Posted 2004) [#7]
Very nice. One question though. How did you make the normal map?


Ross C(Posted 2004) [#8]
If you have photoshop, you can use a heightmap, and convert it to a normal map using an nVidia plug in. Me will check....

go here:

http://developer.nvidia.com/object/nv_texture_tools.html

And click on: Adobe PhotoShop Normal Map Plug-in

This is for purely flat stuff like walls and such. For 3d models, you need a plug in for 3dmax/Maya.

This page explains alot about it

http://www.monitorstudios.com/bcloward/tutorials_normal_maps3.html


JoshK(Posted 2004) [#9]
Your normals are backwards. If the light is at the center of that circle, shadows on the rocks should be facing away from it, not towards it.


Ross C(Posted 2004) [#10]
Ah, well it's only two polys and it's rather impossible to do that with 4 verts. I'll try a segmented mesh, and work it out from there, thanks :)


Rob(Posted 2004) [#11]
I think it's fine as it is.


sswift(Posted 2004) [#12]
Halo:
I think that what we're seeing is actually an optical illusion.

The rocks don't actually stick UP, so you can see both the near and far sides of the rocks... If the rocks stuck up, then the far side would be occluded. If you look at the near side, you can see that it is light there, just as it should be.

Apparently our brains interpret being able to see the shadow as an indentation, regardless of the fact that the lighter area is on the front side. Apparently, we ignore that.

I think on order to fix this optical illusion one needs to take into account both the light direction, and the camera direction, and if the camera is facing in the same direction as the light, only lighten the rocks, and if the camera is facing in the opposite direction of the light, ie, towards the light, then only darken the rocks.

I think you can accomplish this effect by changing only the object color and using x2 multiply blending in some way. But I'm not sure how.

I think it would require you to render the lighting before everything else, and possibly do two passes... one for the lightning and one for the darkening, but that's not acceptable. I'm not sure if you could do it in one pass, especially a second pass like here.


Ross C(Posted 2004) [#13]
Well, what i'm thinking is a segmented mesh. Finding the point where torch light hits, and it's radius. Then adjust the sounding vertexcolor accordingly.

Normal mapping is great anyways :)


JoshK(Posted 2004) [#14]
Oh, the light is from that big cylinder overhead? That's kind of a bad angle, because you don't really see any difference in the light direction. I'd like to see a shot from above of point light spreading out in all directions.


Isaac P(Posted 2004) [#15]
the source is included halo. theres no reason why you cant


JoshK(Posted 2004) [#16]
I did.

I'm not too impressed with bumpmapping. There's nothing wrong with the code, but the effect just makes me feel sick.


MRaven(Posted 2004) [#17]
Thanks for the Plugin Link... :)


*(Posted 2004) [#18]
Thanks for sharing the code, will look at this as ive always been interested in normal mapping, bump mapping etc. The only thing stopping me was the 'lighting' issues.


Ross C(Posted 2004) [#19]
The types of normal maps needed for 3d models, and not flat surfaces require the ati plug-in. I'm sure there are other programs out there that do this, but i'm only interested in flat surface bumpmapping, and this is what this is made for really :)

Most important thing in the lighting of the normal map is using entitycolor to "tilt" the normal map, to give the effect the lighting has changed.

EntityColor ground,RED,GREEN,BLUE


Adjusting the red part of entitycolor, will shift the lighting along the x-axis. A value of 128 means the light will be central along the x axis. <128 wil be -x and above with be +x. So Red=255 will make the lighting to the far right.

Same goes for green. anything less than 128, and the light will be shifted up the way, more than 128, and the light will be shifted downwards.

The blue channel determines the height of the normal map, or the distance the light source is. So a low value of Blue, will mean the light will be faint, a high value will mean the light is bright and close. I found that the highest value sometimes doesn't give a good look, but you'll need to mess about with it :)

Hope that helps some people out a bit :)


Ross C(Posted 2004) [#20]
Updated the Zip. Now contains a WALL :o

Gasp in amazement, lol


Dreamora(Posted 2004) [#21]
Looking cool

especially it runs with everything above GF1 ( everything that is T&L capable)

far better for users like me that have no shader card :-)


halo: it is just a lightning trick out of the time when Shader did not exist. everything more modern won't show up on your card anyway ( like on mine ) our border is the Dot3Bumpmapping :)


Ross C(Posted 2004) [#22]
Oh, i didn't realise it was an older feature. That's cool, thanks for testing :)