Need help to "merge 2 geometry"

Good morning !

I’m not an expert on TouchDesigner and I would like to do the following.

In the photos below you will find an SOP model that I created and a geometry of a TOP in point view.

I would like to add the “texture” of the TOP geometry to my SOP model.

I think going through CHOPs could be interesting but I didn’t succeed.

For the moment I have only managed to apply a PBR MAT to the SOP but there are no vertical components, therefore no 3D effect. It acts as a simple texture…

Thank you ! :slight_smile:

Hi @schubhan.arv,

thinking about this - it might not be totally trivial but I think doable.

You essentially want to transform all points of your original model by values that you have in the texture.
So first you would want to render out the UVs for your model to have that as a basis for pulling values from the noisy texture. Then, also retrieving the positions of each point in your model, you can add them together…

There is 3 features to explore here:

  • the Render TOP’s ability to render as a “UV Unwrap”
  • the Render TOP’s ability to render multiple color buffers as well as
  • the Phong MAT’s ability to forward position or uv coordinates into color buffers.

So first you need to setup a render network and on the Phong MAT’s advanced page select the “World Space Position” for the RGB Color Buffer, then add another Color Buffer and select the “Texture Coord 0”.

In you Render TOP, select on the Render Mode parameter the option “UV Unwrap” and on the Advanced page increase the # of Color Buffers to 3.
Finally add 2 more Render Select TOPs where you specify the Index to 1 and 2 for accessing the 2 extra Color Buffers.

Now you have 3 important pieces of information:
The Models point position as a texture which you can use to add the noisy offsets ontop and the model’s UV coordinates which you can use to look into the noisy texture to fetch the right values at the right position.

For that you can utilize the Remap TOP that takes a texture as the first input and a UV image as the second.

From here on you would have to decide - render everything as a pointcloud via instancing, or recreate a solid object out of this…

Maybe this is a starting point.
cheers
Markus
geoTextureOffset.toe (6.0 KB)

Thank you very much for this answer, this is exactly what I want to do!
However, when I try to run the file I get this error message:

"Load Project .toe: geoTextureOffset.toe loaded with error:

Warning: Skipping unrecognized parameter “color0rgb value: worldspaceposition (project1/phong1.parm)” (/project1/phong2)
Warning: Skipping unrecognized parameter “color1rgb value: texturecoord0 (project1/phong2.parm)” (/project1/phong2)

I then tried to reproduce following your text, in vain…

Finally by manipulating the phong I managed to obtain an interesting result! Thank you very much, I will come back to you to show you the final result! :slight_smile:

Thanks again !

Edgar

Hi @schubhan.arv,

I think you are using an older build? If you install the latest official my file will run properly.
Just careful: files saved in the new official are not backward compatible.
You can install builds in parallel…

Looking forward to seeing what you came up with!

Cheers
Markus