Sign in to follow this  

How did they acheive that cutout stencil effect in Katamari?

This topic is 4301 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

You know when the character moves behind a large object and there's a shape cutout of it so you can still see your character? Any idea how that was done? Does it have something to do with a stencil buffer? Any ideas? Thanks

Share this post


Link to post
Share on other sites
If I recall it wasn't a cutout, really, but a kind of silhouette. If it were up to me I'd do something like that using normal geometry and z-fail. There is a similar effect in Chibi Robo for gamecube. Dollars to donuts says they just draw the character once using z-pass, turn on tex-gen and set up an appropriate texture, and render the character again using z-fail.

Share this post


Link to post
Share on other sites
I'll explain a step by step example, sans textures.

Lets say you have a sphere that is hiding halfway behind a wall.

1) Draw the wall in blue.
2) Set the depth test to 'pass on closer'.
3) Draw the sphere in red.

At this point you have a blue wall, with part of a red sphere showing from behind it.

4) Set the depth test to 'pass on further away'.
5) Draw the sphere in green.

By setting the depth test to pass on further away, the part of the sphere that is actually behind the wall will be drawn 'in front' of it. You'll now see half the sphere in red, where it is not behind the wall, and the other half in green, where it is behind the wall.

Share this post


Link to post
Share on other sites

This topic is 4301 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this