Jump to content

Bake/lock/write-out New Uv From Camprojection


Recommended Posts

Hi.

My current scene makes use of quite a bit of camera mapping.

I want to deform some of the objects, however, because the texture is projected from a camera onto the geometry, any deformations dont effect the texture.

How do I do this?

I assume I have to bake out or lock the texture in some way. Im not quite sure how to do this with a camera projection - and if i do, how do I then reproject it correctly?

Any advice would be much appreciated

ive read in Maya that you can create a Texture reference object to do this....anything similar in Houdini?

J

Link to comment
Share on other sites

ok managed to answer my own question. but ill post for benefit of others

simply created a new geo - inside that an object merge and referenced my projected object.

Now I can deform with the textures staying locked.

Any way I could do alternative methods/improvements?

J

Link to comment
Share on other sites

How about just copying the uv's back onto your object from one written out to disk in it's undeformed state. The point sop, vertex sop or attribcopy sop will do the copying depending on the type of uv's

Actually why aren't you just creating the uv's higher up the chain before the deformations?

Edited by sibarrick
Link to comment
Share on other sites

Hey Johnny,

You're projecting the texture from a light, so to fix the texture you have to use rest positions.

Add a RestPosition SOP before the deformations and feed both inputs with the same data. Then in your shader you'll need to add a vector parameter called "rest", whose value can default to P. Now, wherever you currently use "P" to do the texture lookup, you'll use "rest" instead. But since rest is now defined in object space, you actually need to use "ow_space(rest)" -- in VOP-speak, this would be an "Object to World" transform using the SpaceChange VOP.

Hope that makes sense,

Cheers!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...