Author Topic: Doble-sided material  (Read 23690 times)

2014-10-20, 20:48:51
Reply #15

Ludvik Koutny

  • VIP
  • Active Users
  • ***
  • Posts: 2557
  • Just another user
    • View Profile
    • My Portfolio
Actually, that's wrong. The material should get dimmed, because it passes some energy through instead of reflecting it back to camera.

In some very early versions, Corona actually did not have translucency energy conservation, so when you added translucency amount to CoronaMTL, it actually added more energy to the material, without compensating it anywhere. So material reflected same amount of energy, but also started to transmit some more energy through. You have no idea how incredibly ugly it looked. Enabling translucency on grass for example made grass appear glowing. It was that super bright super green radioactive green color, like you can see in The Simpsons.

EDIT: I was trying to find the image, but it was way too long long ago. But it would be a nice example to scare you away from your idea. You really can't imagine how ugly glowing grass looks.

So back then, my workflow was to first create my materials, and then i would have to go to bitmaps, and reduce their RGB to half to compensate for it. Basically, i had to do manually what Corona now does automatically, just to make grass look realistic.

2014-10-20, 20:55:47
Reply #16

Ludvik Koutny

  • VIP
  • Active Users
  • ***
  • Posts: 2557
  • Just another user
    • View Profile
    • My Portfolio
Actually, you can try how it'd look yourself. Simply compensate for energy loss using output node for example. So if set translucency fraction to 0.5 for example, then add output node right before your diffuse map, and set RGB Level to 2.0 ;)

2014-10-20, 22:28:21
Reply #17

Juraj

  • Active Users
  • **
  • Posts: 4815
    • View Profile
    • studio website
I don't have much energy to dive back into this topic, but up until now, I liked the Maxwell thin-sss solution best. It might actually be still quite basic translucency, but it behaved amazingly when I did vegetation for Ronen's competition.

But from pure empiric standpoint, Corona's translucency works wonders for me compared to where I was able to get with Vray2sided. I am quite satisfied with how far I can keep very nice specularity/translucence ratio.
Please follow my new Instagram for latest projects, tips&tricks, short video tutorials and free models
Behance  Probably best updated portfolio of my work
lysfaere.com Please check the new stuff!

2014-10-21, 12:02:09
Reply #18

robotmats

  • Active Users
  • **
  • Posts: 10
    • View Profile
Actually, that's wrong. The material should get dimmed, because it passes some energy through instead of reflecting it back to camera.

Well, there is the problem. What goes on, in real life is that the surface absorbs all light, it then scatters within the object, before exiting the object. The light that exits the object either goes 100% back to the surface (no translucency) or 50% back (full translucency). The value in both vray and corona for full translucency (within thin objects) can never occur in reality, because the backside of the object becomes brighter than the lit front side.

As I said before, my view is that of a 3D artist, and not a programmer, so I'm sorry I can't explain it better. What I did in the discussion with Chaos Group was to set up a real life study, and then try to recreate it in rendering. So far, all attempts have been unsuccessful. ;)
I've set up a similar scene for Corona, which I'm including to this post. The setup there is just to illustrate the different translucency values 0, 0.5, and 1, and how they look when lit from the front, and the back.
I'll also include a photo I took of how things look in reality. From a rendering point of view, I think it's interesting to note that a thick stack of paper will look exaclty the same as a single sheet of paper, when lit from the front, even though the stack lets hardly any light through.

I hope someone manages to beat me here - I'm not here to prove Corona wrong, just for the sake of it - I'm just here to shed som light on the problem, and try to find a solution.

The .rar-file contains a max2015 file with the scene, and the textures used. The weird black line in the render is simply the corona light seen from behind. ;)

2014-10-26, 17:14:22
Reply #19

robotmats

  • Active Users
  • **
  • Posts: 10
    • View Profile
Well well... what do you know! I gave it some further thought, and managed to solve the problem.

I took the front and back map, multiplied them with a composite map, adjusted the brightness with an output map. Adjusted the brightness of the front and back diffuse maps (to counter the dimming that occurs when using translucency).
The best Fraction value seems to be 0.45. Going higher makes the front side darker than the back side, which never(?) occurs in reality.

