Atom Posted July 4, 2015 Share Posted July 4, 2015 (edited) Hi All, I am working with an example I found on this forum and I am trying to "fix" it so I can use it for rendering. The concept is that you have a series of curves that are processed by a FOREACH. Inside this FOREACH a second each fetches the result from the previous iteration. The problem I have is that the curves, which are needed for evaluation, are also being rendered along with the skinned result. Because those curves are needed for processing I am not sure how to construct a node setup to exclude them from rendering. In my posted image the area highlighted in yellow show some of the 2D curves I would like to remove from the final result. How can I detect and remove the unwanted curves from rendering? Is there a fixup process after the FOREACH or is there something I can do in the FOREACH to prevent them from appearing the result? Stumped... ap_cables_over_each_other_tut.hipnc Edited July 7, 2015 by Atom Quote Link to comment Share on other sites More sharing options...
SSFX Posted July 4, 2015 Share Posted July 4, 2015 What about grouping the guide curves before processing and blasting the group afterward? ap_cables_over_each_other_tut_fixed.hipnc Quote Link to comment Share on other sites More sharing options...
Atom Posted July 4, 2015 Author Share Posted July 4, 2015 Thank you , that seems to work just fine! Quote Link to comment Share on other sites More sharing options...
Atom Posted July 7, 2015 Author Share Posted July 7, 2015 I have progressed to the next problem in this scene. I have tried all the UV Nodes but none of them will give me a valid checker pattern along these skinned cables. How do I add valid UV coordinates to generated geometry? In my current viewport you can see the UV problems. Do I need to UV before I ray? ap_tubes_overlap_foreach_ray_1c.hipnc Quote Link to comment Share on other sites More sharing options...
Guest mantragora Posted July 7, 2015 Share Posted July 7, 2015 Problem => Solution => Happy User ap_tubes_UV_FIXED.hipnc Quote Link to comment Share on other sites More sharing options...
Robert Posted July 8, 2015 Share Posted July 8, 2015 To get a nice non-stretched UV you can use the current curve perimeter (measure SOP) and put that into the x scale of the UV texture node of the backbone curve and disable the UV texture node after the sweep. For this UV with sweep method to work you need to use point UV's but you probably want to convert them to vertex UV's afterwards somehow to get rid of the seam area. Quote Link to comment Share on other sites More sharing options...
Atom Posted July 8, 2015 Author Share Posted July 8, 2015 (edited) @Robert: Thanks for the additional advice, I did notice the seam problem. I am still not sure how to leverage the Measure SOP correctly. I have placed it after the circle to measure the perimeter. But how do I connect it into the other branch? Is than an attribute copy? Also I am planning on using an attributeVOP to displace the points using the UVs and I have a version working by using an attributePromote but I still end up with a seam. What is the syntax for using the attribute to drive a parameter? I tried putting perimeter in the xscale but that is an error. Also I tried @perimeter but that did not work either..? ap_tubes_overlap_foreach_ray_1g.hipnc Edited July 8, 2015 by Atom Quote Link to comment Share on other sites More sharing options...
Robert Posted July 8, 2015 Share Posted July 8, 2015 I'll just include a file to show you what I meant. The measure SOP goes before the sweep on the backbone. The circle is mapped from 0..1 in the v-direction but when you do the same in the u direction for the backbone the aspect ratio gets messed up. So to get the correct aspect ratio the UV's of the backbone need to be proportional to the circle. In your case the circle already has a circumference of 1 unit so that makes the math easier but for completeness I added a measure SOP to the circle too. So to get the right coverage of the backbone UV's you take its length (the first measure SOP) and divide it by the circle's circumference (measure SOP 2). You can put this number in the scale parameter of the backbone's UVtexture node. To calculate this you can use the prim() expression because we are using a regular SOP node, not a wrangle. Because we are iterating over each curve within the foreach SOP we can always take the first primitive (number 0) so prim("../measure1",0,"perimeter",0). I added an ends node set to unroll for the circle to get rid of the stretching caused by point UV's. This still leaves an obvious seam but I'm sure there are many other methods to get around the stretching. ap_tubes_overlap_foreach_ray_RobertEdit.hipnc Quote Link to comment Share on other sites More sharing options...
Atom Posted July 8, 2015 Author Share Posted July 8, 2015 (edited) @Robert: Thanks again for taking the time to investigate my problem and offer a solution. This goes a long way towards getting my displacement along tubes working the way I wanted. From this point I think I could get a tech or organic look. Edited July 8, 2015 by Atom 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.