Login or Signup

Virtual Bump Mapping using > 500.000 tris!

Community Forums/Showcase/Virtual Bump Mapping using > 500.000 tris!

bytecode771+ years ago #1
I've been working on a nice effect here. It is not quite bump mapping, but it is virtual bump mapping! That means, that instead of a bump map, we will use a height map here, that will simulate it. One sample is using 13.000.000 tris. It is not for use and never will be! But sure, it is a very nice effect, isn't it?


(They should appear in the gallery very soon!)

Download: http://stuff.dev-ch.de/index.php?article=stuff_virtualbumpmapping (1.05 MB)

Tell me your opinions!

Rob Farley1+ years ago #2
It looks pretty and wet!

And as you say, entirely useless!

So how did you stumble upon doing this, I usually find I do this sort of thing whilst doing something else and think... I wonder if... !

bytecode771+ years ago #3
wet and entirely useless ;D

taumel1+ years ago #4
Well, displacement mapping is the way to go...

andy_mc1+ years ago #5
You get 62 fps, that's not bad!
Looks nice, but yes, I get a scene made like this would take maybe 40 million polys?

bytecode771+ years ago #6
You get 62 fps, that's not bad!
thats ok. i get 75 fps. and if thats too much, try scene 3! that is high quality AND big scene;)

i tried 150.000.000 polygons and it was 2 fps.
Well, displacement mapping is the way to go...
it is specular and dot3 mapping, too!

taumel1+ years ago #7
Yep but displacement mapping is what you really want in the future as it generates real geometry for all three axis and not just only operates on the uvs which a) enables real geometry and b) is independet of the viewing angle/light position.

ImaginaryHuman1+ years ago #8
Looks nice, and is how things would be done brute force is the hardware was capable enough.

Vorderman1+ years ago #9
It would be cool if you could use the mouse to paint the bumpiness on in realtime in the 3d view, then save the resultant bumpmap out to an image file.

bytecode771+ years ago #10
hm than i would have to save the vertices of each surface of each mesh. that wouldnt be easy ;/

although you know, i'm automaticaly splitting the surface if the texture is bigger than 128x128 because blitz doesnt support surfaces with more than 65536 tris/vertices!

bytecode771+ years ago #11
here's another one

taumel1+ years ago #12
Should be sufficient to save the image instead of the vertices when you're generating the vertices based on the image file already or did i get something wrong?

Loginname1+ years ago #13
How do you generate the geometry out of the heightmap?

JoshK1+ years ago #14
This is heightmap terrain.

taumel1+ years ago #15
Okay here is a vertex sculpter:

left mouse button: to alter the mesh (can be used with as many keys)

no key: pull
v: double radius
c: push
cursor keys: move and rotate camera

-> http://spielwiese.marune.de/_uni/_tmp/malen.html

puki1+ years ago #16
Oooh, this looks good.

I'll test it on my 8800GTX.

taumel1+ years ago #17
Enjoy, it was done on a 32MB ATI9200er... :O)

puki1+ years ago #18
You got a lot of polys there. Why so many?

Having said that, it is borderline sexual. However, the high poly levels renders it bent.

I want to see the other one with the blue-ish stones.

puki1+ years ago #19
Hey, I got the source code in my download - was I supposed to get the source code? I can improve this myself - cut out some of the bentness and make it a bit more useable.

taumel1+ years ago #20
Because it's based on vertices not on a displacement map but they are only 8k, so...my card can handle it. I'm sorry no, it's tied with other code from me...

puki1+ years ago #21
I was confused for a second. I think "taumel" thought I was posting in relation to his thing. I haven't looked at that yet.

taumel1+ years ago #22
Oops i'm sorry!

puki1+ years ago #23
Wait a minute! The 0.5 height is far, far too much - .02 is more like it.

bytecode771+ years ago #24
hm, you can modify the code if you like. if you make is useful ;P
i will post a new demo with other textures when i'm home!

Vorderman1+ years ago #25
taumel: what's your post about? It takes me to a blank screen where Opera and Firefox want me to install some webplayer????

Can you post a link to a .bb program or a video clip or something instead?

TartanTangerine (was Indiepath)1+ years ago #26
Is this not how dot3 maps start life?

taumel1+ years ago #27
If you don't want the webplayer, which would be a lot shorter, here are the executables:

