Author Topic: Vegetation shader  (Read 13217 times)

2015-11-08, 08:38:07
Reply #15

rambambulli

  • Active Users
  • **
  • Posts: 148
    • View Profile
Thank Juraj for this tutorial!!

I have a question about the refelction maps.

A lot of people use them and have great results. But they tend to recreate something that isn't there. Don't they?
As you look to leaves closely the reflection (except for small parts and veins or dried leaves) is pretty much uniform. Still we project reflection maps to create less and more reflective parts on a leaf.
It enhances the feeling of the 3d ripples and deformations of the leaves but also tend to distort the reflection of the leaf as a whole. Especially if you look from a distance.
This is even worse if the diffuse maps have highlights too.

I haven't found a better way to shade leaves though. So it is centainly not a comment on your setup! I was just wondering.



2015-11-08, 14:18:50
Reply #16

Juraj_Talcik

  • Active Users
  • **
  • Posts: 2804
  • Tinkering away
    • View Profile
    • studio website
Yeah I completely agree there.

Imho their purpose is correct, to vary reflectivity, but glossiness map should be enough to do that. To use it further in spec slot to enhance the same effect means the map isn't strong enough, or they're indeed creating something that isn't there to boost the look.

But it's true it ideally shouldn't work that way..imho low glossiness should clamp specular reflection far more than in does currently in Corona, but I don't know
kind of math that should be. Only thing I know, is when I create material in Unreal, Marmoset, etc.. which all use GGX as well, high rougness (low glossiness), give me almost diffuse look. In Corona, it gives me slightly "shiny" look instead.

So yes, I also break my own rules, and do use reflection map, when it gives me visually nicer result. Or I often clamp reflection to lower number as I go to lower glossiness (like 0.5 for 0.5..).
It's just that I am not happy with such workflow, because I can't be sure which version is physically correct. The more you tinker with specularity in materials, the less they will work cohesively in the whole scene to plausible result. Of plausible doesn't mean visually interesting, I am not trying to stress the photorealistic aspect.
talcikdemovicova.com  Website and blog
be.net/jurajtalcik    My Behance portfolio

2015-11-08, 20:04:01
Reply #17

Ricky Johnson

  • Active Users
  • **
  • Posts: 98
    • View Profile
But it's true it ideally shouldn't work that way..imho low glossiness should clamp specular reflection far more than in does currently in Corona, but I don't know
kind of math that should be. Only thing I know, is when I create material in Unreal, Marmoset, etc.. which all use GGX as well, high rougness (low glossiness), give me almost diffuse look. In Corona, it gives me slightly "shiny" look instead.

I've been aiming to adopt this approach to materials recently - physically based, if I'm safe to call it that - but agree that it seems difficult to work with rough materials in Corona and stick to the core principles as things stand.
Materials with a low glossy value seem to attract an unrealistic amount of reflective fuzz and I'm constantly cheating on the concept to make things look right to me.
I wonder if it's self occlusion that isn't being taken into account in the shader. I'm only vaguely remembering this from reading some of that PBM information that was discussed and posted on the forum here about a year ago.
So rough materials viewed at glancing angles should be trapping and obscuring some percentage of specular reflectance. Not sure if that currently happens automatically, or even if it should much.
That's how I've been justifying lowering reflection amounts to myself anyway!

I thought it was interesting that there was the issue with dark edges appearing on rough materials when GGX was first implemented in Corona - that rays of specular reflection were being reflected back into an object.
With very rough materials at certain angles I don't understand how that was entirely incorrect, even if it was an accidental side effect of the GGX model rather than a developed abstraction of a rough surface.

2015-11-18, 18:38:02
Reply #18

3dwannab

  • Active Users
  • **
  • Posts: 301
    • View Profile
Hi Juraj, thanks for this.

Instead of creating separate inverted normal maps for the bumps, check all the flips (X and Y) and its the same result. :]

2015-11-18, 18:39:28
Reply #19

Juraj_Talcik

  • Active Users
  • **
  • Posts: 2804
  • Tinkering away
    • View Profile
    • studio website
Perfect, thanks :- ) Didn't know that.
talcikdemovicova.com  Website and blog
be.net/jurajtalcik    My Behance portfolio

2015-11-19, 11:04:31
Reply #20

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 6212
  • Marcin
    • View Profile
Hi Juraj, thanks for this.

Instead of creating separate inverted normal maps for the bumps, check all the flips (X and Y) and its the same result. :]

>tips&tricks - now! :)
https://corona-renderer.com/forum/index.php/topic,9728.msg62377.html#msg62377

2015-11-19, 13:02:17
Reply #21

3dwannab

  • Active Users
  • **
  • Posts: 301
    • View Profile
Done ;)

2017-05-24, 16:44:23
Reply #22

Energyzer

  • Active Users
  • **
  • Posts: 10
    • View Profile
Hello guys.

Can we please revive this topic?

