peliosis Posted October 23, 2009 Share Posted October 23, 2009 Is there a simple way to get curve u parameter to an attribute. Easy as an expression like pathparam(string SOP, integer point number)? This is just so basic I think I'm blind being unable to find it. The value is present in a curve and is used in a few expressions but how to use it in a SOP? Quote Link to comment Share on other sites More sharing options...
sanostol Posted October 23, 2009 Share Posted October 23, 2009 i'm not sure if I understood You right, but what about adding a resampleSOP, set it to maximum Segments instead of Maximum Segment Length, to get a even distribution over the curve. set it to 8 segments or more, what fits to You and add a attributeCreateSOP with following expression : $PT/($NPT-1) Quote Link to comment Share on other sites More sharing options...
eetu Posted October 23, 2009 Share Posted October 23, 2009 If you just want a u value for the existing point, you could add a UVTexture SOP in "Arc Length Spline" mode. That should give you a sane uv[1] coordinate. If you want your own attribute for it, AttribCreate SOP with $MAPU in the Write Value field. eetu. 1 Quote Link to comment Share on other sites More sharing options...
peliosis Posted October 23, 2009 Author Share Posted October 23, 2009 Thanks you guys! Eetu, it works great, thanks because I completely forgot it. I tried UVtexture a while before and haven't even spotted the spline method so I dropped it . Sanostol It could be done with $PT/$NPT but the problem is in nr of splines in one object. If there is one ok, but with more there arouse the problem with counting points in a single primitive and mapping pt numbers so that they begin from 0 in each prim. I haven't found an easy way to do this. Could be some looping SOP but they are slow as hell. Vex or python would cope but it's definitely not as 1 click as texture SOP Quote Link to comment Share on other sites More sharing options...
sanostol Posted October 23, 2009 Share Posted October 23, 2009 i completly forgot the textureSOP, best way to do it Thanks you guys! Eetu, it works great, thanks because I completely forgot it. I tried UVtexture a while before and haven't even spotted the spline method so I dropped it . Sanostol It could be done with $PT/$NPT but the problem is in nr of splines in one object. If there is one ok, but with more there arouse the problem with counting points in a single primitive and mapping pt numbers so that they begin from 0 in each prim. I haven't found an easy way to do this. Could be some looping SOP but they are slow as hell. Vex or python would cope but it's definitely not as 1 click as texture SOP 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.