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.

DarkBASIC Professional Discussion / How to use multi camera?

Author
Message
Kandlaker
22
Years of Service
User Offline
Joined: 11th Feb 2003
Location:
Posted: 11th Feb 2003 13:18
Hello,
I Don't know how to use the multi camera functions

Please help!

Jacob
Arrow
22
Years of Service
User Offline
Joined: 1st Jan 2003
Location: United States
Posted: 11th Feb 2003 19:43
What parts are you have troube with?

Am I a butterfly dreaming I'm a man?
Or a bowling ball dreaming I'm a plate of samishi?
Never assume that what you see or feel is real.
Kandlaker
22
Years of Service
User Offline
Joined: 11th Feb 2003
Location:
Posted: 11th Feb 2003 21:47
I Tried many ways to activate multiple windows but
it just doesn't work!

Here's my program that doesn't work at all, it show
only one of the windows!

sync on

make object box 1, 10,10,10

make camera 2

set camera view 0,0,100,100

make camera 1

set camera view 0,100,100,200

repeat

set current camera 2

sync

set current camera 1

sync

until escapekey()

Fluffy Paul
22
Years of Service
User Offline
Joined: 16th Dec 2002
Location: United Kingdom
Posted: 11th Feb 2003 23:45
try not putting a sync between the two camera commands

Ending a sentence with a French word is so passé
Kandlaker
22
Years of Service
User Offline
Joined: 11th Feb 2003
Location:
Posted: 12th Feb 2003 12:21
I Tried this, doesn't work. Please help :-(

fatbiffa
22
Years of Service
User Offline
Joined: 15th Jan 2003
Location:
Posted: 12th Feb 2003 12:52
i couldn't get multi-cameras working either so try moving one camera between positions held in an array instead - works a treat ;0)

TogaMario
22
Years of Service
User Offline
Joined: 30th Jan 2003
Location:
Posted: 12th Feb 2003 18:54
I don't like multi cams, I'm using one cam that changes it's data. I've got a loop forever checking to see if the CameraMode = 0 or 1 and changing the function ran accordingly. I think space bar is bound for changing right now for testing pursposes, but it's working quite nicely so far.

David T
Retired Moderator
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: England
Posted: 12th Feb 2003 19:07
Multicams work fine for me!

However, for things such as different camera positions then it's not best to use them there. For example, my Particle Factory had 2 cameras, a side on view and perspective. 2 camera were used there.

Visit [url]www.lightning-systems.co.uk[/url]
You are the th person to view this signature.
Kandlaker
22
Years of Service
User Offline
Joined: 11th Feb 2003
Location:
Posted: 13th Feb 2003 00:43
Can you please give example of code of using multiple
camera? I mean, two camera in the same time.

Jacob

The admiral
22
Years of Service
User Offline
Joined: 29th Aug 2002
Location:
Posted: 13th Feb 2003 06:13
yeah id like an example to learn of at least.

Morales
22
Years of Service
User Offline
Joined: 9th Feb 2003
Location: - Please Select -
Posted: 13th Feb 2003 07:23
what you should do is look at the examples in them somewere
it will tell you everything.SOME OF THEM will tell you.
Kandlaker
22
Years of Service
User Offline
Joined: 11th Feb 2003
Location:
Posted: 13th Feb 2003 11:34
I Did, it doesn't help because there are FULL of functions
and commands that confusing me.

Ok, take this example and explain please how and why the multi camera DOES work this case :

rem Camera Showcase

rem Standard Setup Code for all examples
sync on : sync rate 0 : color backdrop rgb(0,128,0)
set text font "arial" : set text size 16
set text to bold : set text transparent

rem Some music
load music "misty.mp3",1 : loop music 1

rem Loading Prompt
sync : center text screen width()/2,screen height()/2,"LOADING" : sync

rem Load image
load image "wall.bmp",1

rem Create character
for t=1 to 2
load object "miko\miko.x",t
xrotate object t,270
fix object pivot t
if t=1
position object t,0,0,200
rotate object t,0,180,0
else
position object t,0,0,-200
rotate object t,0,0,0
endif
loop object t,0,9000
set object speed t,500
next t

rem Create sphere room
load object "Sphere2.x",3
scale object 3,1000,1000,1000
scale object texture 3,1000,500
texture object 3,1

rem Create reflective circular floor
make object sphere 5,1000
color object 5,0 : ghost object on 5
set reflection shading on 5
scale object 5,100,100,1
xrotate object 5,90

rem Cut-out view close-up
make camera 1
set camera view 1,320+48,16,640-16,240-48
make light 1 : color light 1,256,512,2024 : set light range 1,1000

rem Create floating globe
make object sphere 4,125
scale object texture 4,300,100
ghost object on 4

rem Create buzz globe
make object sphere 999,10 : color object 999,rgb(255,0,0)
make light 7 : color light 7,1024,100,100
set light range 7,200

rem Setup main camera and light
set current camera 0
set camera range 1,7000
set point light 0,0,0,0
set light range 0,1500
color light 0,256,512,256
camdist#=0.0

rem Rim Object
for t=7 to 28
s#=t : s#=s#/3.0
make object cube t,s#
texture object t,4
set object t,1,1,1,0,0,0,0
ghost object on t
next t

rem Effect Prompt
desc$="Multicamera and Reflection View"

rem Main loop
do

rem Character control
if leftkey()=1 then yrotate object 1,wrapvalue(object angle y(1)-3)
if rightkey()=1 then yrotate object 1,wrapvalue(object angle y(1)+3)

rem Let camera track character
a#=object angle y(1)
x#=object position x(1)
y#=object position y(1)
z#=object position z(1)
set current camera 1
set camera to follow x#,y#,z#,a#,-115,135,10.0,0
set current camera 0

rem Handle camera collision within circle
a#=atanfull(x#,z#)
d#=sqrt((x#*x#)+(z#*z#))
if d#>500 then x#=sin(a#)*500 : z#=cos(a#)*500 : position object 1,x#,y#,z#

rem Slowly move camera out
if camdist#<100.0 then camdist#=camdist#+0.1

rem Hover the orb around center
v#=wrapvalue(v#+0.5) : h#=wrapvalue(h#+2.0)
position object 4,sin(v#)*-750,100+(cos(h#)*100),cos(v#)*-750 : yrotate object 4,v#+60
position light 1,sin(v#)*-800,100+(cos(h#)*100),cos(v#)*-800
position light 0,sin(v#)*-500,100+(cos(h#)*100),cos(v#)*-500
position camera 0,sin(v#)*(camdist#*7.0),200+(cos(h#)*100),cos(v#)*(camdist#*7.0)
point camera 0,x#,y#+100,z#

rem Fire light
position object 999,0,200+(cos(h#+10)*150),sin(h#+10)*150
position light 7,0,200+(cos(h#)*150),sin(h#)*150

rem Emit particles around rim
for t=7 to 28
r#=wrapvalue(r#+0.5)
rotate object t,r#,r#*2,r#*3
position object t,cos(r#+t)*500,0,sin(r#+t)*500
next t

rem Show Framerate
center text (640-16)-(((640-16)-(320+48))/2),20,"Use Arrow Keys"
text 20,screen height()-40,desc$
fps$="DBPro Fps: "+str$(screen fps())
text screen width()-20-text width(fps$),screen height()-40,fps$

rem Update screen
sync

rem End loop
loop

Login to post a reply

Server time is: 2025-05-18 00:04:04
Your offset time is: 2025-05-18 00:04:04