Forum: Carrara


Subject: old email from Mr. Clappier about transparency and shader trees

hartcons opened this issue on Jan 30, 2002 ยท 11 posts


hartcons posted Wed, 30 January 2002 at 11:03 AM

Antoine Clappier
Date: Tue Feb 29, 2000 5:33pm
Subject: Re: Explanations on the Carrara Shaders (was: Aura)

Dear Dreamers,

Even if Ray Dream and Carrara shader editors look a little bit alike, the
philosophy behind the two shader editors are different.

I advise the serious Carrara user to read the following !

As it appears that the differences between Ray Dream and Carrara are
confusing, I take this opportunity to show what are the differences between
the two products:

1- Transparency
A few weeks ago, someone has posted an explanation I sent to the SDK list
about Transparency. This explanation was highly technical so I am going to
try to explain this with an Artist point of view.

In the real world, objects appear to have different textures or materials
because they have different optical properties. The problem is that this
different optical properties are based on completely different phenomenons.
Here is a list:

To simulate this different properties in Computer Graphics (CG) we use
different parameters:

In the real world not all combination are allowed. For instance, you can not
have a mat object perfectly transparent. This two optical properties are
mutually exclusive.
In CG you can do what ever you want (that is a beauty of it!). You simply
manipulate parameters and if you want a mat object that is perfectly
transparent: it is possible (but unrealistic).

The problem is that not everyone knows the law of optics !
Ray Dream being a beginner product (at the start), the developers have
decided to forbid impossible combinations. When you increase the
Transparency Channel, it automatically decreases the Color Channel. If the
Transparency Channel is at 80%, the Color Channel can not be greater than
20%.

What is misleading is that it isn't shown in the user interface. You can
have 100% red in Color Channel and 80% in Transparent Channel but the Ray
Tracer will use in fact a 20% red in color channel and 80% in Transparent
Channel.

There is a big advantage in this method: it is easy for the beginner. You
want a transparent object ? You simply have to increase the Transparency
Channel. There are many drawbacks: what if a user really wants to create
special effects ? What we do if we have different combinations of percentage
between the Transparent, Color channels and R G B components ? etc

In Carrara, we have decided to do the contrary. The user is absolutly free
to do whatever he wants. The drawback is that he has to undertsand what he
is doing ! To create a Transparent object you will have to increase the
Transparency AND reduce the Color channel else your object will appear too
luminous (it is also true for Reflection).

It will be too luminous because, say you have 80% in color Channel and 70%
in Reflection Channel, the object will reflect or re-emit 80+70= 150% of the
light received: more than the quantity it receives !!! Your object generates
light and then glows.

So depending of what you want to do you will have or not to reduce manually
the Color Channel when you increase the Tranparent or Reflection Channels.

If people are interested, I can post an example. I have created a diamond
texture with inter-reflections and simulated diffraction with caustics).
This shader uses completely false values but looks very good (something that
is impossible to do in Ray Dream).

2- Shader trees:
Because of the way Transparency works in Carrara, the way you can combine
shaders is different.
Let say that you want to create a hole in an object using a texture map.
In Ray Dream, you would:

While it is handy, this is completely unlogical and can be misleading with
more complicated shaders. When you do this you use the Transparency not as
transparency but as an Alpha Channel.

In Carrara, you would:

This is much more logical. If you want to create holes in an object. Your
object has in fact two shaders: the "hole shader" (100% transparency) and
the object texture shader. To select the areas that have the hole shader and
the other that have the regular texture, you simply have to mix the two
shaders with a texture map.

This lead me to the begining question (no I havn't forgotten why I am
writing this email despite of its length ! ;-) ).

How to create a globe with glowing seas:
In this case you have in fact two different shaders: one is the terrains
texture and the second is the water texture. (I use "terrain texture"
becaue if I use earth people will not understand if I am speaking of earth
has a planet with earth and seas or just the earth that is the part of the
earth that is in earth !!! ;-) )

Then you have to to create a texture that defines what is the terrain and
what is water. You simply have to use a texture map that is black for the
terrain and white for the water part. Then you create the following shader:

As you can see it is simpler than in Ray Dream and much more flexible. The
two shaders are independent so if you want to have a reflective sea without
Aura you simply have to modify the Source 2 Channel. For more complicated
effects you can put Multi Channel Mixer into other Multi Channel Mixers and
so on...

I apology for the terrible length of this email but I think that is critical
to really understand how Carrara's shader editor is working. It is certainly
the deeper part of Carrara and noone has done more than scratching the
surface of its complexity and power.

I advise the ones that have some free time to explore it. This is how I have
created the interesting Rusted Ball image found in the Carrara Content CD
(Gallery).

Happy rendering to all,

Antoine Clappier - MetaCreations
Senior Manager, 3D Technologies


geep posted Wed, 30 January 2002 at 12:49 PM

This is excellent information! Thank you very much for posting it. cheers, dr geep ;=]

Remember ... "With Poser, all things are possible, and poseable!"


cheers,

dr geep ... :o]

edited 10/5/2019



nyar1ath0tep posted Wed, 30 January 2002 at 2:51 PM

O.K., thanks for reposting Antoine's e-mail. That explains why:


geep posted Wed, 30 January 2002 at 7:31 PM

... stuck it in my Carrara book. This is the kind of info that you never need. ['till ya need it!] ;=]

Remember ... "With Poser, all things are possible, and poseable!"


cheers,

dr geep ... :o]

edited 10/5/2019



cristianr posted Thu, 31 January 2002 at 5:54 PM

This is invaluable information, it all makes sense now. I gave it a tray and it works just like it's supposed too.

geep posted Fri, 01 February 2002 at 2:22 AM

Nice render Crist! ;=]

Remember ... "With Poser, all things are possible, and poseable!"


cheers,

dr geep ... :o]

edited 10/5/2019



hartcons posted Fri, 01 February 2002 at 3:03 AM

Any way to see the shader for this puppy?


geep posted Fri, 01 February 2002 at 3:09 AM

... it's a sliced up sphere, isn't it? ;=] [I'm interested, also]

Remember ... "With Poser, all things are possible, and poseable!"


cheers,

dr geep ... :o]

edited 10/5/2019



cristianr posted Fri, 01 February 2002 at 11:55 AM

This is how I did it. Just keep in mind that I used the four elements "wind" as the atmosphere for the seen, converting the distant light into "sun".

litst posted Fri, 01 February 2002 at 2:48 PM

A little thing that makes things easier and prevents from specularity problems in the same time : for the transparent shader, instead of using a multi-channel, use the Single Channel function with a Transparency at 100% .


cristianr posted Fri, 01 February 2002 at 3:02 PM

Thanks litst, I was wondering if I had it right.