[Papervision3D] RectangleTriangleCuller
Patrick Matte | BLITZ
PMatte at blitzagency.com
Thu Aug 9 16:08:29 PDT 2007
Oh ok, for some reason I thought everything was drawn on a bitmapdata. I've never gone too deep in the core code...
BLITZ | Patrick Matte 310-551-0200 x214
From: papervision3d-bounces at osflash.org [mailto:papervision3d-bounces at osflash.org] On Behalf Of John Grden
Sent: Thursday, August 09, 2007 2:59 PM
To: papervision3d at osflash.org
Subject: Re: [Papervision3D] RectangleTriangleCuller
I'll let ralph expand on this, but all tri's are drawn using the drawing api into the graphics object of Sprite containers. Right now, it all happens in one container (with the exception of separate containers for MovieScene3D, but that's beside the point).
The work I'm doing with De'Angelo on the ISM with face level support has 2 options:
1. draw all tri's in separate Sprite containers
2. draw all tri's in separate Sprite containers in the ISM layer
we've also left it so you can leave the render loop untouched and have it draw like it does now and maintain the speed.
On 8/9/07, Patrick Matte | BLITZ <PMatte at blitzagency.com<mailto:PMatte at blitzagency.com>> wrote:
So you're saying that papervision draws every single triangle right in the container's bitmap's bitmapdata? I thought you would draw everything in a temp bitmapdata, then redraw just a small part of that in the movieclip.
BLITZ | Patrick Matte 310-551-0200 x214
From: papervision3d-bounces at osflash.org<mailto:papervision3d-bounces at osflash.org> [mailto: papervision3d-bounces at osflash.org<mailto:papervision3d-bounces at osflash.org>] On Behalf Of Ralph Hauwert
Sent: Thursday, August 09, 2007 1:42 PM
To: papervision3d at osflash.org<mailto:papervision3d at osflash.org>
Subject: Re: [Papervision3D] RectangleTriangleCuller
Problem is, that in the triangle renderpipeline of Papervision3D that's not used, and we won't use it, because it's to slow to use inside the triangle pipeline....(that means - on a per tri basis).
Ralph.
On 8/9/07, Patrick Matte | BLITZ <PMatte at blitzagency.com<mailto:PMatte at blitzagency.com>> wrote:
Well you could supply the rectangle as clipRect when you draw the bitmapdata to the movieclip no ? Check the 5th parameter of the BitmapData.draw method.
public function draw(source:IBitmapDrawable<http://../../flash/display/IBitmapDrawable.html>, matrix:Matrix<http://../../flash/geom/Matrix.html> = null, colorTransform:ColorTransform<http://../../flash/geom/ColorTransform.html> = null, blendMode: String<http://../../String.html> = null, clipRect: Rectangle<http://../../flash/geom/Rectangle.html> = null, smoothing:Boolean<http://../../Boolean.html> = false): void<http://../../specialTypes.html#void>
BLITZ | Patrick Matte 310-551-0200 x214
From: papervision3d-bounces at osflash.org <mailto:papervision3d-bounces at osflash.org> [mailto:papervision3d-bounces at osflash.org<mailto:papervision3d-bounces at osflash.org>] On Behalf Of Ralph Hauwert
Sent: Thursday, August 09, 2007 11:42 AM
To: papervision3d at osflash.org<mailto:papervision3d at osflash.org>
Subject: Re: [Papervision3D] RectangleTriangleCuller
Hi Patrick,
I'm actually about to go on holiday...work is taking over before that point ;-)
The RCT is meant to only discard triangles which fall outside the view area. What you are missing is clipping. We could have papervision3D do the clipping of the triangles, but imho, the Flash Rasterizer already takes care of that normally, so why do it double, and in the much slower AS3 API.
We didn't implement a standard way to do clipping as of yet. There's 3 methods available with Flash :
1. setMask
2. scrollRect
3. blendmode alpha
I think 2 is the most fast way to do it; but a scrollrect changes the coordinate system around; then I'd go for 3 normally (draw a rectangle in a sprite, and have it blendmode as alpha).
Ralph.
On 8/9/07, Patrick Matte | BLITZ <PMatte at blitzagency.com<mailto:PMatte at blitzagency.com>> wrote:
The RectangleTriangleCuller thing is nice but I can still see some triangles being drawn outside of the rectangle area. Couldn't the bitmap drawn in the sprite just be cropped to the size of the supplied rectangle?
Is Ralph still on vacation? I guess I'm not gonna get an answer to this until he gets back...
BLITZ | Patrick Matte 310-551-0200 x214
From: papervision3d-bounces at osflash.org <mailto:papervision3d-bounces at osflash.org> [mailto: papervision3d-bounces at osflash.org<mailto:papervision3d-bounces at osflash.org>] On Behalf Of John Grden
Sent: Wednesday, August 08, 2007 8:20 PM
To: papervision3d at osflash.org<mailto:papervision3d at osflash.org>
Subject: Re: [Papervision3D] viewable area
HEHE yeah buddy \m/
;) Thank Ralphy for the culling, he's very "cunning"
HAHA, pun's are free tonight only.
On 8/8/07, Patrick Matte | BLITZ <PMatte at blitzagency.com<mailto:PMatte at blitzagency.com>> wrote:
John, I just added it and gained 4-5 fps!
\m/
BLITZ | Patrick Matte 310-551-0200 x214
From: papervision3d-bounces at osflash.org <mailto:papervision3d-bounces at osflash.org> [mailto:papervision3d-bounces at osflash.org<mailto:papervision3d-bounces at osflash.org>] On Behalf Of John Grden
Sent: Wednesday, August 08, 2007 7:51 PM
To: papervision3d at osflash.org<mailto:papervision3d at osflash.org>
Subject: Re: [Papervision3D] viewable area
Hey Patrick, use the new RectangleTriangleCuller option in 1.5 and then specify scrollRect for the container to mask the area off:
http://www.rockonflash.com/blog/?p=58 - demo files are there for you to check out.
I think that's probably what you're after, yes?
On 8/8/07, Patrick Matte | BLITZ < PMatte at blitzagency.com<mailto:PMatte at blitzagency.com>> wrote:
Is there a way to specify the width and height of the drawing area of the papervision container ?
I'm gonna have a small papervision scene inside a big flash website. I can put a mask on the container but I think it would just be easier to crop the bitmapdata that's drawn into the container. No ?
_______________________________________________
Papervision3D mailing list
Papervision3D at osflash.org<mailto:Papervision3D at osflash.org>
http://osflash.org/mailman/listinfo/papervision3d_osflash.org
--
[ JPG ]
_______________________________________________
Papervision3D mailing list
Papervision3D at osflash.org<mailto:Papervision3D at osflash.org>
http://osflash.org/mailman/listinfo/papervision3d_osflash.org
--
[ JPG ]
_______________________________________________
Papervision3D mailing list
Papervision3D at osflash.org<mailto:Papervision3D at osflash.org>
http://osflash.org/mailman/listinfo/papervision3d_osflash.org
--
Ralph Hauwert
_______________________________________________
Papervision3D mailing list
Papervision3D at osflash.org<mailto:Papervision3D at osflash.org>
http://osflash.org/mailman/listinfo/papervision3d_osflash.org
--
Ralph Hauwert
_______________________________________________
Papervision3D mailing list
Papervision3D at osflash.org<mailto:Papervision3D at osflash.org>
http://osflash.org/mailman/listinfo/papervision3d_osflash.org
--
[ JPG ]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://osflash.org/pipermail/papervision3d_osflash.org/attachments/20070809/36e64649/attachment-0001.html
More information about the Papervision3D
mailing list