Author Topic: Vegetation shader  (Read 39107 times)

2015-10-14, 16:09:36

Juraj

  • Active Users
  • **
  • Posts: 4324
    • View Profile
    • studio website
I posted this in my wip thread, but might as repost it here if it's ok, more people may come across it here. This is quick start into how I do my vegetation, but most of it is bit old (it desperately needs vertex colors and instance variation),
so I might learn and update it during this project and then do a full video on it.




« Last Edit: 2015-10-14, 16:14:55 by Juraj_Talcik »
talcikdemovicova.com  Website and blog
be.net/jurajtalcik   Our studio Behance portfolio
Instagram   Our studio Instagram, managed by Veronika

2015-10-14, 16:26:52
Reply #1

-Ben-Battler-

  • Active Users
  • **
  • Posts: 170
    • View Profile
Thanks Juraj, this helps a lot. Seems that I have to step up on my veggy materials. :)
Visit Pangaroo

2015-10-14, 16:29:59
Reply #2

Juraj

  • Active Users
  • **
  • Posts: 4324
    • View Profile
    • studio website
Even basics helps the most :- ) Good normal map with strong relief and saying no to "evermotion green" color (toxic level of brightness and saturation)
talcikdemovicova.com  Website and blog
be.net/jurajtalcik   Our studio Behance portfolio
Instagram   Our studio Instagram, managed by Veronika

2015-10-14, 18:01:46
Reply #3

AnubisMe

  • Active Users
  • **
  • Posts: 118
    • View Profile
Thanks for sharing. I have never tried the front back map with darker and lighter shades. Will give it a try. Quick question though; what do you do for the branches? Also any recommendation for pine trees?

2015-10-14, 18:23:37
Reply #4

Juraj

  • Active Users
  • **
  • Posts: 4324
    • View Profile
    • studio website
I will continue with the branches and trees :- ) But not today, need to do some client's review that suddenly came.
talcikdemovicova.com  Website and blog
be.net/jurajtalcik   Our studio Behance portfolio
Instagram   Our studio Instagram, managed by Veronika

2015-10-15, 09:11:23
Reply #5

hrvojezg00

  • Active Users
  • **
  • Posts: 259
    • View Profile
    • www.as-soba.com
Very usefull, thanks! Ground cover is bbb I guess? Tree is made in house?

2015-10-15, 09:44:37
Reply #6

RolandB

  • Active Users
  • **
  • Posts: 328
  • Corona fan
    • View Profile
    • Béhance portfolio
Thanks a lot Juraj... always a pleasure to follow your advices !

2015-10-15, 10:00:36
Reply #7

fellazb

  • Active Users
  • **
  • Posts: 281
    • View Profile
Hi,

This morning I saw that Evermotion is finally providing Corona models and tested the free sample of their tree collection. Must say that they did a pretty good job on the shading part. It has some good similarities of your approach and hopefully this will set a new standard. Looking forward to see your approach on barks and branches (turbosmooth, noise and\or displacement if I saw it correctly at SOA 2014 :) )

2015-10-15, 13:17:37
Reply #8

Juraj

  • Active Users
  • **
  • Posts: 4324
    • View Profile
    • studio website
Very usefull, thanks! Ground cover is bbb I guess? Tree is made in house?

Yes by Bertrand, I am even writting it in the tutorial pic :- )

Hi,

This morning I saw that Evermotion is finally providing Corona models and tested the free sample of their tree collection. Must say that they did a pretty good job on the shading part. It has some good similarities of your approach and hopefully this will set a new standard. Looking forward to see your approach on barks and branches (turbosmooth, noise and\or displacement if I saw it correctly at SOA 2014 :) )

Yes that's it :- ) I will post that too. I spent some time figuring out how to effectively merge scanned mesh (not just texture) but that didn't provide any fruit yet.
talcikdemovicova.com  Website and blog
be.net/jurajtalcik   Our studio Behance portfolio
Instagram   Our studio Instagram, managed by Veronika

2015-10-15, 14:00:07
Reply #9

vkiuru

  • Active Users
  • **
  • Posts: 320
    • View Profile
Appreaciate the share! Though I must say the translucent hue some of your groundcover plants have leans a bit too much to the blueish green, in my opinion :) It´s a subtle thing but it´s the sort of green that plastic plants often have. Then again it might just be a regional thing and that´s how some plants look where you live :)

