Fri, Sep 20, 2:35 AM CDT

Renderosity Forums / Carrara



Welcome to the Carrara Forum

Forum Coordinators: Kalypso

Carrara F.A.Q (Last Updated: 2024 Sep 07 1:44 am)

 

Visit the Carrara Gallery here.

Carrara Free Stuff here.

 
Visit the Renderosity MarketPlace - Your source for digital art content!
 

 



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


hartcons ( ) posted Wed, 30 January 2002 at 11:03 AM · edited Fri, 20 September 2024 at 2:31 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:

  • Mat objects:
    Mat objects re-emit light evenly in every directions. A good example is
    cardboard: no matter you move around a sheet of cardboard the color and
    light intensity remain the same.
  • Reflective and(or) transparent objects:
    This are the "contrary" of mat objects: they transmit and(or) reflect light
    in only one direction. This is why we see a perfect reflection in a mirror
    (else the reflection would be blurred).
  • Specular objects:
    Specular objects are not really physical objects. We use this name to define
    objects that are between Mat and Reflective or Transparent.
    A good example is car paint: depending of the kind of paint (or how old is
    the car!). Car paint can be almost mirror like to almost Mat.
    This kind of object reflects light in a cone (this is in fact more
    complicated than a simple cone) centered on the "perfect reflection" single
    direction. The larger cone the more mat the object is, the smaller the cone
    the more reflective the object is.

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

  • Matness is controled by the Diffuse parameter.
  • Specularity is controlled by two parameters: Specular Intensity and
    Shininess (size of the reflected light cone).
  • Transparency is controled by Transparency parameter.
  • Reflection is controled by Reflection parameter

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:

  • set the color of the object in the Color Channel
  • put a black and white texture in the Transparency Channel (black means 0%
    transparency and 100% color, white means 100% transparency and 0% color).

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:

  • Create a shader that define the texture of your object (color, shininess,
    etc)
  • Create a 100% transparent shader
  • Mix the two using a multichannel mixer and put the texture map in the
    blender.

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:

  • Create a Multi Channel Mixer.
  • In Source 1 shader create your terrain shader with whatever combination of
    texture maps, colors, bump, reflection, ...
  • In Source 2 shader set the glow channel to the color you want and other
    channels to other values if you want to create additionnal effects such as
    transparency or reflection.
  • Put in the Blender the previous Black and White earth texture.

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:

  • we have to use a multi-channel mixer for transparent objects in Carrara
  • using the alpha channel technique in Carrara causes the object to become luminous
  • the alpha channel technique does not change luminosity in Poser and maybe Ray Dream


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

file_264518.jpg

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

file_264519.jpg

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.


Privacy Notice

This site uses cookies to deliver the best experience. Our own cookies make user accounts and other features possible. Third-party cookies are used to display relevant ads and to analyze how Renderosity is used. By using our site, you acknowledge that you have read and understood our Terms of Service, including our Cookie Policy and our Privacy Policy.