Hi,
I'm trying to make dynamic cube map with plain (flat) object.
I mean reflection using cube map, But the reflection is not good.
rem Initialise
sync on
sync rate 0
rem Load model and shader effect
`load object "cube.dbo",1
make object box 1,500,1,500
position object 1,0,-65,0
autocam off
load effect "EnvironmentBump.fx",1,0
load image "cop3_4.dds",4
load image "cop3_4_n.dds",5
texture object 1,0,4
texture object 1,1,5
set object effect 1,1
make object sphere 5,50
position object 5,100,100,100
`Create Sky
load image "Cube0.dds",2,2 : image=1
make object sphere 2,2000,5,5
set object cull 2,0
texture object 2,0,2
load effect "SkyBox.fx",2,0
set object effect 2,2
hide object 2
rem Make environment reflection cube map
Make Dynamic Cube Map 1,64
Apply Cube Map To Object 1,2,1
do
if keystate(2)=1 then move object up 5,1
if keystate(3)=1 then move object down 5,1
if upkey()=1 then move object 5,1
if downkey()=1 then move object 5,-1
if rightkey()=1 then move object right 5,1
if leftkey()=1 then move object left 5,1
`Control Camera
position camera 0,0,0
if mouseclick()=0
xrotate camera camera angle x()-mousemovey()*0.25
yrotate camera camera angle y()+mousemovex()*0.25
if camera angle x()>80 then xrotate camera 80
if camera angle x()<-60 then xrotate camera -60
endif
if mouseclick()>0 then CamDis#=CamDis#-mousemovey()*0.25
CamDis#=CamDis#+mousemovez()*0.25
if CamDis#>-20 then CamDis#=-20
if CamDis#<-300 then CamDis#=-300
move camera CamDis#
if camera position y()<-60 then position camera camera position x(),-60,camera position z()
mousemovex()=0
mousemovey()=0
hide object 1
rem Update reflection texture
Render Dynamic Cube Map 1,-1,0,0,0
rem Update background texture
sync mask %010 : fastsync
show object 1
rem Draw main camera
sync mask %001 : sync
loop
i'm using environment bump effect.
if it's impossible using dynamic cube map way, Is there another way ???
and sorry for my language
4444444444444444444444