wilson99 Posted November 20, 2015 Share Posted November 20, 2015 Hi How could I transfer a Cd attribute along an OBJ such as a pipe. I'm new and one way I know is using another OBJ as a mask Basic Example GIF https://gyazo.com/912405a45452c308514db0ce5da4e64c How could this be done evenly on something more complex whether its a pipe or a detailed mesh. Thanks guys Quote Link to comment Share on other sites More sharing options...
Atom Posted November 21, 2015 Share Posted November 21, 2015 (edited) 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 November 21, 2015 by Atom Quote Link to comment Share on other sites More sharing options...
wilson99 Posted November 21, 2015 Author Share Posted November 21, 2015 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? Quote Link to comment Share on other sites More sharing options...
Atom Posted November 22, 2015 Share Posted November 22, 2015 (edited) 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. ap_cd_along_tube.hipnc Edited November 22, 2015 by Atom 1 Quote Link to comment Share on other sites More sharing options...
Pancho Posted November 24, 2015 Share Posted November 24, 2015 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.