|
| zeusprod |
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) |
| kiroukou |
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...; ++ |
| zeusprod |
Post
#3
|
|
Advanced Member Group: Members Posts: 226 Joined: 14-February 07 Member No.: 801 |
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 |
| Lo-Fi Version | Time is now: 1st August 2007 - 11:44 PM |