Skip to main content
GameDev.net gamedev.net
🔒 Locked

Enlarging an object post-procss

Started by Unfadable Aug 12, 2006 at 10:23 PM 2 replies 500+ views
Original Post
Unfadable
Unfadable
Hi, I'd like to an alraedy rendered object and make it large as a post-process step. Not just a simple scale, like if it was a donut, i'd want the hole to shrink as well. Anyone know where I should start with this?
Kest
Kest
Please explain 'post-process'. Are you talking about after you model the object, after you transform the object, or after you render the object? I'm not sure I understand how it would be possible to scale an object after it has been rendered.
ToohrVyk
ToohrVyk
This would imply each vertex moving away from the "body" of the model, so translating vertices by their normal vector would be a good start.
Jason Z
Jason Z
I think he means after it is rendered. You would have to store some extra information in an offscreen buffer in a semi-deferred shading setup. Most likely you could store the vertex normal interpolated per-pixel, then projected onto the screen space by setting z=0 after you are in clipspace.

Then when you want to expand the object, you either need to have some way of detecting this particular object. If it is the only object that will scale, all of the other normals will be zero in your normal buffer, so you could just render a full screen post process quad that samples the back buffer by offsetting its texture coordinates by the normal vector.

Thats not a perfect algorithm, but it should get you started.
Jason Zink :: DirectX MVP   Direct3D 11 engine on CodePlex: Hieroglyph 3 Direct3D Books: 

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.