|
From: Bruce S. <Bru...@nc...> - 2004-08-12 00:18:41
|
I'm glad Jonathan understood, as I obviously didn't. Also, Isaac Hanson
sent me the following test routine which shows the problem:
import visual
visual.box(height=10, width=10, length=10, color=visual.color.cyan)
s = visual.sphere(pos=(0,0,-1180), color=visual.color.red)
visual.scene.autocenter = 0
visual.scene.autoscale = 0
while 1:
visual.rate(30)
s.pos.z += -1
Zoom in (manually) so the cube fills much of the window, and wait.
You'll see the creep.
Bruce Sherwood
Jonathan Brandmeyer wrote:
> On Wed, 2004-08-11 at 16:51, Bruce Sherwood wrote:
>
>>I don't understand the "near-clipping plane" problem. Is it simply that
>>you want to set scene.autoscale = 0?
>>
>>Here is the bug report you submitted, for Linux:
>>
>>"My program is a test of a rigid body simulation package, pyode. The
>>scene consists of a few boxes near position (0,0,0) and a sphere.
>>The sphere starts from a position behind the viewer, rolls towards
>>the boxes, crashes into them, bounces back towards the viewer,
>>then continues to roll far behind the viewer. After the sphere rolls
>>for a little while, the near clipping plane begins to move forward into
>>the scene. I have "autocenter" turned off, and the forward
>>progression of the near clipping plane seems to be related to the
>>distance of the sphere from the scene."
>>
>>I wrote a similar-sounding program, which seems to behave properly:
>>
>>box(color=color.cyan)
>>s = sphere(pos=(0,0,100), color=color.red)
>>dz = -1
>>##scene.autocenter = 0
>>##scene.autoscale = 0
>>while 1:
>> rate(20)
>> s.pos += vector(0,0,dz)
>> if s.pos.z < 1:
>> dz = -dz
>>
>>Turning off autocenter doesn't do anything that I can see. With the
>>default autoscale on, the camera is moved to make sure that you always
>>see something. I'm not sure what you want to have happen, but it sounds
>>to me like you should turn off autoscaling and manage the view yourself.
>>
>>Bruce Sherwood
>
>
> No, it is a legitimate complaint. For example, run stars with a lot of
> stars and velocity such that at least a few stars fly away and there is
> plenty to look at in the middle for a while. Zoom the camera into the
> scene, and position the camera such that a trail is "in your face". You
> should be able to see the cross-section of the trail as it is clipped by
> the near clipping plane. As some of the stars fly away from the
> cluster, you will notice the plane slowly move further into the scene.
> Eventually, it will cut deeply into the scene.
>
> I just committed a fix for this problem into CVS a few minutes ago.
> Basically, the new behavior is that system decides if the camera might
> be located within the scene's bounding box, and if so, sets the near
> clipping plane distance to a small fixed value.
>
> Previously, the distance was set to a fixed multiple of the scaled
> extent of the scene. A scene whose objects span a volume much larger
> than the display's viewing volume would have an inappropriately large
> near clipping plane distance.
>
> -Jonathan
>
>
>
> -------------------------------------------------------
> SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
> 100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
> Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
> http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
> _______________________________________________
> Visualpython-users mailing list
> Vis...@li...
> https://lists.sourceforge.net/lists/listinfo/visualpython-users
|