2015-10-15, 14:06:25
Reply #10

Juraj

  • Active Users
  • **
  • Posts: 4324
    • View Profile
    • studio website
Appreaciate the share! Though I must say the translucent hue some of your groundcover plants have leans a bit too much to the blueish green, in my opinion :) It´s a subtle thing but it´s the sort of green that plastic plants often have. Then again it might just be a regional thing and that´s how some plants look where you live :)

I don't think so.. all the translucency slots are extremely yellowish, and looking at the picture, the blue-ish tint you see is top part of leaf, reflecting blue sky/shadows. You can't even see much translucency in the groundcover at this angle. PS color-picker doesn't reveal any blue either..

Neither do I live anywhere where these plants exist...
talcikdemovicova.com  Website and blog
be.net/jurajtalcik   Our studio Behance portfolio
Instagram   Our studio Instagram, managed by Veronika

2015-10-15, 16:40:10
Reply #11

vkiuru

  • Active Users
  • **
  • Posts: 320
    • View Profile
Appreaciate the share! Though I must say the translucent hue some of your groundcover plants have leans a bit too much to the blueish green, in my opinion :) It´s a subtle thing but it´s the sort of green that plastic plants often have. Then again it might just be a regional thing and that´s how some plants look where you live :)

I don't think so.. all the translucency slots are extremely yellowish, and looking at the picture, the blue-ish tint you see is top part of leaf, reflecting blue sky/shadows. You can't even see much translucency in the groundcover at this angle. PS color-picker doesn't reveal any blue either..

Neither do I live anywhere where these plants exist...

I hope you don´t mind my cropping and zooming part of your render. See the plant here, with the big leaves:


I did not mean it is way too much to the blueish side, but just enough and just slightly too saturated enough to look unnatural to me.

2015-10-15, 16:53:36
Reply #12

Juraj

  • Active Users
  • **
  • Posts: 4324
    • View Profile
    • studio website
The translucent part has no blue tint at all... use PS color picker. Since that exact plant has very thick leaf, the translucency is more minor, and thus takes most of the color from the diffuse, rather than translucency. Which is how it should be.

Saturation yes, it's over-done, but that is post-production on my side. Went to far in 'vivid' look. It's was test merely. But the only blue is in sky reflection on top part of leaves.



The attached example is quick google photo, which I didn't touch. Yet it matches the values, the images are similarly post-produced. Both Translucency are exact rgb match.

http://thumb1.shutterstock.com/display_pic_with_logo/1834214/305626814/stock-photo-green-leaves-backlit-is-nature-abstract-background-305626814.jpg

You also embedded your crop with AdobeRGB profile, while my original picture has sRGB (for which I have my monitor calibrated exactly, despite being wide gamut capable, U3014 ), so it's more saturated than should be.
Unless your browser is color-profile capable (only Mozzila as far I am aware), you're looking at my image incorrectly.
« Last Edit: 2015-10-15, 17:20:36 by Juraj_Talcik »
talcikdemovicova.com  Website and blog
be.net/jurajtalcik   Our studio Behance portfolio
Instagram   Our studio Instagram, managed by Veronika

2015-10-15, 17:50:22
Reply #13

vkiuru

  • Active Users
  • **
  • Posts: 320
    • View Profile
You also embedded your crop with AdobeRGB profile, while my original picture has sRGB (for which I have my monitor calibrated exactly, despite being wide gamut capable, U3014 ), so it's more saturated than should be.
Unless your browser is color-profile capable (only Mozzila as far I am aware), you're looking at my image incorrectly.

That might be the case here. Damn these color profiles.. anyway, thanks for taking the time explaining and I hope to see more of your progress!

2015-11-06, 05:20:29
Reply #14

dubcat

  • Active Users
  • **
  • Posts: 425
  • ฅ^•ﻌ•^ฅ meow
    • View Profile
