Bump Mapping

Blitz3D Forums/Blitz3D Programming/Bump Mapping

QuickSilva(Posted 2003) [#1]
Oooo I cant wait for bump mapping to be added to Blitz. I`ve just been playing with Unwrap3D which now has bump mapping and it`s ace. Anyone else looking forward to it in a future update?

Jason.


jhocking(Posted 2003) [#2]
Looking forward I suppose. Don't have the hardware for bump mapping but it'll look cool on my yet to be purchased new computer. Right now I'm mostly still giddy over the addition of cube maps.


Rob(Posted 2003) [#3]
Bump mapping is in blitz now, there's several demos - search the forums! The commands are just not documented...


fredborg(Posted 2003) [#4]
Like the one in my sig :)


jhocking(Posted 2003) [#5]
That's a cool demo, but it doesn't appear to use any undocumented commands as Rob mentioned. Was that a joke?


Ross C(Posted 2003) [#6]
TextureBlend texture,4

That 4 flag isn't in the docs :o)


jhocking(Posted 2003) [#7]
Ah, I see now. So what exactly does that do? And don't just say "bump mapping" because clearly he is using a bunch of code for stuff like updating vertex normals; what is Blitz doing for you?


Ross C(Posted 2003) [#8]
Blitz is using DOT3 texture blending to blend the texture with the one(s?) below. Think it uses a normal map or something too. I don't know the ins and outs of it, but some ppl have managed some bumpmapping with it. I had a shot myself, but i turned out terrible :S


QuickSilva(Posted 2003) [#9]
Do you think that there will be an option to just load a grey scale image and use it simply as a bumpmap like in UnWrap3D?

Jason.


Ross C(Posted 2003) [#10]
I hope so. The current way looks a bit complicated to me :)


John Pickford(Posted 2003) [#11]
I imagine it should be possible to convert a greyscale bump map to a normal map (compare neighboring pixels to work out the normals).

It might be an idea for Blitz to have this built in even.


Neochrome(Posted 2003) [#12]
This DOT3 texturing will take up alot of processor power?


Gabriel(Posted 2003) [#13]
This DOT3 texturing will take up alot of processor power?


No. But constantly recalculating all the the normal map might.


jhocking(Posted 2003) [#14]
Hm, I really hope there will be some way, either directly or by an automatic converter, to use the simple greyscale bump maps. Those are a lot easier to work with than full-color normal maps; specifically, it is feasible to paint a bump map by hand but normal maps pretty much have to be created via some algorithmic process.


fredborg(Posted 2003) [#15]
There is a greyscale bumpmap to dot3 normalmap converter in the example posted by simon. You can get it from the first post in this thread. I'm not sure if it's totally correct, but it seems to work!


Neochrome(Posted 2003) [#16]
is DOT3 going in to Blitz? this Bumb mapping could be usefull. you can imagine it, a game inside the body (like microcosm cd32 amiga)


Gabriel(Posted 2003) [#17]
is DOT3 going in to Blitz?


Stop dozing :P It's already in Blitz.

Having said that, I've seen all the demos, and while some of them are very clever, the effect is not very effective. JFK's alien skin demo looks gorgeous in places ( around the corners mainly ) but everything else I've seen just looks like a shadowmap.

At first I thought it was just me, but then I downloaded Quest3d demo edition, and verified how bumpmapping should look, and Blitz is way off.


inneractive(Posted 2003) [#18]
I really hope there will be some way, either directly or by an automatic converter, to use the simple greyscale bump maps


Your in luck (if you use Photoshop). NVIDIA has a free downloadable Photoshop plugin that converts greyscale bump map images into normal maps. At the bottom of the list:
http://developer.nvidia.com/object/nv_texture_tools.html

Im sure most higher end 3D applications output normal mapping. I use Lightwave and it does. Here are some video tuts:
http://www.simplylightwave.com/movie_pages/tutorial.mhtml?tut_id=517


Also, a lower cost app I like called ZBrush is beta testing normal mapping output for its next update. Check out the cool screenshots here:
http://www.pixolator.com/zbc-bin/ultimatebb.cgi?ubb=get_topic&f=1&t=011757

More ZBrush:
http://www.pixolator.com/zbc-bin/ultimatebb.cgi?ubb=get_topic&f=1&t=012018


jfk EO-11110(Posted 2003) [#19]
Thanks for the links, I'll try the photoshop plugin, hop it works with ps6 and the way blitz uses dot3.
the screenshots from the zbrush forum (displacement map) look absolutely amazing, no doubt, but don't expect to get this in realtime because the CONTOURS of the mesh will never look like this, even when you have correct bumpmapping using normalmaps. Correct me if I am wrong. As I understood it, bumpmapping will pixel-shade the surfaces of the Mesh, but the shape of the mesh remains unchanched, also the number of Polygons remains the same.

Anyway, I hope I can get some nice effect with the ps plugin. Like Doom3 works: first design a cool detailed mesh with 250'000 Tris, then make a normalmap from this. then reduce the polycount to approx. 1400 and apply the normalmap to this lowpoly mesh.


Neochrome(Posted 2003) [#20]
any tutorials on how to do these.. I dont understand this at all ;o(


jfk EO-11110(Posted 2003) [#21]
well, the photoshop plugin is not very useful because how should a Bitmap know how the surface should be shaped? Ok, you can assign some patterns, like scares or pox or whatever. But the idea was to use the details of a highpoly model as a bumpmap (things like muscles, bones, cloth etc. see Robs demo)

So the easiest way is to use a modeling Application that is capable of exporting a normals map. this will act as a kind of heightmap, but not for a terrain, rather for a fake-structure of the surfaces of the model. So when your highpolygon version of the model has a lot of details, these details will be drawn on the normalmap, just like a heightmap, using sightly diffrent method with colors instead of dark and bright pixels, which allows to define the normal angle of each pixel using unique colors. This is why the normal maps are looking like a rainbow.

So when you have saved the normal map of the highpoly Model you can assign it to a lowpoly version of the same model. The only challenge I see here is to get the same UV-Mapping like on the highpoly Mesh.

ATM I didn't understand how to define the position of the light dynamicly...

Maybe somebody can help us here.


Who was John Galt?(Posted 2003) [#22]
Ho ho

FREDBORG-

I asked about bump mapping a while back and you said something like 'see if you can figure out how the one in my sig works'. Dunno why now but I imagined I would just find a .exe at the end of the link, kind of 'hey look at what I can do'...... didn't realise the code would be there. Thanks for sharing. I'll take a look.


Who was John Galt?(Posted 2003) [#23]
Well I haven't figured out the finer details of bump mapping yet, but I have managed to create pure evil. Anyone who has Fredborgs bumpmapping demo try the following to see what I mean;

Replace
cube=LoadMesh("head.x")

with

cube=CreateCube()

Think JimBloat on steroids.


jfk EO-11110(Posted 2003) [#24]
Indeed, I just saw this. Thanks a lot, Fredborg! I just used to set the light distance to 15 and it looks pretty much like those zombies in doom3.

Oh no! Now I need to edit my whole engine ;)


inneractive(Posted 2003) [#25]
well, the photoshop plugin is not very useful because how should a Bitmap know how the surface should be shaped?


umm, heightmaps, bumpmaps and normalmaps are bitmaps... It is my understanding that normalmaps define per pixel lighting, which creates the illusion of high numbers of polygons.

"The plugin requires DirectX 8.0 or later to be installed. The dynamic preview window, located in the upper left corner, shows an example light that is moved with the CTRL + left-mouse-button. You are able to clamp or wrap the edges of the generated normal map by selecting or deselecting the wrap check box. The height values of the normal map can be scaled by providing a height value in the Scale entry field."

To learn more about how to use it check out this link:
http://www.gamedev.net/columns/hardcore/dxshader1/page3.asp

the screenshots from the zbrush forum (displacement map) look absolutely amazing, no doubt, but don't expect to get this in realtime because the CONTOURS of the mesh will never look like this, even when you have correct bumpmapping using normalmaps


The (displacement map) can be extracted as a normal map. That image is a 281 poly torso with a 16bit displacement map, which can be extracted as a normalmap. 281 polys sounds great for realtime to me.


inneractive(Posted 2003) [#26]
Here is a good explanation of normalmaps:
http://members.shaw.ca/jimht03/normal.html


jfk EO-11110(Posted 2003) [#27]
don't confuse displacement maps with normal maps. with normalmaps and bumpmaps you cannot modify the CONTOUR of the Mesh, unlike with Displacementmaps and heightmaps.

If a terrain could use Normalmapping to modify its CONTOUR, then it would have a total of 2 Triangles...

So the Pictures on the zbrush forum ( http://www.pixolator.com/zbc-bin/ultimatebb.cgi?ubb=get_topic&f=1&t=011757 ) has a lot more than 280 something Tris. The Model might be stored with 280 Tris in a file, but the displacement produces several thousand Tris on the fly and if there was a TrisRendered Info, it shurely wouldn't say "280".


IPete2(Posted 2003) [#28]
What I want to know is what vegetables do you guys eat? Y'know to get so blummin' Brainy?!!!?!?!

Fredbourg your demo is fantastic - thanks for sharing!


Best regards,

IPete2.


Neochrome(Posted 2004) [#29]
Iv got it! it works!!!

that BumpMyBot demo really opened my eyes! To anyone out there, im not a "good-idea" man take a look at this demo, it realy does work!

Still it would be easy if blitz did it for you, but hay, wheres the fun in that!

hehe, this is easy! i took time to study the example and it works by using vertex colours at different channels!

it works, its FAST!

Thanks for the photoshop plug-in link...