Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Code Snippets / simple working bumpmaps

Author
Message
darkvee
19
Years of Service
User Offline
Joined: 18th Nov 2005
Location:
Posted: 18th Nov 2005 22:28
Hey Everyone we have finally cracked the code to set bump mapping on!!! finally here is the code and a link to get the file And See It For Yourself!
-- > http://www.northgeorgialandservice.com/stuff/Simplebump.zip

Kolp try72y
Math89
20
Years of Service
User Offline
Joined: 23rd Jan 2004
Location: UK
Posted: 21st Nov 2005 15:57 Edited at: 21st Nov 2005 15:58
Do you really need 2048*2048 textures ?
darkvee
19
Years of Service
User Offline
Joined: 18th Nov 2005
Location:
Posted: 23rd Nov 2005 22:22
hi no math you don't i was just trying to get it to work you can use 128 or 64 to make a bump map also the specular works got to put a light on the camera what ever your looking at and attach it to the object your looking through hope this helps! here is the code
SET DISPLAY MODE 1024, 768, 32
sync
Sync on
sync rate 100
Rem make matrix
backdrop on
SET CAMERA RANGE 1,10000
make object sphere 4,-10000
set object cull 4,0
position object 4,1,1,1
Make matrix 1,10000,10000,20,20
Rem texture matrix
load image "rain.png",1,1
load image "brick2.jpg",2
load image "brick12.bmp",4
load object "testd.x",1
set bump mapping on 1,4
texture object 1,2
position object 1, 0,0,0
set sphere mapping on 1,1
set blend mapping on 1,4,8
set object specular 1, rgb(255,255,255)
set object specular power 1,100
position object 1,2500,130,2000

Rem Update the changes to the matrix
update matrix 1

Rem Main loop
Do
set cursor 50,0
print screen fps()
Rem Store Object angle
CameraAngleY# = Camera angle Y()

Rem Control input for camera
If Upkey()=1 then Move camera 10
If Leftkey()=1 then Yrotate Camera Wrapvalue(CameraAngleY#-5)
If Rightkey()=1 then Yrotate Camera Wrapvalue(CameraAngleY#+5)

If Spacekey()=1
Fill matrix 1,Rnd(50),Rnd(3)+1
randomize matrix 1,250
Endif

X# = Camera position X()
Z# = Camera position Z()
Position Camera X#,250,Z#

Rem Refresh Screen
Sync
Loop

Kolp try72y

Login to post a reply

Server time is: 2024-11-23 10:52:30
Your offset time is: 2024-11-23 10:52:30