Bumpmapping

Blitz3D Forums/Blitz3D Programming/Bumpmapping

Ross C(Posted 2003) [#1]
Hey, i have coded piece of code that does bumpmapping. I was wondering tho, what would be the most senible way to go about this. my techinque uses a terrain, hidden away with terrain shading applied to it. i then copyrect to the texture buffer. so when the light moves, it cast shadows on the terrain. The terrain btw is the bumpy texture i'm looking for.


Neochrome(Posted 2003) [#2]
that could prove to be slow if your going to make a lot of them, tho using one, Will prolly give you the FX you wanted :o)


Ross C(Posted 2003) [#3]
cool, thanks. it is amazing tho, the speed difference if you use the flag that puts the texture in VRAM. without that it was going at 53 fps, with it it goes at 432 fps.

i always thought that when textures were used/created, they were stored in VRAM anyway. Pretty cool :^)


Ross C(Posted 2003) [#4]
would anyone be willing to let me e-mail them this code for bumpmapping. it runs pretty fast and i belive it could be pretty useful.


Skitchy(Posted 2003) [#5]
Post it here. I'd love to take a look :)


Ross C(Posted 2003) [#6]
i can't post it as i don't have website access, i'd need to e-mail it. sorry :(


darklordz(Posted 2003) [#7]
ermm, u can posthere but u don;t have access? that makes sense...


Ross C(Posted 2003) [#8]
i can't put the media files in it i mean :\


myspys(Posted 2003) [#9]
www.geocities.com
www.angelfire.com
etc etc

free webspace


Ross C(Posted 2003) [#10]
ok, i'm stupid and have never touched web-design or anything like that. i was really just asking if anyone wanted it e-mailed to them. never mind


Ross C(Posted 2003) [#11]
right, after that outburst, sorry ppl, a wee bit stressed right now. i'm gonna set up a web page.


ashmantle(Posted 2003) [#12]
joker: mail me and I can host the files for you!
ashmantle@...


Ross C(Posted 2003) [#13]
thanks, that'd be cool. i'm trying to put a site together the now. mail away!! thank you


Ross C(Posted 2003) [#14]
ok, thanks to ashmantle ^_^ i've got the link

http://www.arcanemagic.com/mirror/bump.zip
please try it out. it might be of some use. still needs work tho


Mathieu A(Posted 2003) [#15]
it's very nice. I saw your code. And it's very simple, but I don't understand exactly the tricks to do that


Mathieu A(Posted 2003) [#16]
ok!! you use a terrain.... Ingenious? But it could be heavy to implement.


Ross C(Posted 2003) [#17]
well, it's not bad. it might some draw backs on older cards, doing two render passes, but the 256 texture flag helps immensly. i'll need to find a way of tiling the terrain. i tried to tile the texture but since the terrain didn't look right, you could see the tiling effect badly.
thanks for you comments ^_^


Shambler(Posted 2003) [#18]
I suggest instead of using a blitz terrain create a highly tesselated plane or terrain in 3dSMax or Milkshape, this renders much faster.

With 'Flip false' I get 200fps using your method and 600fps using the above.


Ross C(Posted 2003) [#19]
oh rite, cool, thanks for that. the idea for using a terrain, was you would load the bitmip you wanted to use as a texture and blitz terrain makes it into a mesh. i suppose i could write my own function for that and create a plane as you suggest depending on the color value of the bitmap. excellent idea, thank you :)