mia_material for realistic leaves


#21

I’m checking out the shader network rygoody put up and he has oakLeaf.tif hooked into the cutout opacity? Not same thing?

Cutout opacity is where you put your alpha channel for cutout, as opposed to directly into the Transparency section on a standard Maya Blinn or Phong shader. Most of the time you’ll need to check “Alpha is Luminance” on your file node too.

“Additional Color” is directly below Cutout Opacity in Maya 2009’s mia_material_x. I haven’t been using Additional Color on mine yet though… That said, I’m not getting results as sweet as Roy’s in my leaves just yet. Close, but not as close as I’d like… Playing with translucency and transparency seems to be getting me close, but my scene’s got seven different trees so far and tweaking them one by one is becoming tedious. Might have to create a break-out scene and then copy the material settings back in, for the sake of speeding up test-renders.

I’m not using SSS in mine (yet!) and hope not to, but if that’s what it takes… The scene’s already becoming almost too bulky, even under x64, so even more calc and render time might not work for me in the long run. Or, of course, a scene tear-down and reconstruction might help. I have a tendency to get sloppy with nodes on large projects.


#22

Thats odd… I just got home and that section wasn’t sowing up on my work computer for soe reason but shows up at home.

Ok very cool I’ll work more on it tonight. I was actually going to use the setup for a face that I modeled… sill far off but wanted to experiment a bit. I’m familiar with SSS Mix20 and blinn network but not mia and SSS so it intrigued me.


#23

No need for an SSS shader because we are dealing with an open surface not a solid object.

I find the PF perset a good starting point, but you have to play around with twigs/branches/leafs settings alot to mimic real world trees.

Transulcency value should always be set to 1

For Translucency color:
-i think that using a flat color gives unrealistic results (check the back of the leaves, you will see an unatural flat color)
-Using a lighter version of your diffuse texture gives a very weak translucency result
-The Third opyion is to use a texture of the other side of the leaf wich is a solution bteween the last 2.
Frankly I don’t know wich of these 3 options Masterzap wanted us to use.

For trasparency value:
-Everyone is using a value between 0 and 0.4. But when using a 0.8 value the leaves at the edges of the tree give a strong SSS feel but the areas in the shade look a bit “flat” due to this high translucency value (driven by the 0.8 transparency value).

That’s what i found for now. I guess the big mystery lies in the last 2 points.


#24

If that’s the case, you could use ambient occlusion as the value for transparency. The interior leaves would be dark in the AO pass so they would be between 0-0.4. The outer leaves would be occluded very little so they would be close to 1 in value. You chould then remap or clamp values so that no leaf’s transparency goes above 0.8 or below 0.2.

…this may be overkill though.


#25

Ok as promised here are my results:


The most intresting result is the last one because it combines reflection on top of the leaves just like Alessandro’s renders.
It’s not perfect but close.
One of the key tricks is to have leaves facing the sky (more precsely the sun) in Paint Effects wich is quiet hard to achieve. i will post more details later:


#26

How did you achieve the topside and bottomside transparency numbers being different values? I’m no shader genius to be honest, and don’t use a gamma-correct node workflow, so I’m having a hell of a time following your shader network.

The results are great to see though… I haven’t learned or made this much progress in Maya in years, and you’ve been a great help. I find myself actually playing with Maya at home again, instead of loathing it after a long hard day’s work and never opening it at home.


#27

how’s my try ?

1080p version here


#28

Hey InfernalDarkness I believe it’s the condition node.

http://greensoda.squarespace.com/blog/2009/6/25/create-a-double-sided-shader-in-maya.html

And gamma nodes are just for on the spot adjusting right? Fix it in Maya rather then bring it back into PS?


#29

Mrguy, you are right, i am using the gamma correct node because i am using a 2.2 gamma value in my mia_exposure_simple.So you have to correct everything, even color swatches ( i am not sure wether you have to gamma correct the “Ambient Shadow color” in the AO section)

As for the condition node, its very simple: you have a sampler info node that’s inputing information about the normals and it’s plugged to the first term of the condition node. and the condition node sees if the condition is availables ( so normal fliped) so if “color if true” has a white value (0 0 0) and “color if false” a 0.35 gray value.

I will post some more renders with better trees soon.


#30

royterr, in my opinion is a better way to use a Mib_twosided sample compositing instead a sampler_info.

by this way you can handle two independients mia_material, one for each side, you must think that for example the bump for one side must to be the oposite for the other side…


#31

i’m agree with royter and rygoody,
.-the translucency value must to be always at 1
.-the translucency color must to be an image
.-the transparency color must to be white
.-you must to play with the transparency value to get the final result.

after that, i’ve notice that with backlight the leaf color intensity is almost the same as it has with front light, case by case and specie by specie, is not the same a maple than an olm oak, in the second case, the translucency is near to 0.

to mimic this, i use a multiply node to multiply the translucency map intensity by 4 when i put a transparency value to 0.25.

and to get a better result you can use some 3d stuco nodes to change the leaves color in a “natural” look.

this first image without stucco, like in summer

this second one with two stucco nodes to mimic the start of the autumm, only aplied to some oaks

this with a diferent scale in the stucco nodes and some changes in the texture color

the last with the same texture aplied to all the oaks


#32

and finally all the oaks in red

i’ve play with the same leaf with 3 diferent colors


#33

great shot


#34

…and the renders with explanations are very helpful! Thanks for sharing.


#35

Really great posts and descriptions. Maybe I can ad some too but I need to create some trees first of all.

royterr, in my opinion is a better way to use a Mib_twosided sample compositing instead a sampler_info. by this way you can handle two independients mia_material, one for each side, you must think that for example the bump for one side must to be the oposite for the other side…

I would not agree with you. My leaf shader is based on a condition node / sampler info setup where I am using different textures for the back- and foreground. Just put the texture in the appropriate slot.


#36

ok, the final result is exactly the same.


#37

here are my progress so far:

  • i deleted the condition nodes because because what i wanted was done automaticlt by the mia_material
  • improved leafs orientation so they face the sky

As you see in the last exemple we barely see the texture of the leaf due to reflection and transparency power wich kills away the diffuse value. I know that this works very well for arc/solid materials, but i am not that sure if that works well for leafs.

improved reflections:

btw its unbelievable how much the shape of the tree especially leaf position is important, even if you have a perfect shader, the geometry of the tree has a very tricky role.

making a realistic tree mesh in paint effects is very flexible but a bit hard.
what are you guys using to generate those simple trees?


#38

Tostao, those renderings are beautiful! If possible, I would love to sneak a peek at your scene file. I’ve never been able to get outdoor renderings with grass and trees even remotely that good looking. Well done!


#39

i know this may sound a lil stupid but…
have someone tried some “dark green” AO on the leaves? :>

try out. :x


#40

sorry to bring this old thread back to life, but i m just curious if anybody got new insights or better techniques for doin this using mia_material since april…

looking at previous posts by others, it seems like the key is to make the leaf translucent enough so that when the tree is in shadow, and back lit, sun light still come through.

the problem is if i put 0.3 transparency, or even 1.0 transparency, not enough light comes through…and i boost up the mrSky multiplier 2 or 3 times to make the leaves appear more translucent. i turned down the exposure to compensate for the increased multiplier.

all the previous post helped me a lot, and i did some tests on my own. i m not sure if it is the sampling or the filtering, but my grass look blurry and muddy, instead of visible blades of grass.

while the far away trees looks ok, the close up ones looks plastic, partly due to poor modeling…

here are my results: