Jump to content

Displacements behaving retarded..


bhaveshpandey

Recommended Posts

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.

dispIssueFull.jpg

dispIssueProtdinFaces.jpg

dispIssueWhite.jpg

(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 :unsure: )

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 by bhaveshpandey
Link to comment
Share on other sites

There is something else that is retarded.

Joke :D

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 by kumpa
Link to comment
Share on other sites

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 :)

Link to comment
Share on other sites

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

bumpVEX.jpg

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 by bhaveshpandey
Link to comment
Share on other sites

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 by bhaveshpandey
Link to comment
Share on other sites

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 by kumpa
Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...