Jump to content

Cd Attribute Transfer Query


wilson99

Recommended Posts

One way is to abandon the OBJ mesh and simply create the entire tube on your own. Then you have more control over the creation.

 

I have an example HIP file you can take a look at here:

http://forums.odforce.net/topic/23206-displaced-tubes/

 

But if you really need to use the OBJ import then one way comes to mind. What if you draw a curve that matches the shape of the OBJ mesh. Draw the curve so it travels down the center of the tube. Then create a sphere that is larger than the radius of the tube at it's largest point. Colorize the sphere and make it travel down the curve as a path. Use an attribute transfer to the color attribute Cd from the sphere to the OBJ based tube based upon proximity. As the sphere travels down the path the color will transfer from one object to another, turn off the render flag on the sphere of course.

Edited by Atom
Link to comment
Share on other sites

One way is to abandon the OBJ mesh and simply create the entire tube on your own. Then you have more control over the creation.

 

I have an example HIP file you can take a look at here:

http://forums.odforce.net/topic/23206-displaced-tubes/

 

But if you really need to use the OBJ import then one way comes to mind. What if you draw a curve that matches the shape of the OBJ mesh. Draw the curve so it travels down the center of the tube. Then create a sphere that is larger than the radius of the tube at it's largest point. Colorize the sphere and make it travel down the curve as a path. Use an attribute transfer to the color attribute Cd from the sphere to the OBJ based tube based upon proximity. As the sphere travels down the path the color will transfer from one object to another, turn off the render flag on the sphere of course.

Thanks Atom, great idea

 

Would you use the same method if you created the tube in Houdini?

Link to comment
Share on other sites

Here is one way to transfer color while generating a tube. Basically we add a Cd attribute to the points that will guide the skinning process. The Copy reliably transfers the color from the points to the new element copied. In this case I am using the point # along the path to drive the RED color from 0-1. This can be used for measuring percentage along path as well. The value of the RED channel is the percentage along the path as a 0-1 value.

post-12295-0-27556800-1448209063_thumb.j

ap_cd_along_tube.hipnc

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

In Softimage I did encounter similar problems. If it is just a tube with a consistent topology (loop next to loop), then you could try the following:

 

Create a custom attribute (growth), select the first loop, apply a growth value of 1 to the points.

 

Create a loop with the amount of expected loops or more. Grow your growth value (if neighboring point has a value of one, then set growth to one). If the growth value has changed this iteration, then apply (to another attribute) the current iteration number to these points.

 

This should leave you with a V value (if the iteration numbers get normalized), like in UVs. This way you have a lot of possibilities to straighten your pipe and/or assign textures.

 

Cheers

Tom

Link to comment
Share on other sites

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.

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