-> http://spielwiese.marune.de/_uni/_tmp/malen_osx.zip (osx usb)
-> http://spielwiese.marune.de/_uni/_tmp/malen_win.zip (xp,vista)

bytecode771+ years ago #28
here is the NEW demo with more textures!

http://stuff.dev-ch.de/index.php?article=stuff_virtualbumpmapping (it's the same link as above)

Global used_tex =		3

change this value to 1,2,3,4 or 5 to toggle different textures!

also included this texture


Loginname1+ years ago #29
If you're using a heightmapped terrain, then it should be fairly easy to make a bumpmap sculp program out of it. Just translate the 3D mouse coordinates to the heightmap and alter its white/black value on that point. Don't know if it really works that way but I think the concept is quite easy tbh

bytecode771+ years ago #30
i just testet it with a blitz terrain.
mesh: 800.000 tris 62 fps...
terrain: 100.000 tris 15 fps...

TartanTangerine (was Indiepath)1+ years ago #31
Why does specular make everything look like it's covered in shiny plastic.

taumel1+ years ago #32
Because you have to use it wisely, less is more...

slenkar1+ years ago #33
you could use this effect for an intro screen, it would impress players very much

jfk EO-111101+ years ago #34
Yeah, use it for an ad :) "New technology!" . Got to agree, the wet plastic look... it's useful for surfaces that are meant to BE wet, eg: Alien skin etc. as seen in doom3.

Very nice DC! May be useable with some kind of LOD system.

z4g01+ years ago #35
May be useable with some kind of LOD system.

yep, could be intruding make something like a 'material lod' that make/show a small area made of terrains to put on the surfaces really near to the camera with their texture, rendered on a second layer on the camera and blurred with the original scene:

placed in a 'room'/'portal' culling system that render only the small room viewed from camera, could be also usable (may with less polys XD: there's not too much difference between 800000 and 4000000 tris versions)

Ross C1+ years ago #36
Wish we had shaders in blitz3d :D

bytecode771+ years ago #37
oh yes we have. we have dot3 shaders built in and i made an ENBM engine...

Pete Carter1+ years ago #38
move to max and use the extended minib3d it has shaders and FSAA works

CS_TBL1+ years ago #39
In ten years we're laughing about all the performance comments.. :P I've never liked bumpmaps in games (tho I understand why there are bumpmaps). In a near future I hope to play games where everything you see *is* really made out of high amounts of polies, including seemingly straight stuff like floors, ceilings, walls, etc.

bytecode771+ years ago #40
i think in ten years we will use the computing capacity for more important things than poly based displacement mapping...

Filax1+ years ago #41
Lol , it's a "crazy test" but i find it very fun :)

Gabriel1+ years ago #42
we have dot3 shaders built in

No we don't. If we did, you could actually make stuff which looks as good as your demo but runs at practically the same speed as normal mesh rendering. What we have is a blend mode which can kind of make things look vaguely bumpy with a lot of fiddling and generally making things quite a lot slower.

Why does specular make everything look like it's covered in shiny plastic.

Because that's what specular is? Only polished surfaces such as plastic, glass and some metals exhibit specular reflection.

If you really mean why is specular used where it wouldn't naturally be, then the answer is because it's the most obvious way to show off your bumpiness. After you've gone to the trouble of writing nice bump/normal/parallax mapping, the last thing you want is for people to barely notice. So it gets overused. Full color specular maps make a big difference here and can create much more convincing representations of surfaces like wood, dull metals and skin. But having to use a full color specular map adds another texture lookup and another texture bind ( you're already doing at least two, probably three or four with shadows and other effects ) so it often gets left out, sadly. Greyscale specular maps can be implemented without the extra texture bind, because they can be placed in the alpha channel of the normal map. But they don't look as good.

Naughty Alien1+ years ago #43
..this is what my bump library do with normalmap assigned to the specific surface..

bytecode771+ years ago #44
sure, but a normal map is red, green AND blue! but i'm only reading the red part out of the heightmap ;)
also for example the blue stones: i tried the normal map and it looked really crappy. with the displacementmap/heightmap it looked really satisfying...

Ross C1+ years ago #45
Minib3d looks good :o) Makes me want to move to blitzmax.

*1+ years ago #46

bytecode771+ years ago #47
hey naughty alien, you might show me your texture?

_331+ years ago #48

Blitz BASIC Founders Fund