[Papervision3D] Two spheres & camera rotation
Ryan Christensen [draw.logic]
del at kartoon.net
Tue Sep 25 17:33:12 PDT 2007
Yes the painter algorithm can be tricky due to the way it draws.
Other things you could try:
- move the small sphere a bit farther away from the larger sphere
- make the smaller sphere bigger
The problem is the small sphere is so tiny that it is able to fit in the
polys of the larger sphere, if it was larger it would possibly be a bit
smoother and if it was further away on the radius from the center of the
larger sphere it might fool the eye a little more.
Away3D has some implementations that subdivide the triangles on edges where
items cross and that might help you here but it is very processor intensive.
Painters algo is what pv3d is based on it draws from back to front that is
why you have this issue.
To see Away3d z-order solution to this see the demo here:
MCSD C#.NET | MCSD C++ | MCAD.NET | Java
Bridgeware.com | eMarketinginc.com
design and programming services
ryan at drawk.com
C# | Java | PHP
MS SQL | Oracle | mySQL
----- Original Message -----
From: "Tim Knip" <tim.knip at gmail.com>
To: <papervision3d at osflash.org>
Sent: Tuesday, September 25, 2007 3:13 PM
Subject: Re: [Papervision3D] Two spheres & camera rotation
> I'm afraid only thing you could try is enlarging the number of faces
> on the large sphere.
> (Or use a larger small sphere :)
> Its the classical z-sort problem due to pv3d's use of the painters
> 2007/9/26, Brad Umbaugh <brad.umbaugh at effectiveui.com>:
>> Hi everyone,
>> I'm working on an app where I have a camera rotating around the center of
>> large sphere (radius 200); next to that large sphere is a second, smaller
>> sphere (radius 4). The camera is rotating around the large sphere's
>> at a radius of 500. When I place the smaller sphere at a distance of
>> large_sphere_radius+20 from the large sphere's center and rotate the
>> around, everything looks great.
>> However, if I place the smaller sphere at a distance of
>> large_sphere_radius+6 from the large sphere's center, rendering problems
>> occur. In this case, when the camera's movement causes the small sphere
>> look as though it is moving towards the large sphere's edge, it suddenly
>> renders -- before it should -- BEHIND the larger sphere. The small
>> continues to move correctly in the x and y directions, but the z-ordering
>> rendered incorrectly until the point when the small sphere should,
>> of the camera rotation, be behind the larger sphere anyway.
>> Here's a demo; click and drag the large sphere and you should see the
>> red sphere doing what I'm talking about.
>> I didn't expect to see this problem when rendered objects are not
>> As mentioned by John Grden in another thread on this mailing list, I
>> attempted to change the meshSort settings on both spheres (I tried a
>> of different combinations), but the problem has persisted. Is there any
>> other way to fix this?
>> Thanks guys,
>> Papervision3D mailing list
>> Papervision3D at osflash.org
> Papervision3D mailing list
> Papervision3D at osflash.org
More information about the Papervision3D