Announcement

Collapse
No announcement yet.

How to make geometry fade at an angle in the material editor?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • replied
    Alright, add a scalar to the power node in my code and play with the values there - the smaller value the bigger is the effect on the edges.

    Leave a comment:


  • replied
    Originally posted by NasteX View Post
    Hmm, I think this setting is specifically for leafs that consist of planes and such. I couldnt find any visual example on google how this looks though, so no idea how I can help you.
    It worked on any geometry. I worked on many trees in CE3 and seen the trees made for Crysis 2 and the branches weren't usually straight planes.
    Some might have been flat, but what difference does it make?, the shader faded them based on some sort of a normal.
    It worked for any geometry I'm 100% sure of that.

    NasteX
    I basically just want what the fresnel node does, but for the geometry to disappear at once not in a gradient.
    If the geometry is more complex, I want only the parts that are at steep angles to be faded.
    Last edited by frmdbl; 01-08-2020, 06:00 AM.

    Leave a comment:


  • replied
    Hmm, I think this setting is specifically for leafs that consist of planes and such. I couldnt find any visual example on google how this looks though, so no idea how I can help you.

    Leave a comment:


  • replied
    I haven't used Cryengine for a while, it's called "Cap opacity fallof" there.
    Here are some docs: https://docs.cryengine.com/display/S...etation+Shader

    It says it "Controls how strongly vegetation polygons fade out when looking at them at a steep angle. This helps to disguise the plane shape of vegetation geometry."

    So this is to avoid stuff like this being shown breaking the illusion of a lush tree crown.
    In reality it wouldn't be planes, but more compex geometry, and only the faces that are at a given angle would disappear.

    Click image for larger version  Name:	gg5hW72Q.jpeg Views:	0 Size:	55.4 KB ID:	1705533

    Leave a comment:


  • replied
    Ah dang it, you are right, I just tested this under the assumption that you want to use this on planes because you showed planes in your screenshot. The code is basically fresnel in its mathematical form with some small changes. After that it is just making sure you dont get "gradient" out of it.

    Anyway, could you show me screenshot from Cryengine that demonstrates what you want to achieve? I just dont know how this should look.

    Leave a comment:


  • replied
    NasteX
    I've no idea what these nodes do, but that does exactly what I need, with a big caveat. It's only working when applied to a plane.

    It doesn't work with any other object/geometry.

    I wish there was a simple way just to somehow get the face angle in relaiton to the camera.

    Ideally it wouldn't even be vertex normal angle ( cause they might be averaged in more or less a spherical shape in a tree),
    but sort of a UV tangent space angle.
    Last edited by frmdbl; 01-07-2020, 09:10 AM.

    Leave a comment:


  • replied
    Hmm, what about this solution? I am kinda unsure about the performance impact of such material on foliage, so keep in mind about that if you get any performance problems.
    Click image for larger version  Name:	fadematatangle.JPG Views:	0 Size:	117.7 KB ID:	1705424
    Last edited by NasteX; 01-07-2020, 08:32 AM.

    Leave a comment:


  • replied
    Good suggestion, I tried it but it doesn't really solve the problem.

    It makes the geometry fade with a gradient, which creates even more of an issue tbh as seen on the right in the screenshot.
    Imagine it was a branch, it would create leaves floating in air.
    I played with the values of the fresnel node, and powering it but it just offsets the blend.

    I want it to dissapear at once at a given angle.

    Leave a comment:


  • replied
    The fresnel node is your friend.

    Leave a comment:


  • How to make geometry fade at an angle in the material editor?

    Hi, here's what I'd like to do.
    In CE3 in the vegetation shader there's an option to cut off geometry that's close to being perpendicular to the camera.
    This is very useful for trees etc. cause it kind of hides the 'flatness' of brach geometry.

    So in the attached screenshot, there are 2 planes with different rotation. I'd like the one on the left to be invisible when at this angle.

    Last edited by frmdbl; 01-07-2020, 06:41 AM.
Working...
X