[Papervision3D] culling help (Jonathon Stierman)
Strange Loop Studios
info at strangeloopstudios.com
Wed Jul 22 23:16:53 PDT 2009
Hi Jonathon,
I've had similar issues recently as well as in the past and my suggestion
would be to use ViewportLayers. The quick and easy approach to see if this
might work would be to set box.useOwnContainer and doors.useOwnContainer to
true. This will dynamically put each object in its own layer. Within the
main viewport (which is a layer itself) - you can then mess about with
ViewportLayerSortMode.
Chances are useOwnContainer will not completely fix the issue because I
think that for each render a new layer is dynamically assigned to each
object. The way I managed to fix my issue was by creating all my layers in
advance on app initialize and then switching them by index for each
subsequent render depending on the distance between the camera and my
objects.
So - as a quick example ->
//First create a layer within the viewport//
_planesLayer = new ViewportLayer(_basicView.viewport, null);
_basicView.viewport.containerSprite.addLayer(_planesLayer);
_planesLayer.sortMode = ViewportLayerSortMode.INDEX_SORT;
//Then on first render create a layer for each object//
_planesLayer.getChildLayer(plane, true).layerIndex = _planeCount*i;
//Then on each render update the index//
_planesLayer.getChildLayer(plane, false).layerIndex = _planeCount-offset;
Hope this helps
Doug
-----Original Message-----
From: papervision3d-bounces at osflash.org
[mailto:papervision3d-bounces at osflash.org] On Behalf Of
papervision3d-request at osflash.org
Sent: 22 July 2009 20:00
To: papervision3d at osflash.org
Subject: Papervision3D Digest, Vol 34, Issue 82
Send Papervision3D mailing list submissions to
papervision3d at osflash.org
To subscribe or unsubscribe via the World Wide Web, visit
http://osflash.org/mailman/listinfo/papervision3d_osflash.org
or, via email, send a message with subject or body 'help' to
papervision3d-request at osflash.org
You can reach the person managing the list at
papervision3d-owner at osflash.org
When replying, please edit your Subject line so it is more specific
than "Re: Contents of Papervision3D digest..."
Today's Topics:
1. Re: culling help (Jonathon Stierman)
----------------------------------------------------------------------
Message: 1
Date: Wed, 22 Jul 2009 13:20:33 -0500
From: Jonathon Stierman <jstierman at modernclimate.com>
Subject: Re: [Papervision3D] culling help
To: "papervision3d at osflash.org" <papervision3d at osflash.org>
Message-ID:
<BDE29F4DE8452E42BDC51A52C0F6A0A3BCA03D13EB at exchange.wolfmotell.local>
Content-Type: text/plain; charset="us-ascii"
Thanks, guys!
I'll play around with the x/y/z values of the doors to see if I can make
something work a little better without having to change the rendering
engine. The Quad does look much better, but sadly doesn't run fast enough
with everything else going on.
I'm also running into frustrum clipping issues too though -- was going to
save that for another post ;) -- so I'll play around with that too.
Thanks!
Jonathon
-----Original Message-----
From: papervision3d-bounces at osflash.org
[mailto:papervision3d-bounces at osflash.org] On Behalf Of
nospam at therossman.org
Sent: Wednesday, July 22, 2009 1:16 PM
To: papervision3d at osflash.org
Subject: Re: [Papervision3D] culling help
if there isn't much going on in the scene you can also try the quad
renderer - it's slower but produces a far superior render than the basic
renderer in regards to z-fighting.
cheers,
mark
>
> FrustumClipping deals with triangles that intersect with the frustum
> planes,
> so I don't think that's the way to go. Your problem has to do with
> triangles
> that are z-fighting.
>
> However, I noticed that you set the doors at the same depth as the
> backside
> of the box. If you would remove them 1 or 2 units away from the box and
> play
> around a little with the x values of the doors,
> you probably get rid of the z-sorting problem.
>
> Jeff.
>
>
>
> Maggical wrote:
>>
>> I asked a similar question once, and this helped a lot:
>>
>> http://blog.zupko.info/?p=170
>>
>> Hope it helps you!
>>
>> Javier
>> www.javierespana.com
>>
>> On Wed, Jul 22, 2009 at 2:27 PM, Jonathon Stierman <
>> jstierman at modernclimate.com> wrote:
>>
>>> That does help! But I still see smaller missing polygons, using 6-8
>>> segments. They're fairly un-noticeable though...
>>>
>>> Is there anything else I could try to get it all the way there?
>>>
>>> Jonathon
>>>
>>> -----Original Message-----
>>> From: papervision3d-bounces at osflash.org [mailto:
>>> papervision3d-bounces at osflash.org] On Behalf Of Jeff Winder
>>> Sent: Wednesday, July 22, 2009 4:36 AM
>>> To: papervision3D at osflash.org
>>> Subject: Re: [Papervision3D] culling help
>>>
>>>
>>> I think increasing the number of segments of the cube would help a lot,
>>> as
>>> you only use 1 width, depth and height segment right now.
>>>
>>> Jeff.
>>>
>>>
>>> Jonathon Stierman-3 wrote:
>>> >
>>> > I've got a bit of a culling issue that I'm hoping someone can give me
>>> some
>>> > pointers on. I'm working on a little animation for a box that can
>>> open
>>> > and close. I'm using a Cube instance, along with a couple of Plane
>>> > instances to use as the doors. When looking dead-on at the
>>> animation,
>>> it
>>> > looks perfect, but as soon as I start rotating the cube, the "door"
>>> > polygons seem to disappear while opening/closing.
>>> >
>>> > I've done some googling, played around with clipping and culling
>>> settings,
>>> > but I haven't been able to make the door polygons always render.
>>> >
>>> > I have attached the source code if anyone would like to take a look.
>>> > You'll need the Tweener library, and the flash components (for the
>>> Button
>>> > class), and Papervision, obviously.
>>> >
>>> > Jonathon
>>> >
>>> >
>>> >
>>> > _______________________________________________
>>> > Papervision3D mailing list
>>> > Papervision3D at osflash.org
>>> > http://osflash.org/mailman/listinfo/papervision3d_osflash.org
>>> >
>>> >
>>>
>>> --
>>> View this message in context:
>>> http://www.nabble.com/culling-help-tp24593780p24602982.html
>>> Sent from the Papervision3D mailing list archive at Nabble.com.
>>>
>>>
>>> _______________________________________________
>>> Papervision3D mailing list
>>> Papervision3D at osflash.org
>>> http://osflash.org/mailman/listinfo/papervision3d_osflash.org
>>>
>>> _______________________________________________
>>> Papervision3D mailing list
>>> Papervision3D at osflash.org
>>> http://osflash.org/mailman/listinfo/papervision3d_osflash.org
>>>
>>>
>>
>> _______________________________________________
>> Papervision3D mailing list
>> Papervision3D at osflash.org
>> http://osflash.org/mailman/listinfo/papervision3d_osflash.org
>>
>>
>
> --
> View this message in context:
> http://www.nabble.com/culling-help-tp24593780p24611387.html
> Sent from the Papervision3D mailing list archive at Nabble.com.
>
>
> _______________________________________________
> Papervision3D mailing list
> Papervision3D at osflash.org
> http://osflash.org/mailman/listinfo/papervision3d_osflash.org
>
_______________________________________________
Papervision3D mailing list
Papervision3D at osflash.org
http://osflash.org/mailman/listinfo/papervision3d_osflash.org
------------------------------
_______________________________________________
Papervision3D mailing list
Papervision3D at osflash.org
http://osflash.org/mailman/listinfo/papervision3d_osflash.org
End of Papervision3D Digest, Vol 34, Issue 82
*********************************************
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
More information about the Papervision3D
mailing list