views:

144

answers:

3

How to blur 3d object? (Papervision 3d) And save created new object as new 3d model? (can help in sky/clouds generation)

Like in 2d picture I've turn rectangel intu some blury structure

alt text

+1  A: 

I'm not familiar with Papervision 3D, but blurring in 3D is normally just blurring in 2D. You pick the object you want blurred, determine the blurring you want for that object, then apply a 2D blur before compositing other objects into the scene.

This is a cheat because in principle, different parts of the object may need different degrees of (depth of field) blurring. But it's not the only cheat in 3D graphics.

That said, there are other approaches. Ray-tracing can give true depth-of-field effects (if you're willing to pay the render-time costs). It's also possible to apply a blur to a 3D "voxel" grid instead of a 2D pixel grid - though I imagine that's more useful for smoothing shapes from e.g. medical scanners than for giving depth-of-field effects.

Steve314
I do not want DOF or 2d cheats) I need a real blur. On 3d object. (I know it may be hard to emagine - a real 3d blur or a real 3d object but I belive it can be done. I just wonder how to do such thing)
Blender
Other than raytracing, everything is a cheat. For example, you can blur each pixel based on the Z-buffer distance. That's stll just a *closer* *approximation* to true depth of field, and of course you're already in "write my own 3D rendering engine" territory. Even in ray-tracing, depth of field is probably often faked since true depth-of-field ray-tracing is extremely costly in processing time. Where in-focus requires a single ray per pixel (or several for anti-aliassing), accurate depth-of-field could easily run to thousands of rays per pixel - maybe millions.
Steve314
The key point is that in real life, every photon is effectively a special-purpose parallel processor contributing to the "what can I see" calculation. Computers don't have the luxury of parallel processing on that scale, so they have to use shortcut approximations.
Steve314
alxx
+1  A: 

Blur is 2D operation, try to render object into texture and blur that texture.

alxx
+1  A: 

Set useOwnContainer to true the add the filter:

your3DObject.useOwnContainer = true;
your3DObject.filters = [new BlurFilter(4,4,2)];

When you set useOwnContainer to true, a new 2d DisplayObject is created to render the 3d projection into, and you can apply of the usual DisplayObject properties to that.

Andy Zupko has a good post about this and render layers.

Using this will cost your processor a bit, so use it wisely. For example in the twigital I worked on at disturb media we used one Glow for the layer that holds all the characters, not inidividual render layers for each character. On other projects we 'baked' the filters into bitmaps and used them, this meant a bit more memory, but freed up the processor a bit for other tasks.

HTH

George Profenza
BTW have you seen any isometric opensourse extentions for PV3d?
Blender
@Ole Jak You don't need any 'extension' for that, just set the ortho property of the camera to true(http://www.flashbookmarks.com/PV3D-GreatWhite-DOC/org/papervision3d/core/proto/CameraObject3D.html#ortho)That will give you the isometric look, you just need to place the camera properly to get the isometric angle you need(28.8, 30, 45 degrees, etc. )Not related to Papervision, there are a few as3 isometric libraries like:http://www.ffilmation.org/website/and http://code.google.com/p/as3isolib/
George Profenza