How to create an attribute gradient from edge of geo?

   5137   6   1
User Avatar
Member
65 posts
Joined: Nov. 2013
Offline
Hi,

I need to create a per point attribute gradient from the edge of a grid piece of geo to a middle (not necessarily the centroid). Anyone know a good workflow for creating it?
I included a crummy hand drawn image. I'm using a curve/remesh to create round 2d mesh grid, and from there I'm trying to create the per-point attribute for some topology work.

Thanks for any advice

Attachments:
test_drawing.jpg (56.5 KB)

User Avatar
Member
691 posts
Joined: June 2006
Offline
You can use a signed distance field (aka sdf) representation of your geometry. That gives you a nice gradient to work with.

You can use the vdb from poligons to convert your geometry, but make sure that its close (water tight).

Cheers
Feel The Knowledge, Kiss The Goat!!!
http://www.linkedin.com/in/alejandroecheverry [linkedin.com]
http://vimeo.com/lordpazuzu/videos [vimeo.com]
User Avatar
Member
12 posts
Joined: July 2013
Offline
2d grid?
Maybe some simple vop node
User Avatar
Member
65 posts
Joined: Nov. 2013
Offline
alejandro : Yeah I think the SDF is the way to go. I was experimenting with them, but I'm an ex-Soft guy, and too much of a SDF noob to really utilize them. Can you point me at some material that might explain their use for this kind of problem?

Jorge: I'm in VOPs for the geo already, I just need to bring in an attribute per point, that takes the shape of the round terrain into account. But once I have the “from edge gradient” data, your example is exactly what I'm going to do.

Thanks for the help!
User Avatar
Member
691 posts
Joined: June 2006
Offline
Here is a very simple example file for you to see two ways of sample a sdf.

I hope that this helps you.

Cheers

Attachments:
sdf_samples.hip (108.4 KB)

Feel The Knowledge, Kiss The Goat!!!
http://www.linkedin.com/in/alejandroecheverry [linkedin.com]
http://vimeo.com/lordpazuzu/videos [vimeo.com]
User Avatar
Member
12 posts
Joined: July 2013
Offline
If the terrain its big maybe you could try with pointclouds it evaluate very fast,here my try

Attachments:
terrain.hipnc (85.6 KB)

User Avatar
Member
65 posts
Joined: Nov. 2013
Offline
Thanks guys! Both methods worked perfectly. Just what I was looking for.

Thanks again
  • Quick Links