Sunday 30 August 2009

DepthMask Filter New Example


This example shows the exact same filter, but a more complex 3D scene.
As before, you can click and drag the object in x and y planes, and use the scroll wheel to move in the z plane.
Try moving the beachball around the scene and notice that it is masked correctly in all 3d positions.
You can place it between the car and figure, or halfway through the windscreen, behind a pillar, etc.
The actual 3d Studio Max scene fills around 25Mb, as appose to 150Kb as an image+ depthmap.

Now just to add some normal mapping (example here) to both background and object to get the lighting right...

5 comments:

Unknown said...

wow sofa loookss AAAWWWEEESSSOOOMMEE !!!
i think all it needs is bumpmapping to give it feel for more texture. I am currently looking forward to make mine like that. Also the depth map implementation is sick. Recently i started to feel the need for depth mapping since its perfect for moving light as 3D in 2D environment.
Couple of questions though...

-Is the sofa 3D or 2D ?
-Is ur source code available for both sofa and depth mapping?
-Most importantly can u explain the concept behind both of them and provide few technical points like wat filters u used and so forth?

Unknown said...

Does your normal map on sofa use the same principle as posted here

http://www.neuroproductions.be/experiments/3d-normal-mapping-pixelbender/

Videometry.net said...

Not sure, I multiply each channel of the normal map by the normalized position of the "light", and add that to the diffuse map. There's no real lighting model (phong, etc.) or anything, but it works like a directional light.
I'm using it now with Away3Dlite. Hopefully the lighting filters from Away3D will make it over to Lite soon?

Unknown said...

Ok so lemme get this right. I use convolution filter to get R, G and B channel and assuming that R is Z axis (towards the screen) i apply displacement filter on my lightmap using normalmap bitmapdata whose R channel has less transparency than G and B channels. I am little noob and i jus learned bump mapping so i think its pretty much the same concept but i just gotta play along with R G B channels to change my light.

Videometry.net said...

Personally, I don't use convolution or displacement filters, just a single shader that turns the intensity of a pixel up or down depending on the x/y coordinates of a fictive light source. See here. http://videometry.blogspot.com/2009/09/normal-mapping.html

Post a Comment