x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

Foliage issues - bug or no bug?

Hi.

I reckon this is some bug, others reckon its my lack of skills / knowledge. Trees using planes with two sided materials do not handle foliage or subsurface shading very well.

At the moment the world normals are completely wrong and the ss is being projected onto faces where it should not be.

On the left is a two sided planes tree. On the right is a tree with no single planes where i had to mirror and flip all the branch faces.

alt text

As you can see the normal are all weird when using two sided faces. The difference in how SS is being distributed on the mesh is pretty obvious. I am using red for debug purposes. Red is the SS color.

alt text

So someone suggested i multiply the normal map with the two sided sign. The result is better... but still not up to scratch.

alt text

So i guess my question is... if this is a rendering bug or if i am missing something?

I looked at the trees in the landscape demo but they cannot be compared really because you have effectively faces that will always be seen from one angle. Where as in trees like mine... achieving geometry requires you to have flipped faces.

Product Version: Not Selected
Tags:
more ▼

asked Mar 27 '15 at 07:35 AM in Rendering

avatar image

Crocopede
417 25 37 53

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

Hey Crocopede,

One thing that I noticed when using the 'Two Sided Foliage' shading model when making foliage shaders, is to disable the 'Tangent Space Normals'. Also be sure to enable the check box 'Two Sided'.

Here is an example of how using Tangent Space Normals can change the way your overall foliage looks in game.

Fuzzy Shading as Subsurface

alt text

Here I am taking the 'FuzzyShadingGrass' node and passing it directly into the 'Subsurface Color' input.

Material Properties

alt text

Without Tangent Space Normals

alt text

Here is how I would like my grass to look.

With Tangent Space Normals

alt text

As you can see the model is significantly darker and looks different overall. Let me know if unchecking the Tangent Space Normals was a good suggestion for you, or if you are still having issues.

Cheers,

Andrew Hurley

more ▼

answered Mar 31 '15 at 02:26 PM

avatar image Crocopede Mar 31 '15 at 06:25 PM

Hi.

Thx for getting back. This pointed me in the right direction. What i discovered was that if you do no not have a normal map... then things go awry.

Not sure if this is expected behavior... Example

alt text

Result

alt text

After reading the disable tangent normals it got me thinking that perhaps it is normal related. So i created a simple Vector parameter or 3vector node and plugged that into the normal map slot.

alt text

Result

alt text

If this is expected behavior then thank you very much for helping with this. If it is not expected behavior please make a note so it can be fixed in future releases.

All in all im very happy because i know now how to correct this problem. Thanks again for the assistance.

Cheers

avatar image AndrewHurley Mar 31 '15 at 07:14 PM

Hey Crocopede,

The behavior you are seeing is expected because in order for two sided foliage, or any foliage model for that matter, to calculate light it needs normals. Normals take in light and project light bounces based on whether you choose Tangent or World Space calculations.

I have actually edited my own grass shader to look a bit cleaner by removing the 'FuzzyShadingGrass' node, and passing the color variation approach used for the 'Base Color' to the 'Subsurface Color.'

I also re-checked the 'Tangent Space Normals' since the normals in my shader are of that type.

Edited Foliage Set Up

alt text

Glad I could get your foliage to render correctly! Let us know if you have any other questions or need additional assistance.

Cheers,

Andrew Hurley

avatar image Crocopede Mar 31 '15 at 07:57 PM

Cool man. Didn't know that normals were used for light calculations. Good looking grass btw.

Thx again

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question