Conclusion: You can really make this work in Corona. Gonna make an attempt to create some nice leaves...

2014-10-27, 13:49:23
Reply #20

Timm Dapper | Laubwerk

  • Active Users
  • **
  • Posts: 14
    • View Profile
    • Laubwerk
Hi everyone,

I just stumbled into this thread while doing my research to add Corona support to Laubwerk Plants. There are a few things that I am not sure about and perhaps you folks can help me clear it up. Mainly I am wondering if it's really the case, that all surfaces in Corona (at least for 3ds Max) are automatically single sided and to make them double sided, I have to use a special texture. And if I use that texture the materials automatically turn two-sided? Does the Two-Sided texture have to be in a specific slot for that to work?

Also I am wondering, the translucency section of the CoronaMtl has a "Level" setting, which I guess controls how much light from the back shines through and a Color setting with texture (which I'd expect to be the color that actually shines through). We usually have a texture that controls how much light comes through (which would define the vein structure and as a color texture would also allow a tint of the color from the back). Furthermore the color that actually shines through would, in our case, probably be the color of the texture for the other side of the leaf.

Now I am wondering, it seems that the "Level" settings can't be controlled with a texture, which feels a bit weird. Furthermore when applying the TwoSided texture to the color channel (like it seems this thread suggests I should do as well) would mean the front texture slot would actually have to contain the back side texture and vice versa, wouldn't it?

Does anybody here have a minimal example of how such a setup would look?

Best
Timm

2014-10-27, 13:59:11
Reply #21

Ludvik Koutny

  • VIP
  • Active Users
  • ***
  • Posts: 2557
  • Just another user
    • View Profile
    • My Portfolio
Hi everyone,

I just stumbled into this thread while doing my research to add Corona support to Laubwerk Plants. There are a few things that I am not sure about and perhaps you folks can help me clear it up. Mainly I am wondering if it's really the case, that all surfaces in Corona (at least for 3ds Max) are automatically single sided and to make them double sided, I have to use a special texture. And if I use that texture the materials automatically turn two-sided? Does the Two-Sided texture have to be in a specific slot for that to work?

Also I am wondering, the translucency section of the CoronaMtl has a "Level" setting, which I guess controls how much light from the back shines through and a Color setting with texture (which I'd expect to be the color that actually shines through). We usually have a texture that controls how much light comes through (which would define the vein structure and as a color texture would also allow a tint of the color from the back). Furthermore the color that actually shines through would, in our case, probably be the color of the texture for the other side of the leaf.

Now I am wondering, it seems that the "Level" settings can't be controlled with a texture, which feels a bit weird. Furthermore when applying the TwoSided texture to the color channel (like it seems this thread suggests I should do as well) would mean the front texture slot would actually have to contain the back side texture and vice versa, wouldn't it?

Does anybody here have a minimal example of how such a setup would look?

Best
Timm

Hi,

1, All materials in Corona are by default (at least in max version) double sided. By that i mean shading. Twosided texture is a tool to make something different texture appear on each side of the material. So for example you can use it to have one side of polygon more reflective than the other, or have one side of the polygon red, other one blue, and so on. In case of tree leaves, you can use it to have one side of leaf to have different color than the other, as it usually occurs, and to have top side more reflective and glossy than the other one, if you use twosided map also in reflection and glossiness slot.

As for the mapping of Level parameter. This was fixed to be consistent with other renderers (Mental Ray, Vray, etc...) in latest Corona version, but the fix is not publicly available yet, so you may want to postpone your effort of supporting Corona until these changes are made public. The old scheme, you are currently using, is using luminance of the texture in translucency color to drive amount of translucency, and color to drive color itself. So as a workaround, you could make translucency texture very contrasty, and then desaturate the texture a bit to compensate for saturation increased by increasing texture contrast. Although i would still suggest to wait a little until new C4D and Max version with correct translucency scheme that has mappable level parameter.

The usual setup would be to just take twosided texture, plug top side texture of leaf in top slot, bottom one into bottom slot, then plug this twosided texture in both diffuse and translucency color slots, tweak translucency level parameter to define ratio between diffuse and translucency, and then do the rest (opacity, bump, reflection and so on).