bhaveshpandey Posted February 28, 2009 Share Posted February 28, 2009 (edited) I have started dabbling with shading and VEX coding only recently and have now prepared the shaders and applied them to the geometry for this particular project. Issue is that when rendered the geometry shows some protrusion. These are the images for the same. (if pics are not visible please check these: http://2.bp.blogspot.com/_VHjD5bX033E/SamQ...spIssueFull.jpg http://4.bp.blogspot.com/_VHjD5bX033E/SamQ...rotdinFaces.jpg http://1.bp.blogspot.com/_VHjD5bX033E/SamQ...pIssueWhite.jpg may someone also please tell me how I could upload pictures here..I know its THE DUMBEST question on Odforce ) The white edges show similar behaviour to the polyExtrude (when applied to non-cosolidated geo) To avoid this I also applied a facet (I also tried Fuse!!), hoping that it might crack the problem but it just doesn't go. Also there is Protrusion of Faces..which can be observed at the edges..a line which has been displaced moves parallel to the edges of the geometry. I felt both these issues might have come up because of the Low Res geometry so I upped the divisions BUT its again there. any ideas?? Edited February 28, 2009 by bhaveshpandey Quote Link to comment Share on other sites More sharing options...
kumpa Posted February 28, 2009 Share Posted February 28, 2009 (edited) There is something else that is retarded. Joke Protruding edges appear because points are not joined/welded/fused, while white edges are probably background color. Try appending Fuse SOP. You may also want to offset displacement height. Edited February 28, 2009 by kumpa Quote Link to comment Share on other sites More sharing options...
Jason Posted February 28, 2009 Share Posted February 28, 2009 The white lines at corners are usually due to some ray- or shadow-bias issues- where the bias is too big and skips over the edge of the geometry. The protruding faces is a common bugbear with Displacement mapping. Your points along that edge are not shared (a cusped edge), meaning that the faces are free to be displaced away from each other. It's quite a tough problem to solve, at times, because a DisplaceAlongNormal type of operation will pull the unshared faces apart. So you have to try to displace the geometry near edges using the same "spaces" for both faces (eg, 3d position space rather than "along normal") and make sure that your noises are driven off the same coordinates: ie, if you use uv's, the uv values have to be identical for both faces along that edge or your noise lookups will be different, causing a seam. Usually P is a good driver for this too.. at least the easiest Quote Link to comment Share on other sites More sharing options...
bhaveshpandey Posted March 1, 2009 Author Share Posted March 1, 2009 (edited) thanks for the reply guys @kumpa I did try fuse, also the consolidate option on polyExtrude but it messes up the shading (it looks wax like) however I'm gonna try it once again. @jason: so the raytracing bias for this would mean the raytrace value in the render node?? shadow bias....dint really think of that..thanks I'll check it again I must admit though your method is pretty advanced one for me. I did not use VEX for building a displacement shader, I just created a surface shader in vex, changed it into a material and took a VEX displacement map node, which I applied to the displacement shader input of the sub-output.(this doesn't leave me with enough controls) I did try my hand at incorporating Displacements and Bumps but couldn't get it right. Here's my VEX network for the same If you cant see the picture please click here: http://2.bp.blogspot.com/_VHjD5bX033E/SamM...0-h/bumpVEX.jpg I connected the displaced point positions, as well as displaced normals to the Normals input of the output, but the render showed no chande. so I have kept it disconnected for time being. Also the bump multiplied with the lighting gave pretty good colour so I have kept it like that. May you please suggest something about this network, (what I have missed etc) Thanks a ton (PS: I wonder if you guys can see the pictures I upload, because I'm not able to see those. I copied the address and put it in the Insert Image option though.) Edited March 1, 2009 by bhaveshpandey Quote Link to comment Share on other sites More sharing options...
kumpa Posted March 1, 2009 Share Posted March 1, 2009 can you post the .hip ? Quote Link to comment Share on other sites More sharing options...
bhaveshpandey Posted March 2, 2009 Author Share Posted March 2, 2009 hey this is the setup of the TestScene I have been working on.. hope to get some leads on this issue cheers TestScene.rar Quote Link to comment Share on other sites More sharing options...
kumpa Posted March 2, 2009 Share Posted March 2, 2009 this is one way to deal with this, not the best though...i stripped down your file a little bit crater_k.hip.tar.gz Quote Link to comment Share on other sites More sharing options...
bhaveshpandey Posted March 2, 2009 Author Share Posted March 2, 2009 thanks a lot buddy!! gonna check it right away!! Quote Link to comment Share on other sites More sharing options...
stevenong Posted March 2, 2009 Share Posted March 2, 2009 Hi, I've attached my version that uses vertex normals which Mantra supports in H9.x. I had to reverse the normals & polys because your PolyExtrude went in the negative direction. I added comments to the nodes. Cheers! steven PS To add images, just click on the Browse button, select your image & click on Upload. crater_odforce.hip.gz Quote Link to comment Share on other sites More sharing options...
bhaveshpandey Posted March 3, 2009 Author Share Posted March 3, 2009 (edited) hey Kumpa thanks a ton man!! your method's working just fine. I just wanted to ask that you'have used 'dh' as a custom attribute. Could you tell me what does it do?? as in does it over-ride some value?? @Steven: thanks a lot!! I'm gonna go through it and update you on this Cheers, Edited March 3, 2009 by bhaveshpandey Quote Link to comment Share on other sites More sharing options...
bhaveshpandey Posted March 3, 2009 Author Share Posted March 3, 2009 Hey Steven I just went through your solution..Its really smart one!! Its working great and its simple. Could you also tell me why was I facing this problem?? (I assume it got screwed up because of the normals?) thanks a lot. cheers, Quote Link to comment Share on other sites More sharing options...
kumpa Posted March 3, 2009 Share Posted March 3, 2009 (edited) I just wanted to ask that you'have used 'dh' as a custom attribute. Could you tell me what does it do??as in does it over-ride some value?? Could be any name fot that attribute, it just tells that those primitives should have Displacement Scale 0 in parameter overrides in Material SOP. Edited March 3, 2009 by kumpa Quote Link to comment Share on other sites More sharing options...
stevenong Posted March 3, 2009 Share Posted March 3, 2009 Hey Steven I just went through your solution..Its really smart one!!Its working great and its simple. Could you also tell me why was I facing this problem?? (I assume it got screwed up because of the normals?) thanks a lot. cheers, Hi, Firstly, the issue with inverted normals is shading since the renderer thinks the polygon is facing the other direction. When I did some test renders, I got confused because mantra was shading the inside of the chunk and parts of the geometry which was supposed to be shaded (the white lines) so I started to check the normals. Secondly, inverted normals affect displacements since they usually use the direction of the normals though you can certainly set a negative value to correct that. It is generally considered good habit to make sure the normals point in the direction you want rather than let the renderer try to deal with it. To sum it up, the normals screwed you up. In addition, cusping and displacements compounded the issue though I felt they covered up the problems with the normals. Good luck! Cheers! steven Quote Link to comment Share on other sites More sharing options...
bhaveshpandey Posted March 4, 2009 Author Share Posted March 4, 2009 Thanks a lot Steven..this is really informative and helpful. 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.