thats really cool
i played around with it a bit ,made it medialess and found an other cool effect: if you offset the limbs on Z-Axis it gives a cool glowing effect
Rem Project: my hdr demo
Rem Created: 02/09/2007 21:55:30
Rem ***** Main Source File *****
sync on
autocam off
set display mode 1024,768,32
backdrop on:color backdrop 0
`SETUP HDR CAMERA STUFF
hdr_expt_imagenum=20
make camera 1
set camera to image 1,hdr_expt_imagenum,1024,1024
position camera 0.0,0.0,1000.0
point camera 0.0,0.0,2000.0
set camera range 45.0,55.0 `can be much smaller now?
hdr_experiment_objnum=11
make object plain hdr_experiment_objnum,80.0,60.0
`add extra limbs to ghosted overlay for additional effect
`more limbs mesn more slowdown
`maybe better to use separate objects- or instanced, but i haven't checked this out.
num_limbs=5
`-----VVV--- CHANGE HERE: LOWER = MORE GLOW || HIGHER = LESS GLOW ==> 0.0 no glow , 1.0 highest
GLOW#=10.0
if num_limbs>0
temp_meshnum=10
for limb=1 to num_limbs
make mesh from object temp_meshnum,hdr_experiment_objnum
add limb hdr_experiment_objnum,limb,temp_meshnum
offset limb hdr_experiment_objnum,limb,0,0,limb/GLOW#
rotate limb hdr_experiment_objnum,limb,0,180.0,0 `(seems that limb is mirrored!?!!!)
next limb
delete mesh temp_meshnum
endif
lock object on hdr_experiment_objnum
position object hdr_experiment_objnum,0.0,0.0,49.8
texture object hdr_experiment_objnum,hdr_expt_imagenum
set object hdr_experiment_objnum,1,0,0,0,0,0,0
ghost object on hdr_experiment_objnum
disable object zwrite hdr_experiment_objnum
disable object zdepth hdr_experiment_objnum
dummy_objnum=10 `plain, unghosted, behind ghosted object
make object plain dummy_objnum,80.0,60.0
lock object on dummy_objnum
position object dummy_objnum,0.0,0.0,49.8 `bit closer to avoid border
texture object dummy_objnum,hdr_expt_imagenum
set object dummy_objnum,1,0,0,0,0,0,0
`SETUP SCENE
cls
box 0,0,512,512,rgb(200,100,0),rgb(200,50,0),rgb(100,100,0),rgb(230,10,0)
get image 1,0,0,512,512
make object cube 1,100
texture object 1,1
make object sphere 2,120
texture object 2,1
`some lighting
make light 1
set directional light 0,1,-1,0 `downward pointing and side
set directional light 1,-1,1,0 `opposite direction
set ambient light 100
color ambient light rgb(80,80,80) `experiment with lighting..
color light 0,rgb(180,180,180)
color light 1,-60,-60,-60
set current camera 1
position camera 0,100,200
point camera 0,0,0
set camera range 10.0,1000.0
backdrop on:color backdrop 0
do
turn object right 1,1 `handle the scene
turn object right 2,1 `handle the scene
lastctrlkey=ctrlkey:ctrlkey=controlkey() `control over number of layers
if ctrlkey>lastctrlkey
hdr_state=hdr_state+1
if hdr_state>num_limbs:hdr_state=0:endif
endif
exclude object on hdr_experiment_objnum:hide object hdr_experiment_objnum
exclude object on dummy_objnum:hide object dummy_objnum
sync mask 2:sync `render image on camera 1- used for sprite (to show on cam 0), and ghosted thingy
`this part only required if want to be able to change # of layers on the fly
`otherwise just use the commented out part for exclude object off below
if hdr_state>0
exclude object off hdr_experiment_objnum
show object hdr_experiment_objnum
if num_limbs>0:for limb=1 to num_limbs
if limb<hdr_state+1:show limb hdr_experiment_objnum,limb:else:hide limb hdr_experiment_objnum,limb:endif
next limb:endif
endif
`exclude object off hdr_experiment_objnum:show object hdr_experiment_objnum
exclude object off dummy_objnum:show object dummy_objnum
if hdr_state=1:s$="":else:s$="s":endif:text 10,10,str$(hdr_state)+" Ghosted Layer"+s$
text 10,30,str$(screen fps())+" Frames Per Second"
text 10,50,"Press [Ctrl] to cycle through number of layers"
sync mask 1:sync `render camera 0 : sees the plain and ghosted plain overlaid, both textured with screencap from camera 1
loop
downside of the effect: the texture gets less detailed (don't know if its just with the gradient,didnt test with texture)