Projecting a back image onto a 3D object

   1798   1   1
User Avatar
Member
1 posts
Joined: Nov. 2020
Offline
Hi,

I'm still learning so apologies if this has been asked before. Quick search in the forums didn't help me out too much.

I am creating a scene where a guy crosses the road, but the road cracks, and crumbles into a hole.

I have created the hole for the shattered road to fall into, and the road as a thin 3D rectangle and shattered it and I'm happy with where the sims at. (attached pics)


But I am stuck on projecting the background scene onto the 3d rectangle so that it seemless blends into the vid. I tried to make it simple so there is no overlap of action on the surface from the video, and also took a still image from the camera as a plate so I could use that as the texture. But when I do a UV unwrap and try to use it as a material its either too large or not centered to the same location as the road. What am I doing wrong ? It seems simple enough but I'm at a loss!

Any help would be gratefully received !!!

Attachments:
road2.PNG (91.9 KB)
road2.PNG (91.9 KB)

User Avatar
Member
7733 posts
Joined: Sept. 2011
Offline
use a uvtexture node set to perspective from camera to project camera uv's onto the mesh.

Alternatively, the plate can be projected at shading time by transforming the render space coordinates to device coordinates(NDC) which can then be shifted (add 0.5) to produce a mapping that correspond with the screen. The toNDC or transform nodes can convert P to the required space.
  • Quick Links