jvn Posted June 14, 2004 Share Posted June 14, 2004 Hi I'm trying to use the rest SOP from preventing my texture from sliding and its not working.... can someone please tell me why??? I just have a grid, a twist modier, the shader and a UVProject and of course the rest sop but it just doesnt work!! I've tried wiring it in different ways and nothing is working... Thanks in advance! Quote Link to comment Share on other sites More sharing options...
thekenny Posted June 14, 2004 Share Posted June 14, 2004 does your shader work with the rest attribute? -k Quote Link to comment Share on other sites More sharing options...
old school Posted June 14, 2004 Share Posted June 14, 2004 The Rest SOP adds a rest attribute which is hopefully represents the position of the geometry at a non-deforming rest. You need to have a shader that uses the rest attribute in place of P. Supermaterial handles rest by the way. Given what you are doing though, I suspect you don't need a rest but to generate your uv's on a static piece of geometry. In your specific case, applying the uv's before the twist should do it. The only time you need rest is if you have a shader that utilizes P as in point position in procedural shaders such as a granite material that uses noise based on the point positions. Use rest instead of P in this specific case. Rest is not applicable to anything else really. Just shaders that use geometry position instead of uv's (st's). As for any texture maps that rely on uv's, rest is not at all relavent. If you are using uv's and your material is sliding, you need to move the uv's up the SOP chain where the geometry does not deform. If this is not possible because you are reading a sequence of deforming geometry off disk or other reasons, then fork off a SOP from the current chain, lock it and apply your uv's to this. Then with a point SOP for point uv's or a vertex SOP for vertex uv's pass this locked and uv'ed geometry to the right input and in the left your deforming geometry. Now for the texture parameter in either the point or vertex SOP, use $MAPU2 $MAPV2 and $MAPW2. Now this is only a last ditch save. It is best to naturally apply the uv's to a static model before any deformations. Hope that helps you out. 5 Quote Link to comment Share on other sites More sharing options...
jvn Posted June 15, 2004 Author Share Posted June 15, 2004 OLD SCHOOL!!!! UR A GENIUS!!! THANK U!!! FINALLY!!! hehe... sorry just gettin a little over excited... this problem has been killing me thanks again! Quote Link to comment Share on other sites More sharing options...
Mario Marengo Posted June 15, 2004 Share Posted June 15, 2004 This question/confusion about UVs versus rest position comes up again and again (nothing wrong with that jvn, it's a little non-intuitive for *everybody*, not just you). So I'm thinking someone really needs to demystify this whole UV/rest business in the wiki... How about it Jeff ? (since you got nothing else to do, I mean. ) Cheers! 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.