I'm in the process of creating some images with heavy vegetation, so i'd love if we could sort of "update" the methodology to create awesome vegetation shaders.

At the moment i'm following what Adán Martin + Juraj Talcik have shared, and i'm already getting satisfying results.

Thanks,


2017-05-25, 09:26:11
Reply #23

Juraj_Talcik

  • Active Users
  • **
  • Posts: 2804
  • Tinkering away
    • View Profile
    • studio website
I will definitely revive it :- ) I have been playing a lot with translucency shaders and I am still confused how should ideal translucency map look (should it be bright and low fractional value ? or dark as albedo and high fractional value?).

And mostly, I still believe current translucency model doesn't behave as real-life world vegetation. Imho vegetation is unique, same way as wood anisotrophy is special and most research papers suggest fully custom BRDFs for them.
talcikdemovicova.com  Website and blog
be.net/jurajtalcik    My Behance portfolio

2017-05-25, 11:27:20
Reply #24

Jadefox

  • Active Users
  • **
  • Posts: 152
    • View Profile
    • Renderlab
I've noticed on older Evermotion models the translucency map is grey ( Vray models )
I've redone them last night as you showed in your tutorial and copied the diffuse material
into the translucency slot and WOW ! what a difference.

Does Vray and Corona differ fundamentally on this as it seems a black and white map does
not work in the translucency slot in Corona.

2017-05-25, 11:34:40
Reply #25

Juraj_Talcik

  • Active Users
  • **
  • Posts: 2804
  • Tinkering away
    • View Profile
    • studio website
I've noticed on older Evermotion models the translucency map is grey ( Vray models )
I've redone them last night as you showed in your tutorial and copied the diffuse material
into the translucency slot and WOW ! what a difference.

Does Vray and Corona differ fundamentally on this as it seems a black and white map does
not work in the translucency slot in Corona.

The B&W map from Vray's 2sided shader would be Corona "Translucency Fraction" dictating how much light passes through. Vray takes the color from Diffuse.

Corona offers this additional "Translucency color". My understanding is that it might properly simulate subsurface scattering since the underlying innards of leaves are often more yellowish hue of green.
But I am no longer sure what should the albedo of this map be. The maps from Megascan offer some arbitrary scan of this, but calibrated for no particular BRDF model.

But I don't trust it, from many tests I did over the years, it is so much better than Vray, yet it does not behave as real leaf (I mountain bike like every day, I am obsessed about nature). I would like thinSSS that simulates the exact behavior micro-thin leaf has if it was modeled as micro shell (volume) model.
Real leaves capture the light around them, not just offer see-through when pointed against the light. This effect is nicely visible in fully overcast sky, where the difference is most noticeable. In Sun&Sky scenario, the shader works reasonably well most of the time.
talcikdemovicova.com  Website and blog
be.net/jurajtalcik    My Behance portfolio

2017-05-28, 17:15:05
Reply #26

springate

  • Active Users
  • **
  • Posts: 14
    • View Profile
Thanks for sharing such value info with us Juraj!
I wonder if the same approach suggested previously would still be good since we have pbr on corona...is there anything i should be aware of now?

2017-06-06, 12:07:21
Reply #27

Juraj_Talcik

  • Active Users
  • **
  • Posts: 2804
  • Tinkering away
    • View Profile
    • studio website
Thanks for sharing such value info with us Juraj!
I wonder if the same approach suggested previously would still be good since we have pbr on corona...is there anything i should be aware of now?

The PBR changed just the specular response.

I previously used various tricks like 2.3 IOR and 0.4 reflection, but I now I can use 1.52 1.0 ALL the time :- ) It just made the life simpler, nothing more to it.
talcikdemovicova.com  Website and blog
be.net/jurajtalcik    My Behance portfolio

2017-06-09, 21:21:39
Reply #28

makco

  • Active Users
  • **
  • Posts: 8
    • View Profile
Juraj,

First of all thanks for sharing, I'm relatively new to Corona, so still learning a lot!
I have a question.
When i do this types of maps i thought it was better to reuse a bitmap input as many times as possible,(and modify saturation, hue and brightness for each component needed) instead of having different input versions... this way there are less bitmaps to load (so less memory) and if a different leaf is to be created, less maps to change, so the shader becomes more flexible... this I perhaps inherited from working with other node systems (Nuke, Houdini, etc)...

But is there a reason why this may be counterproductive? (other than the crossing wires that this workflow creates)

Thanks and look forward to learn more and share the little bit i can.

M.


2017-06-10, 10:40:42
Reply #29

Juraj_Talcik

  • Active Users
  • **
  • Posts: 2804
  • Tinkering away
    • View Profile
    • studio website
No of course it's better to reuse maps with more efficient network, but I didn't use Slate when I made this tutorial :- ).

I think I should post a new one using Megascans.
talcikdemovicova.com  Website and blog
be.net/jurajtalcik    My Behance portfolio