This is G o o g l e's cache of http://www.flashsandy.org/forum/index.php?showtopic=472&mode=threaded&pid=2805 as retrieved on 2 Aug 2007 00:04:18 GMT.
G o o g l e's cache is the snapshot that we took of the page as we crawled the web.
The page may have changed since that time. Click here for the current page without highlighting.
This cached page may reference images which are no longer available. Click here for the cached text only.
To link to or bookmark this page, use the following url: http://www.google.com/search?q=cache:1BLVEc0P8RgJ:www.flashsandy.org/forum/index.php%3Fshowtopic%3D472%26mode%3Dthreaded%26pid%3D2805+site:www.flashsandy.org+showtopic&hl=en&ct=clnk&cd=87


Google is neither affiliated with the authors of this page nor responsible for its content.
These terms only appear in links pointing to this page: showtopic

Welcome Guest ( Log In | Register )

> Placing camera at the center of a scene
zeusprod
post Apr 23 2007, 10:18 PM
Post #1


Advanced Member
***

Group: Members
Posts: 226
Joined: 14-February 07
Member No.: 801



I'm trying to do a relatively simple thing:

I want to place a camera in the middle of a room and rotate the camera around so the user can look around the room.

Does anyone have a simple example that works in Sandy 1.2?

I think there are some pretty significant rendering bugs in Sandy 1.2 when the camera is placed at {0,0,0}.

I'm attaching a modified version of Petit's camera tutorial I'm attaching swfs and source for both Sandy 1.1 and Sandy 1.2.

I've added buttons for turning backface culling on/off, and also a button to toggle swapCulling.

I've added a box primitive with each face being a different color.

When you place the camera inside the box (at 0,0,0), all sorts of weird rendering problems appear. The walls are twisted like hour-glasses or other pointy shapes.

The results differ somewhat depending on whether backface culling is on or off and depending on the version of Sandy.

I don't have any idea where to start to fix this, frankly.

I've tried a variation in which I've used 4 planes (with their normals facing inward) to create a room's walls. That works better than the cube but doesn't work for all camera positions.

Eventually, I need to allow the user to move to any spot in the room and then spin around. So far I'm struggling.

Should I use the camera rotation commands, or should I use the tilt,pan,roll options?

Should I put the camera at 0,0,0 and set the lookat to 0,0,50, or is there some better strategy?

Also, the best I can get it to work isn't very good. The walls don't appear unless the entire wall is in the camera view. I want it to render a piece of the wall as it comes into view, but that doesn't seem to work.


Maybe I'll try to port the example to Sandy 2.0 and see if that works any better.


Thanks in advance for any insights.

Bruce



Attached File(s)
Attached File  camera_test.zip ( 1.01mb ) Number of downloads: 53
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
 
Reply to this topicStart new topic
Replies
kiroukou
post Apr 24 2007, 07:03 AM
Post #2


Administrator
***

Group: Root Admin
Posts: 886
Joined: 12-June 06
Member No.: 1



In Sandy 1.2 you need to enable the clippipng to do this.
with sandy 1.1 that should work since the cubic pano is working the same way...;

++
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
zeusprod
post Apr 24 2007, 03:01 PM
Post #3


Advanced Member
***

Group: Members
Posts: 226
Joined: 14-February 07
Member No.: 801



QUOTE(kiroukou @ Apr 24 2007, 03:03 AM) *

In Sandy 1.2 you need to enable the clippipng to do this.
with sandy 1.1 that should work since the cubic pano is working the same way...;

++


Thanks! I didn't know about the Object3D.enableClipping() method!

It helps a lot.

It seems that once I enable clipping, even if I try to shut it off, clipping remains enabled. Looking at the code in Object3D.as, it seems there is no code to disable clipping (i.e., to undo the effect of enabling clipping).

Should I always leave clipping on?

What, if any, are the reasons to turn it off?

Does it improve or degrade performance?

Thanks again. You just made my life a LOT easier.

Cheers,
Bruce



User is offlineProfile CardPM
Go to the top of the page
+Quote Post



Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

- Lo-Fi Version Time is now: 1st August 2007 - 11:44 PM
phpMyVisites