I just realized that I never thanked you for sharing some of that awesomesauce. Thank you Juraj, you're the man!
             ___
    _] [__|OO|
   (____|___|     https://www.twitch.tv/dubca7 / https://soundcloud.com/dubca7 ( ͡° ͜ʖ ͡°) choo choo

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

rambambulli

  • Active Users
  • **
  • Posts: 160
    • 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

  • Active Users
  • **
  • Posts: 4324
    • 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   Our studio Behance portfolio
Instagram   Our studio Instagram, managed by Veronika

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

Ricky Johnson

  • Active Users
  • **
  • Posts: 108
    • 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: 362
    • 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

  • Active Users
  • **
  • Posts: 4324
    • View Profile
    • studio website
Perfect, thanks :- ) Didn't know that.
talcikdemovicova.com  Website and blog
be.net/jurajtalcik   Our studio Behance portfolio
Instagram   Our studio Instagram, managed by Veronika

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

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 11395
  • 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://forum.corona-renderer.com/index.php/topic,9728.msg62377.html#msg62377
Marcin Miodek | chaos-corona.com
Chaos Corona Support Team Lead | contact us

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

3dwannab

  • Active Users
  • **
  • Posts: 362
    • 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

  • Active Users
  • **
  • Posts: 4324
    • 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   Our studio Behance portfolio
Instagram   Our studio Instagram, managed by Veronika

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

Jadefox

  • Primary Certified Instructor
  • Active Users
  • ***
  • Posts: 241
    • 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

  • Active Users
  • **
  • Posts: 4324
    • 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   Our studio Behance portfolio
Instagram   Our studio Instagram, managed by Veronika

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

springate

  • Active Users
  • **
  • Posts: 15
    • 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

  • Active Users
  • **
  • Posts: 4324
    • 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   Our studio Behance portfolio
Instagram   Our studio Instagram, managed by Veronika

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

makco

  • Active Users
  • **
  • Posts: 24
    • 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

  • Active Users
  • **
  • Posts: 4324
    • 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   Our studio Behance portfolio
Instagram   Our studio Instagram, managed by Veronika

2017-06-10, 11:13:34
Reply #30

ktulu

  • Active Users
  • **
  • Posts: 33
    • View Profile
Would love to see how you are using Megascans' Atlases for your vegetation workflow.

2017-06-11, 00:12:20
Reply #31

makco

  • Active Users
  • **
  • Posts: 24
    • View Profile
Thanks Juraj, that explains why the duplicates.

2019-10-08, 22:34:37
Reply #32

cjwidd

  • Active Users
  • **
  • Posts: 1069
    • View Profile
    • Artstation
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.

Juraj, the breakdown you shared is extremely helpful, I cannot thank you enough - including the linear controller technique you shared in your ivy post. Thank you so much!

I would also love to see a Megascans version if you are so inclined, it would be a great opportunity to study your approach.

2019-10-12, 13:09:59
Reply #33

Juraj

  • Active Users
  • **
  • Posts: 4324
    • View Profile
    • studio website
The Ivy tutorial did use Megascan maps :- ).
talcikdemovicova.com  Website and blog
be.net/jurajtalcik   Our studio Behance portfolio
Instagram   Our studio Instagram, managed by Veronika

2019-10-12, 18:55:41
Reply #34

cjwidd

  • Active Users
  • **
  • Posts: 1069
    • View Profile
    • Artstation
Yeah I made a mistake, I didn't realize Megascans textures were used in the ivy breakdown until I reviewed the post more carefully.

sry mods

2020-01-03, 15:19:40
Reply #35

maxdaiber

  • Active Users
  • **
  • Posts: 7
    • View Profile
The Ivy tutorial did use Megascan maps :- ).

Hei Juraj, where is that tutorial?

I am a bit confused currently with my vegetation shaders.

2020-01-03, 17:09:49
Reply #36

cjwidd

  • Active Users
  • **
  • Posts: 1069
    • View Profile
    • Artstation
You can find a breakdown of the vegetation shader here

2020-01-08, 10:38:05
Reply #37

GeorgeK

  • Corona Team
  • Active Users
  • ****
  • Posts: 803
  • George
    • View Profile
great job on this
George Karampelas | chaos-corona.com
Chaos Corona QA Specialist | contact us

2020-01-14, 12:02:20
Reply #38

STHA

  • Active Users
  • **
  • Posts: 22
    • View Profile
Hi,
Is this is still a valid method, considering that the vegetation shader provided with Corona Materials is very simple. I tried both methods and did not notice much of a difference hence the question. I understand the response may be, if it works why ask or it depends on the foilage type?. :)

