# Geometry Object conforming to another Geometry surface

## Recommended Posts

### Hello I'm very new to Houdini does someone knows how to do this ?

thank you very much

I try many options but I didn't find the way !!!!

##### Share on other sites

Grab the bottom of your geo, group it, or blast it then you can ray it onto the collision geometry (the sphere in this case), then use Point Deform which will wrap it into position.

##### Share on other sites

Hi @virgile,

you could blend positions based on their distance towards the surface:

In a point wrangle with first input mesh, second input sphere:

```float d_min = chf('min_distance');
float d_max = chf('max_distance');

int prim;
vector uvw;
float d = xyzdist(1, v@P, prim, uvw);
vector pos = primuv(1, 'P', prim, uvw);

float mask = smooth(d_min, d_max, d);

conform_to_surface.hipnc

• 1

##### Share on other sites

Here is another approach using an average direction to project the geometry onto the surface.

@edit: btw it is quite complicated to find the direction to the surface automatically . It seems to be much better, to use a direction given by the source object (z-axis for example), which also gets transformed, if the object gets transformed. Using eigenvectors for orienation alignment is also an option.

Edited by Aizatulin
• 1

##### Share on other sites
On 2022/10/29 at 12:41 AM, virgile said:

I'm very new to Houdini does someone knows how to do this ?

you can try using ray SOP...cast the geo shape along ray dir to the destination surface,couple of times

hope it helps

##### Share on other sites
On 10/29/2022 at 9:41 AM, Aizatulin said:

Here is another approach using an average direction to project the geometry onto the surface.

@edit: btw it is quite complicated to find the direction to the surface automatically . It seems to be much better, to use a direction given by the source object (z-axis for example), which also gets transformed, if the object gets transformed. Using eigenvectors for orienation alignment is also an option.

Thank you @Aizatulinthis worked really well! But how can I tile it so that the sphere is populated with objects that all conform? I tried increasing the number in the "scatter1" node which does populate with more objects but they don't conform to the sphere anymore...

• 1

##### Share on other sites

@Thoi sure :-)

this version only applies on a single object, but if you want to apply it one multiple objects you can either apply it multiple times or use a foreach node with (loop over pieces with ids).

btw: you don't need scatter at all, it is just a good method to generate points on a surface, where you can apply the copy to points node.

Here some example how to do that

Edited by Aizatulin
• 2
• 1

##### Share on other sites
33 minutes ago, Aizatulin said:

@Thoi sure :-)

this version only applies on a single object, but if you want to apply it one multiple objects you can either apply it multiple times or use a foreach node with (loop over pieces with ids).

btw: you don't need scatter at all, it is just a good method to generate points on a surface, where you can apply the copy to points node.

Here some example how to do that

This is exactly what I needed! Thank you so so much!!

• 1

##### Share on other sites

I am trying to utilize this on more complex shapes, it works great in some more uniform areas but gets corrupted with more complex areas.

Is there any way to combat these artifacts? I tried PolyDoctor and Clean but does not seem to remove the broken parts of the conformed model...

Edited by Thoi

##### Share on other sites

If you're just doing vines across a body, you might want to use the ray node to project the underlying curves onto the body, then generate the mesh along those conformed curves. This approach might preserve the volume of the mesh a little better as well.

Edited by Atom
• 1

##### Share on other sites

@Thoi,

If your source geometry has overlapping parts, it will not work, because the ray function will not find an intersection point. But using different directions for each point (from xyzdist()) may work in some cases, but sometimes it creates a totally

mess (even if you smooth the directions).

For example if the diameter of your source geometry is much bigger than the diameter of the target geometry (local parts) it is not possible, to map the source directly onto the target using (nearly) straight directions. Even if you are trying to bend the source around the target, there are limitations.

Edited by Aizatulin
• 1

##### Share on other sites
15 hours ago, Thoi said:

I am trying to utilize this on more complex shapes, it works great in some more uniform areas but gets corrupted with more complex areas.

Is there any way to combat these artifacts? I tried PolyDoctor and Clean but does not seem to remove the broken parts of the conformed model...

With this kind of FX, I would recommend creating the curves over the surface directly and then mesh them after, rather than trying to deform arbitrary mesh onto the body geometry.

• 1

##### Share on other sites

Thank you for all the great replies! I have been experimenting with different projections and ray workflows but none that works really well procedurally and tile able for conforming meshes. Maybe I am better off using MatchMaker in ZBrush to art direct conformed multiple meshes on the model in the end

Edited by Thoi

##### Share on other sites

ok sure :-),

but it would be alos interesting to see, how MatchMaker is solving the problem of overlapping parts. It would be nice if you can show the results here.

##### Share on other sites
11 hours ago, Aizatulin said:

ok sure :-),

but it would be alos interesting to see, how MatchMaker is solving the problem of overlapping parts. It would be nice if you can show the results here.

Sure! In ZBrush you can use MatchMaker to conform a new object (sub tool) over the previous conformed object, without corruption (see example). You will still get the same mess if you try to matchmake over a edge not in camera though. But in the end it seems more art directable.

However I am still learning Houdini so will keep on trying out methods! I think the tips here and hip you have provided looks way better then MatchMaker with a single mesh. Maybe a solution could be some kind of node that would clean up the meshes that does intersect or gets corrupted.

• 1

## Create an account

Register a new account

×