Posted: 26th Mar 2003 9:00
lets try this again

+ Code Snippet
rem -------------------------------------------------------------------------------
rem indi Multicam test 1
rem march 26th 2003
rem DBP 4 rc1
rem
rem -------------------------------------------------------------------------------

cls
sync on
sync rate 60
hide mouse

set text font "verdana"
set text size 20

color backdrop 0,rgb(55,55,155)

worldsize# = 1000.0
bulletsize# = 10.0
thruststep#=0.02
turnstep#=3.0
friction#=0.97
x#=500
z#=500
camdistance=120
ycam#=80

make matrix 1,1000,1000,10,10
position matrix 1,0,0,0

make object cube 1,50


position camera 0,0,150,0
point camera 0,0,0,0

make camera 1
set camera view 1,0,0,128,96
position camera 1,500,850,500
point camera 1,500,0,500
color backdrop 1,rgb(55,55,155)

make camera 2
set camera view 2,0,96,128,192
position camera 2,500,500,-500
point camera 2,500,0,500
color backdrop 2,rgb(55,155,155)

make camera 3
set camera view 3,0,192,128,288
position camera 3,500,500,0
point camera 3,500,0,500
color backdrop 3,rgb(155,55,155)

make camera 4
set camera view 4,0,288,128,384
position camera 4,500,100,500
point camera 4,500,0,500
color backdrop 4,rgb(55,55,55)

make camera 5
set camera view 5,0,288,128,384
position camera 5,500,900,500
point camera 5,500,0,500
color backdrop 5,rgb(155,5,5)



make object plain 2,256,256
position object 2,500,0,500
rotate object 2,0,90,90
fix object pivot 2

position object 2,600,0,600
set camera to image 5,1,256,256
texture object 2,1


disable escapekey
while escapekey()=0

smoothspeed#=20.0

if rightkey()=1 then an#=an#+turnstep#
if leftkey()=1 then an#=an#-turnstep#
an#=wrapvalue(an#)
if upkey()=1 then thrust#=friction#-thrust#+thruststep#
thrust#=thrust#*0.9
if downkey()=1 then thrust#=thrust#-thruststep#
thrust#=thrust#*0.9

xvel#=xvel#+(sin(an#)*thrust#)
zvel#=zvel#+(cos(an#)*thrust#)
xvel#=xvel#*friction#
zvel#=zvel#*friction#
x#=x#+xvel#
z#=z#+zvel#

if inkey$()="2" then ycam# = ycam# -1
if inkey$()="8" then ycam# = ycam# +1
if ycam# <0 then ycam# = 0
if inkey$()="1" then camdistance = camdistance-2
if inkey$()="7" then camdistance = camdistance+2
if camdistance <0 then camdistance = 0

xcam#=newxvalue(x#,wrapvalue(an#+180),camdistance)
zcam#=newzvalue(z#,wrapvalue(an#+180),camdistance)

smoothxcam#=curvevalue(xcam#,camera position x(),smoothspeed#)
smoothzcam#=curvevalue(zcam#,camera position z(),smoothspeed#)
smoothycam#=curvevalue(ycam#,camera position y(),smoothspeed#)

if x# > worldsize# then x# = worldsize#
if x# < 0 then x# = 0
if z# > worldsize# then z# = worldsize#
if z# < 0 then z# = 0

yrotate object 1,an#
position object 1,x#,y#+20,z#

position camera smoothxcam#,smoothycam#,smoothzcam#
point camera x#,y#,z#

point camera 2,x#,y#,z#

position camera 4,object position x(1),object position y(1)+265,object position z(1)

point camera 5,x#,y#,z#


center text 140,6,"cam1"
center text 140,96*1,"cam2"
center text 140,96*2,"cam3"
center text 140,96*3,"cam4"
text screen width()-100,6,"cam0"

text screen width()-100,32,"poly"+STR$(statistic(1))
text screen width()-100,64,"fps:"+STR$(screen fps())



sync
endwhile
delete matrix 1
delete object 1
end
Posted: 4th Apr 2003 19:17
only DBPro does multiple cameras
Posted: 4th Apr 2003 22:32
If your good you can get DBC to do multiple cameras. I never figured it out though, it was always to jerky for me. (not that I tried for long though)
Posted: 27th Apr 2003 8:28
its a good idea, but i think it would probly flicker alot and run real slow
Posted: 27th Apr 2003 9:22
the DBC trick mentioned above can be slow but it depends on what u require.

I would imagine the output of 4 screens having 3 that are just image captures and the focus window is live for editing in a 3d modelling application for instance, but for a true Mplay on the same monitor then it would take some research to find the fastest result for your problem at hand.
Posted: 27th Apr 2003 22:57
Indi- Awesome camera smoothing!
Posted: 28th Apr 2003 0:14
Very GOOD indeed!...thanks!
Posted: 28th Apr 2003 8:01
cheers, enjoy
Posted: 28th Apr 2003 13:15
nice one indeed,
I think I'm going to use this indi!!! and learn from it as well!!!
Thanks

any more good stuf?
eh ehe he...