I think Juraj your method is employing the Vray doublesided? method which I roughly recall, but last I used vray was 6 years ago.

Just asking.

Thanks for the help.

2020-01-14, 12:07:50
Reply #39

Juraj

  • Active Users
  • **
  • Posts: 4324
    • View Profile
    • studio website
I am bit confused.. what "both" methods ? I do not use Vray Doublesided MTL, I use CoronaMTL.

I merely added "two-sided" maps to make different color/glossiness for plants.

Otherwise, nothing has changed :- ). But now you can do a lot of cool things like randomize color by elements.
talcikdemovicova.com  Website and blog
be.net/jurajtalcik   Our studio Behance portfolio
Instagram   Our studio Instagram, managed by Veronika

2020-01-14, 13:13:54
Reply #40

STHA

  • Active Users
  • **
  • Posts: 22
    • View Profile
Both methods

1. ) Your method is Front/Back Map


2. ) Corona Materials method provided by Corona.
https://corona-renderer.com/stuff/helpdesk/leaves/config.jpg

 https://coronarenderer.freshdesk.com/support/solutions/articles/5000515643-how-to-create-realistic-leaf-or-grass-material-

I meant your method is similar to the vray2sided mtl. Maybe its the same thing. This is what I recall using before I migrated to Corona then ended up using the basic corona method shown in 2.

I just wanted to know whether there is a drastic difference between these two methods or rather is the difference that noticable. Perhaps it might be according to the light or distance from camera.

Ofcourse its up to user preference. but if your method is superior then Corona mtl should be updated so we use the best method. :)

okay I re-read your comment. You wanted a better variation or realism showing two different tonal ranges of the leaf. Got it.

Thanks



2020-01-14, 14:46:37
Reply #41

Juraj

  • Active Users
  • **
  • Posts: 4324
    • View Profile
    • studio website
OK ;- ).

1) Vray 2Sided Material was just Vray's translucency. You didn't have to populate the second slot with anything. If you didn't, it was exactly the same as Corona's translucency.

2) My setup is absolutely identical to one linked from Corona's help. I also use single translucency map and value. This simulates what happens "inside" the leaf and the color inside is the same.

3) I added different Diffuse and Glossiness maps to back and front part of leaf. It has nothing to do with translucency. Leaves look different from front side and back side. Nothing to do with translucency or color variation among leaves.
    Here is photography: Front part is darker, more saturated and glossier/shinier.



4) Outside of this, it's possible to do lot more advanced stuff like using CoronaMultiMaterial to randomize any parameter (Diffuse, Translucency, Gloss, etc..) to make each leaf look different (younger, older,...).
5) It's possible to go even more advanced than that by using Vertex Color Gradient generated by Tree pograms (like SpeedTree or GrowFX),  that you will multiply on top of (Diffuse, Translucency or Gloss) to make sure than brighter younger leaves are on end of trees, and older are inside.

But the basic setup is always the same and there are no different methods. Just one.
talcikdemovicova.com  Website and blog
be.net/jurajtalcik   Our studio Behance portfolio
Instagram   Our studio Instagram, managed by Veronika

2021-11-18, 04:31:59
Reply #42

shortcirkuit

  • Active Users
  • **
  • Posts: 189
    • View Profile
hey Juraj - love referring back to this post so thanks for your efforts.

Can i ask another question though, how did you balance the outdoor to indoor exposure, what that done in post?

2022-03-22, 09:56:55
Reply #43

Juraj

  • Active Users
  • **
  • Posts: 4324
    • View Profile
    • studio website
hey Juraj - love referring back to this post so thanks for your efforts.

Can i ask another question though, how did you balance the outdoor to indoor exposure, what that done in post?


If you're asking about the renderings on 1st page, IPES House, there was no balancing, brightening inside in post or anything. Because this is effectively "open" house, it's not really even interior. It's easy to work with these kind of house :- ).

In Apartment building? Way too many tricks possible. Mike Kelly seems to have new photography tutorial on architecture, I would check that out, it's pretty damn useful.
talcikdemovicova.com  Website and blog
be.net/jurajtalcik   Our studio Behance portfolio
Instagram   Our studio Instagram, managed by Veronika