Jump to content
  • Advertisement
Sign in to follow this  
chippolot

How did they acheive that cutout stencil effect in Katamari?

This topic is 4467 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
Advertisement
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
Hm... I'm not quite clear what the terms "z-pass", "tex-gen", and "z-fail" mean... Haha... could you clarify those a bit for me?

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
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!