Jump to content

Texture Coordinates From Camera


Recommended Posts

Hi list.

I have to integrate an effect in a live footage.

The footage is an open environment with a road. I have to create some effects on this road so i have to create a computer generated road to sustitute the original.

I have the camera and some features tracked, from these features i have created the geometry for the road.

My problem is to texture this geometry, i want to use the original plate as the texture, so i think i have to project the texture coordinates for the road geometry from the tracked camera, and then simply use the original plate as texture.

I have done this using the UVTexture SOP, setting the texture type as "Perspective from camera" and using the tracked cam, but when i visualize the texture using a UVQuickShade SOP i get strange results, simply the texture don't match. I have tested rendering the geo and i get the same bad results.

Can anybody give me some advices about how to match a plate over his tracked geometry?

Or how to use the live footage as texture for the geometry tracked from them?


Link to comment
Share on other sites

These are some screenshot that explains what i want to do:

This is the plate loaded into Houdini with the road geometry and viewed from the tracked cam:


This is only the road viewed from the tracked cam:


And this is the first frame of the live sequence:


Well that i want to do is to use a camera projection to proyect the road in the live footage over the road geo so both of them match in comp.

So i can use the original road as texture for the road geo.

Any advices ....


Link to comment
Share on other sites

i would start with trying to match the geom more accurately to the original photo, by not having too many triangles, and rather "edge loop" the details in your scene.

I found that if i had neater geom that contour your details, it gave me better results.

The facet sop with post compute normals usefull when fixing the strange looking faces.

if at all possible, if u could post a little hip with the tex file, it would be great to take a look?

hope this helps


Link to comment
Share on other sites

i'm kinda wondering why you would want to render the road in the first place... i mean, this whole thing is so you can composite elements on top of the road, right? so wouldn't the road geometry be just for a placement/perspective guide (and possibly for matte reasons)? i would think you'd just want to render out the elements and leave the original road in from the plate..

although, i suppose of you wanted reflections on any of those elements, you would need the texture.. hmm.. ignore my ramblings..

Link to comment
Share on other sites

try this simple shader


Thanks Andrew that is what i am looking for.

I forget that NDC and texture coordinates both lives in the same [0,1] domain, and then you can use NDC to index into the texture map.

Using this with a camere projection to assing UVs to the object do a perfect job!

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.

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...