Jump to content

Project an image as a texture on an RBD Fracture


Recommended Posts

Hi all,

Im not sure if this is the right section to be posting this, so sorry if it isnt!

I'm working on a shot where by my drill vehicle comes out of the ground (rbd fracture). I want to keep the same texture as I have in my backplate (which is the road in this case), but I don't know how to project it onto the surface I've created in houdini (I'm not too sure if camera projection is even the right way to put it). I basically just want it to look like its coming out of that ground from the image. And, can I get it to stay on the pieces of the broken ground as it simulates? Also, how do i texture the inner parts of the voronoi? Been cracking my head with that all week.

I've attached my working file, as del as the backplate image so you can see what I'm trying to achieve.

You just need to load the OBJ sequence from the drill.zip in the file node and watch the sim in the dopnet.

I've also added the image in the file, so you can see what I'm trying to go for as well.

If anyone could help me out it would be great! Thanks!




Link to comment
Share on other sites

Hi, this is my first post to od[force] so please forgive me if I make any faux pas ^^

I haven't tried camera projection mapping in Houdini before, but after some fiddling managed to come up with something that works. Not sure if there's a better way to do this, but here's my workflow which has 2 passes:

1) Bake the camera projection into a texture

2) Render using the baked texture

Below is a more detailed description of the process:

1) Create a UV projection for the ground plane. My first attempt was to use UVTexture with "Perspective From Camera" type, but it resulted in a lot of warping artifacts (see image below). I ended up using a UVProject with planar (orthographic) projection. A Group Geometry node is used to isolate the polygons on top only, ignoring the ones below ground. The UVs are used to make the texture stick when the pieces start moving.


2) Create a shader ("for_projection") which uses NDC (Normalized Device Coordinates) space to access the background plate thereby projecting it onto the geometry from the render camera's point of view.


3) Set up a mantra node ("create_texture") to render out the projected texture. In the Main tab, under the Command field use "mantra -u /obj/test" to tell mantra to bake the texture. In the Properties->Output tab, you need to keep the aspect ratio the same as your shot camera for the projection to work. Increase the resolution as needed to prevent blurry output.

4) Render out the texture and save it to a file. You can tell that planar projection from the top view is used, with the camera to the right of the texture:


5) Apply the newly projected texture.

To solve the problem of texturing the ground top and insides of the vorinoi, I created another two simple shaders: "for_rendering" and "inside", and applied them based on the geometry grouping already set up during the projection stage.

As a final trick, I used the "for_projection" material on all passive DOP objects to keep the resolution high until the pieces start moving. Alternatively, you can just use a very high-res projection texture.


Attached is the sample scene. In the first pass of the process, set the display to RENDER_TEXTURE and use the "create_texture" mantra node. After saving out the projected texture, apply it to the "for_rendering" shader and set the display flag to "passive_material", the use the "output_render" node. I've color coded my nodes green for your convenience.

Hope this will help get your SDIP project going!


These posts on od[force] had been very helpful reference for me:

Problem with camera projection

Baking projected texture maps (Thanks Alvin!)

Edited by siepiau
  • Like 1
Link to comment
Share on other sites

  • 2 weeks later...

Just realized there's a slight typo in the hip I uploaded:

There are two Group Geometry nodes which I forgot to color green. In them, the names of the groups should be "active" and "passive" instead of "active_group" and "passive_group".

Sorry if that confused anyone.

  • Like 1
Link to comment
Share on other sites

  • 1 month later...

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