Fastextension bump mapping - how does it function?

Blitz3D Forums/Blitz3D Userlibs/Fastextension bump mapping - how does it function?

dogzer(Posted 2009) [#1]
How do I make bump mapping work with fastextension library?

I have this code, wich is my attempt to make it work:

Include "include\FastExt.bb"
Graphics3D 640,480,GraphicsDepth(),2
InitExt

camera = CreateCamera() : PositionEntity camera,0,0,-100
light = CreateLight() : RotateEntity light,0,45,0 : LightColor light,150,150,150 : AmbientLight 50,50,50
mesh = LoadMesh( "..\media\thing.b3d")

bumptexture = LoadTexture("..\media\normal.bmp")

EntityTexture mesh,bumptexture,0
TextureBlend bumptexture,FE_bump

Bump(True)

While Not KeyHit(1)
	TurnEntity mesh,0,-0.5,0
	UpdateWorld()
	
	SetBuffer BackBuffer()
	RenderWorld()
	Flip()
Wend

WaitKey()
End



MikhailV(Posted 2009) [#2]
See example FastExt_Example_BumpEffects.bb
You need use 2 textures:
first - bump texture (aka displacement map)
second - other diffusion texture, which will be bumped / distorted


dogzer(Posted 2009) [#3]
THANKS! i made it work!!! but it's not the bumpy effect I was looking for lol... nevertheless what I'm looking for is in the cubeMapAling examples!! I'm going to try those, for wich I might need help as well!! I'll let you know how it goes!