michiel | 15 years ago | 4 comments | 3.6K views
All objects in BluffTitler live in a virtual 3D world. When you move a layer around you move its "world coordinates". World coordinates are transformed into screen (pixel) coordinates. This transformation depends on the camera settings (position, rotation, field of view) and the screen resolution.
Sometimes however you would like to position layers in pixel coordinates. Here's how:
-set the FIELD OF VIEW property of the camera layer to 90
-set the ROTATION property of the camera layer to (0,0,0)
-set the POSITION property of the camera layer to (h/2, -v/2, -v/2) where h is the horizontal resolution and v the vertical. For example when using a resolution of 640 x 360 use a value of (320,-180,-180)
Now when you position a layer at (0,0,0) it will be rendered at the top-left corner of the screen.
And when you position it at (h,-v,0) it will be rendered at the bottom-right corner of the screen.
3D world coordinates match 2D pixel coordinates!
Thanks for the info - could you explain the following?
When I use a container sometimes the objects rotate around the axis of the contained object e.g. a picture. Other times - it seems random but I'm sure there's a reason - I add another object or adjust an existing objects properties and then the axis of rotation changes as though there is "arm length" applied to the rotation.
This ruins the rotation effect I'm trying to apply - am I doing something to cause this?
Dave
DaveH, 15 years ago
DaveH, this "arm length effect" is probably caused by rotating a container layer that has attached a layer with a non-zero POSITION property. Try setting the POSITION property of the attached layer to (0,0,0).
michiel, 15 years ago
Thanks Michiel I suppose it should have been obvious to me :-(
It's the depth of the object causing the "problem"; if you push one object further back than another the rotation does indeed have the "arm lenght effect"
Thanks for the assistance. Dave
DaveH, 15 years ago
Picture layers always have a height of 250 world coordinates.
Set the SIZE property of the picture layer to (v/250,v/250,v/250) to use this pixel coordinates system where v is the vertical resolution of the image.
michiel, 15 years ago
Michiel den Outer is the founder and lead coder of Outerspace Software. He lives in Rotterdam, the Netherlands.
If he isn't busy improving BluffTitler, he is playing the piano or rides the Dutch dikes on his bikes.
814 articles 4.1M views
Contact michiel by using the comment form on this page or at info@outerspace-software.com