Bump Mapping

Blitz3D Forums/Blitz3D Programming/Bump Mapping

_PJ_(Posted 2010) [#1]
I know there's a bunch of posts throughout the forums that discuss varous aspects of normal mapping and the simulation of diffuse lighting etc. but I couldn;t find anything specific to exlain clearly just how to go about using the Dot3 blend mode.
Should a bump map be loaded with any specific flags? Can they have alpha? Should they be textureds to the bottom index or on top? Do all R, G and B count towards the resultant 'height'

I've been playing with various applications of multi-texturing all day and it's really been pretty fruitless.

Can anyone help explain just what's really requi9red to get a working bump map combined with other textures?





jfk EO-11110(Posted 2010) [#2]
Didn't you find the example that Mark posted when Dot3 was implemented in Blitz? It must be searchable in the Forum I guess.. I remember there was a long discussion. The RGB channels are used for normal info, not like a heightmap. A minute..

Ross C released a heightmap to normalmap converter:
http://www.rosscrooks.pwp.blueyonder.co.uk/height_normal_bb.zip

Might be interesting what Mark said to it:

Hi,

No, there's not much to the update - I have been working on other things which will *eventually* benefit all Blitz products.

There has also been a certain amount of 'politicing' going on behind the scenes over the past year which has consumed far more time than I would have liked.

Cubemapping should be as fast as regular texture mapping. However, dynamically altering cubemaps will be as slow as dynamically altering regular textures. I recommend making sure the mipmap flag isn't set (as any alteration will cause mipmaps to be rebuilt) and/or only refreshing one face per frame or even every N'th frame.

The reason Blitz has never offered a 'render directly to buffer' option is because it is/was broken on many cards/drivers. This situation may have changed by now, but I wouldn't bet on it. This is one of several cases in Blitz3D's design where I have made a deliberate decision to sacrifice (hypothetical) performance for the sake of compatiblity. Such decisions are my call, and I stand by them! Although I understand how others may disagree...

Dot3 blending is 'unofficial'. Blitz3D's current design makes it too tricky to implement proper, generalized dot3 bumpmaps (ie: normals in 'surface space') lit by multiple lights, so I was faced with the decision to either remove plain dot3 blending or leave it in for the community to 'unofficially' play with. I left it in.

Another option would have been to provide some kind of kludge for half-arsed 'one light/object space' dot3 bumpmaps - but I'd rather spend the time working on the real thing.

I am reluctant to charge for Blitz updates, as I would therefore feel obliged to provide them (!) and this would distract me from what I feel is the 'greater good'.

I guess the bottom line is that I have my own intuition of where Blitz needs to go, and you guys are just gonna have to trust me!

Mark



I remember there was a Demo by Fredborg that showed how to make good use from the dot3 feature:
http://home1.stofanet.dk/mfredborg/DotMyBot.zip

Actually, when searching for "dot3" around here, I get a lot of threads. Like http://www.blitzbasic.com/Community/posts.php?topic=46206

Last edited 2010


Rroff(Posted 2010) [#3]
I brought this up in relation to fastext recently theres a nice way to do it with real time updating unfortunatly I can't find the thread quickly, someone was nice enough to post some fairly ready made code that works great with a few small adaptions.