avak Posted December 2, 2014 Share Posted December 2, 2014 Hi, I have a bending grid ,(polygrid>UVtexture>Twist(animated bend)) displacement map xyz seems follows world direction and not following deforming surface direction, so How to fix it? Thanks file+render seuence is attached xyz_disp_issue.zip Quote Link to comment Share on other sites More sharing options...
Skybar Posted December 2, 2014 Share Posted December 2, 2014 I haven't looked at your files, but try adding a rest attribute. Quote Link to comment Share on other sites More sharing options...
avak Posted December 2, 2014 Author Share Posted December 2, 2014 I haven't looked at your files, but try adding a rest attribute. Thanks for your reply, I did, but it seems the XYZ displacement doesn't care about rest att, it displaces things across world axis (am I right?), any workaround? Quote Link to comment Share on other sites More sharing options...
iamyog Posted December 2, 2014 Share Posted December 2, 2014 I did not open your file but sounds like a Coordinate System issue. See Peter Quint's tutorial : http://vimeo.com/8011128 Quote Link to comment Share on other sites More sharing options...
loopyllama Posted December 2, 2014 Share Posted December 2, 2014 I am pretty sure that is how xyz displace is supposed to function. Try setting your displacement channel in the shader to "Green" instead of "XYZ Displace" (because your displacement map has green features). Quote Link to comment Share on other sites More sharing options...
loopyllama Posted December 2, 2014 Share Posted December 2, 2014 it produces something like this: Quote Link to comment Share on other sites More sharing options...
avak Posted December 2, 2014 Author Share Posted December 2, 2014 Good pints, it works well with a single RGB channel same as generic grayscale displacement method but I am using an RGB chennel to direct points to xyz axs on surface rather than just one axis, I've attached a new RGB texture, please see if you can direct me to solve it. Thanks Quote Link to comment Share on other sites More sharing options...
avak Posted December 2, 2014 Author Share Posted December 2, 2014 I think this one is a better texture to work with, as it includes RGB value in all its pixels, Quote Link to comment Share on other sites More sharing options...
loopyllama Posted December 2, 2014 Share Posted December 2, 2014 ah, I think you are wanting vector displacement. You want the color channels to indicate displacement direction? check out this thread: http://www.sidefx.com/index.php?option=com_forum&Itemid=172&page=viewtopic&t=26587&highlight=&sid=c364ee23ab15465fd61324e9745f921c Quote Link to comment Share on other sites More sharing options...
avak Posted December 2, 2014 Author Share Posted December 2, 2014 The mantra surface material works pretty well when working with an static geometry to generate XYZ displacement (vector displacement), the problem appears when the geometry deforms, I followed the link you posted, and added the transform node but problem didn't solve, Quote Link to comment Share on other sites More sharing options...
avak Posted December 2, 2014 Author Share Posted December 2, 2014 ah, I think you are wanting vector displacement. You want the color channels to indicate displacement direction? check out this thread: http://www.sidefx.com/index.php?option=com_forum&Itemid=172&page=viewtopic&t=26587&highlight=&sid=c364ee23ab15465fd61324e9745f921c The mantra surface material works pretty well when working with an static geometry to generate XYZ displacement (vector displacement), the problem appears when the geometry deforms, I followed the link you posted, and added the transform node but problem didn't solve, Quote Link to comment Share on other sites More sharing options...
eetu Posted December 2, 2014 Share Posted December 2, 2014 The vanilla mantrasurfae XYZ displacement means worldspace xyz displacement and works as it is supposed to:) For the effect you are after you need to have a local frame of reference that is transformed along with the geometry. It could be the normal-tangent-bitangent triplet as set up by the polyframe SOP, or it could be figured out at rendertime by figuring out the differentials of the uv-mapping, or even the differentials of the intrinsic st-coordinates of the underlying primitive. In your example even the last one is enough, but in more complicated cases you would need to go with either of the former techniques. To use these tangents in the shader, you can add a Compute Tangents VOP as in the attached hip file (added nodes are inside the deep red network box inside the material). The image is ugly as hell, but I suppose the right things are happening.. xyzDisp_deformingObject_02ee.hip 1 Quote Link to comment Share on other sites More sharing options...
avak Posted December 3, 2014 Author Share Posted December 3, 2014 (edited) The vanilla mantrasurfae XYZ displacement means worldspace xyz displacement and works as it is supposed to:) For the effect you are after you need to have a local frame of reference that is transformed along with the geometry. It could be the normal-tangent-bitangent triplet as set up by the polyframe SOP, or it could be figured out at rendertime by figuring out the differentials of the uv-mapping, or even the differentials of the intrinsic st-coordinates of the underlying primitive. In your example even the last one is enough, but in more complicated cases you would need to go with either of the former techniques. To use these tangents in the shader, you can add a Compute Tangents VOP as in the attached hip file (added nodes are inside the deep red network box inside the material). The image is ugly as hell, but I suppose the right things are happening.. Hi eetu I used a noise RGB texture (the one attached in above) and it now seems to follow the bending grid, but in certain frames I have some stretching points specially in middle part of grid's surface when most deforming effect is happening. it sounds some points suddenly don't know in which axis they should go. I am uploading a rendered sequence to vimeo will share it here in next 30 min. Thanks Edited December 3, 2014 by avak Quote Link to comment Share on other sites More sharing options...
avak Posted December 3, 2014 Author Share Posted December 3, 2014 (edited) The vanilla mantrasurfae XYZ displacement means worldspace xyz displacement and works as it is supposed to:) For the effect you are after you need to have a local frame of reference that is transformed along with the geometry. It could be the normal-tangent-bitangent triplet as set up by the polyframe SOP, or it could be figured out at rendertime by figuring out the differentials of the uv-mapping, or even the differentials of the intrinsic st-coordinates of the underlying primitive. In your example even the last one is enough, but in more complicated cases you would need to go with either of the former techniques. To use these tangents in the shader, you can add a Compute Tangents VOP as in the attached hip file (added nodes are inside the deep red network box inside the material). The image is ugly as hell, but I suppose the right things are happening.. Hi eetu I've fixed the video , as you see there is some stretching artifacts happens at frame 35 36, as well as some small other artifacts just as a thought, is it something related to normal ( because normal is in camera space?), is there any way that we could fully trust XYZ will work fine in every camera angle and on every deforming type surfaces (characters in my concerns)? Thanks Edited December 3, 2014 by avak Quote Link to comment Share on other sites More sharing options...
eetu Posted December 3, 2014 Share Posted December 3, 2014 Ok yeah, something is flipping there. It would be beneficial to know how the maps you are planning to use will be authored, and how the maps will be encoded. Usually things like this are in tangent space, but the tangent space for a character needs to be defined somewhere at the time of authoring the map. You could check out this thread about tangent space normal maps, too. Quote Link to comment Share on other sites More sharing options...
rayman Posted December 4, 2014 Share Posted December 4, 2014 (edited) I think, this flickering may be caused by displacement boundaries and/or geometry dicing. Try to increase displacement bounds and check if it will continue to flicker if you set geometry measuring to uniform. Edited December 4, 2014 by rayman Quote Link to comment Share on other sites More sharing options...
avak Posted December 5, 2014 Author Share Posted December 5, 2014 Ok yeah, something is flipping there. It would be beneficial to know how the maps you are planning to use will be authored, and how the maps will be encoded. Usually things like this are in tangent space, but the tangent space for a character needs to be defined somewhere at the time of authoring the map. You could check out this thread about tangent space normal maps, too. thanks for the link and explanation, what you have added to the network solved the main problem, texture is following the surfaces and I appreciate it. Quote Link to comment Share on other sites More sharing options...
avak Posted December 5, 2014 Author Share Posted December 5, 2014 I think, this flickering may be caused by displacement boundaries and/or geometry dicing. Try to increase displacement bounds and check if it will continue to flicker if you set geometry measuring to uniform. I increased the boundary and changed shading quality to 3, most flickering solved but I still have some. thanks for the tip 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.