Alice Community  

Go Back   Alice Community > Alice 2 > Share Worlds

Reply
 
Thread Tools Display Modes
Multiple cameras
Old
arty-fishL
Senior Member
 
arty-fishL's Avatar
 
Status: Offline
Posts: 1,878
Join Date: Mar 2008
Location: In the corner of your eye
Lightbulb Multiple cameras - 01-11-2012, 01:40 PM

I decided to look back upon something I experimented with a while back when I had less knowledge of the guts of Alice, and I got it working .

This world demonstrates a simple concept, the ability to use multiple cameras in an Alice world.
What is the point in this , you may ask; well, in the camera's current state there is no point as you have the ability to position the camera and modify it as you like, meaning another camera is just a waste of space.
However, Alice actually has built in support for more types of camera.

The default camera you get is a symmetric perspective camera.
There is also an orthographic camera and a perspective camera.
A projection camera exists too, but it wont work for me.

By default the other cameras have weird values that make them look strange, but they can be changed in their seldom used properties.

Anyway, enough of that, to the actual world.
Controls
1, 2, 3 - switch cameras
arrow keys - move cameras
z/x - tilt cameras forward/back
spacebar - reset camera positions

Experiment with it.
Attached Files
File Type: a2w camera_test.a2w (1.81 MB, 52 views)


█░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░█
█░░▓░░░░░░░▓░░░░░░░░░░░▓▓░░▓░░░░░░▓░░░▓░░░░█
█░▓░▓░▓▓▓░▓▓▓░▓░▓░░░░░░▓▒▒░░▒░░▓▓░▓▓▓░▓▒░░░█
█░▓▓▓▒▓▒▒▒░▓▒▒▓▓▓▒▓▓▓░▓▓▓░░▓░░░▓▒▒▓▒▓▒▓▒░░░█
█░▓▒▓▒▓▒░░░▓▓░░▒▓▒░▒▒▒░▓▒▒░▓▓░▓▓▒░▓▒▓▒▓▒░░░█
█░▓▒▓▒░▒░░░░▒▒▓▓▓▒░░░░▓▓▒░░░▒▒░▒▒░░▒░▒▓▓▓░░█
█░░▒░▒░░░░░░░░░▒▒▒░░░░░▒▒░░░░░░░░░░░░░░▒▒▒░█
█░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░█

I have mostly moved on from Alice, but may still respond to messages if important [-]
   
Reply With Quote
Old
room14
Senior Member
 
room14's Avatar
 
Status: Offline
Posts: 549
Join Date: Nov 2009
Location: Auckland New Zealand
Default 01-11-2012, 03:35 PM

Quote:
Originally Posted by arty-fishL View Post
I decided to look back upon something I experimented with a while back when I had less knowledge of the guts of Alice, and I got it working .

This world demonstrates a simple concept, the ability to use multiple cameras in an Alice world.
What is the point in this , you may ask; well, in the camera's current state there is no point as you have the ability to position the camera and modify it as you like, meaning another camera is just a waste of space.
However, Alice actually has built in support for more types of camera.

The default camera you get is a symmetric perspective camera.
There is also an orthographic camera and a perspective camera.
A projection camera exists too, but it wont work for me.

By default the other cameras have weird values that make them look strange, but they can be changed in their seldom used properties.

Anyway, enough of that, to the actual world.
Controls
1, 2, 3 - switch cameras
arrow keys - move cameras
z/x - tilt cameras forward/back
spacebar - reset camera positions

Experiment with it.
heh. you weren't lying about the camera looking strange. anyway. does that mean we can make cameras that look like watching with one eye?


:D
   
Reply With Quote
Old
arty-fishL
Senior Member
 
arty-fishL's Avatar
 
Status: Offline
Posts: 1,878
Join Date: Mar 2008
Location: In the corner of your eye
Default 01-11-2012, 03:43 PM

Quote:
Originally Posted by room14 View Post
heh. you weren't lying about the camera looking strange. anyway. does that mean we can make cameras that look like watching with one eye?
I think so, mess about with the seldom used properties of the cameras and you can make them look better; try setting the min values to negative numbers and the max values to positive ones.


█░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░█
█░░▓░░░░░░░▓░░░░░░░░░░░▓▓░░▓░░░░░░▓░░░▓░░░░█
█░▓░▓░▓▓▓░▓▓▓░▓░▓░░░░░░▓▒▒░░▒░░▓▓░▓▓▓░▓▒░░░█
█░▓▓▓▒▓▒▒▒░▓▒▒▓▓▓▒▓▓▓░▓▓▓░░▓░░░▓▒▒▓▒▓▒▓▒░░░█
█░▓▒▓▒▓▒░░░▓▓░░▒▓▒░▒▒▒░▓▒▒░▓▓░▓▓▒░▓▒▓▒▓▒░░░█
█░▓▒▓▒░▒░░░░▒▒▓▓▓▒░░░░▓▓▒░░░▒▒░▒▒░░▒░▒▓▓▓░░█
█░░▒░▒░░░░░░░░░▒▒▒░░░░░▒▒░░░░░░░░░░░░░░▒▒▒░█
█░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░█

