开发者

How to blur 3d object? (Papervision 3d)

How to blur 3d object? (Papervision 3d) And save created new object as new 3开发者_Go百科d model? (can help in sky/clouds generation)

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

How to blur 3d object? (Papervision 3d)

(source: narod.ru)


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


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.


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