I have mostly moved on from Alice, but may still respond to messages if important [-]
   
Reply With Quote
Old
Mr Kidnapper
Senior Member
 
Status: Offline
Posts: 442
Join Date: Feb 2011
Default 01-11-2012, 08:39 PM

Hmm. No wonder they didn't offer these cameras. Broke. I don't even know what's wrong with them and I have no idea what these minimum and maximum XYs are.
The problems are the camera methods at edu.cmu.cs.stage3.alice.core.decorator and edu.cmu.cs.stage3.alice.core.camera
Decorator's camera methods are essentially copypasta of each other.
Don't seem to know what's wrong with them either. Not much documentation on cameras.
Edit:
All right. The makers of this camera are a bit silly. They made a camera extremely true to the definition of orthographic projection, which means the objects in its view will not change size no matter how far or close you moved the camera (Infinitely far.) I seem to recall that this is completely useless. I have no idea why they would add it like that.
Instead, let's make the new definition for an "Orthographic Camera" the same as 3ds Max's... and just about every other 3D rendering engine out there. It's really an Isometric Camera. If you google'd the term you'd see something really archaic, but it's more useful than you think.
An Isometric Camera works much like an orthographic projection, except that it is capable of detecting depth. You're effectively in a perspective mode, except without all of the perspective distortion.
The deal with the nonfunctional Perspective Camera is that a true perspective projection is not made to work in most 3D rendering situations. They are intended to view objects at a distance close to the camera, and all others at a far distance will warp. This was solved in the creation of Parallel projection, which is made to view objects at infinite distance without warping.

So the moral of the story is: When people say perspective, they actually mean Parallel Perspective. When they say Orthographic, they really mean Isometric. Don't correct them on it, they're still technically correct. All professional rendering solutions AFAIK only involve these two cameras, so we should simply out with the perspective camera and fix the Orthographic Camera.
The "Projection Camera" has, in fact, nothing to do with anything (All cameras are projections)—It's not even a real camera.

Last edited by Mr Kidnapper; 01-11-2012 at 09:25 PM.
   
Reply With Quote
Old
jediaction
Senior Member
 
jediaction's Avatar
 
Status: Offline
Posts: 5,064
Join Date: Jul 2009
Location: Bel Air, Maryland
Default 01-11-2012, 09:01 PM

Jeesh. I've been trying forever to get more than one camera to work, and you just come in blasting with the discovery....all I can say is....Well done! It's about time someone figured it out. I wanted to have a system like this for gun sights....I should do it for Hero's 2. Hey, can you explain to me how you did this?


Website: www.salokingames.com
FaceBook: www.facebook.com/SalokinGames
   
Reply With Quote
Old
Mr Kidnapper
Senior Member
 
Status: Offline
Posts: 442
Join Date: Feb 2011
Default 01-11-2012, 09:35 PM

Ha. Late edit, but you should read my previous post. Perhaps you have been brainwashed by my constant utterance of a need of a Orthographic Camera, but sir, these are not the cameras you are looking for. Move along.
In fact, the cameras aren't broken. They work perfectly. It's just that the seldomly used values are a spazz and no one knows what they do.
Until someone figures out how to program an Orthographic (Isometric) Camera, we're not going to have closed sights for a while.

You know what these cameras are good for? If you make multiple Parallel Perspective Cameras, you can probably program Alice to run two separate cameras in the same window, or two different windows at the same time. There'll be two rendertargets though.

Last edited by Mr Kidnapper; 01-11-2012 at 09:46 PM.
   
Reply With Quote
Old
jediaction
Senior Member
 
jediaction's Avatar
 
Status: Offline
Posts: 5,064
Join Date: Jul 2009
Location: Bel Air, Maryland
Default 01-12-2012, 08:22 AM

Actually I was talking about one camera that has a different field of view like the third camera.


Website: www.salokingames.com
FaceBook: www.facebook.com/SalokinGames
   
Reply With Quote
Old
mdemonion
Member
 
Status: Offline
Posts: 16
Join Date: Dec 2011
Location: Netherlands
Default 01-21-2012, 06:47 AM

Wow..That's really nice that there is also an orthographic camera and a perspective camera...One can swap camera according to their need..
   
Reply With Quote
Old
room14
Senior Member
 
room14's Avatar
 
Status: Offline
Posts: 549
Join Date: Nov 2009
Location: Auckland New Zealand
Default 01-22-2012, 01:48 AM

Quote:
Originally Posted by mdemonion View Post
Wow..That's really nice that there is also an orthographic camera and a perspective camera...One can swap camera according to their need..
except they are basically unusable.


:D
   
Reply With Quote
Old
mdemonion
Member
 
Status: Offline
Posts: 16
Join Date: Dec 2011
Location: Netherlands
Default 01-28-2012, 05:37 AM

Quote:
Originally Posted by room14 View Post
except they are basically unusable.
May be you are right but it has somewhat new features of more than 1 camera and I like this..
   
Reply With Quote
Reply

Tags
camra, orthographic, perspective, projection, symmetric

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



Copyright ©2017, Carnegie Mellon University
Alice 2.x 1999-2012, Alice 3.x 2008-2012, Carnegie Mellon University. All rights reserved.