PDA

View Full Version : Transparency color inverted


MJV
06-04-2006, 06:08 AM
When I create new scene with a default geometry sphere and go to the material's transparency page and enter a color, the rendered result is the color inverted as shown:

http://www.mvpny.com/XSITranparencyInvertedMV.jpg


How can I get the rendered color to match the shading color? Thanks.

tarkovsky
06-04-2006, 07:42 AM
By tagging the invert option just below the sliders.
I guess it's because when you move the sliders for transparancy, you actually retract color, thus "what remains" become the inverted...

tark

MJV
06-04-2006, 09:40 AM
That doesn't make any sense. Then you'd have to feed the opposite color from the tree, which would be absurd.

bravmm
06-04-2006, 11:02 AM
Because it doesn't make sence makes it absurd??
The color defines the material's color transparency, where black = opaque and white = transparent. Any other color will mix.

The "Use Alpha" uses the material's alpha channel, instead of its RGB, so you can control transparency with an B/W image for instance.
The "Invert" option inverts the material color or alpha value that is driving the transparency, but depends on the fact if "Use Alpha" is enabled in the PPG.

But this is also found in the manual, experiment I would say because isn't that the fun part of the process.:)

rob

MJV
06-04-2006, 08:08 PM
Sorry I searched the manual quite thoroughly and nowhere does it say that the color will be reversed in the transparency channel and that you have to use an invert function which then in turn inverts your specular. Could you please point our which chapter that is in? I would surely enjoy if for no other reason than I like a good laugh. Thanks.

gent_k
06-04-2006, 09:01 PM
You'll get the behaviour you want when black is transparent and white opaque, i.e. you'll just have to toggle 'invert'.
This doesn't invert the specular, the one facing the camera is the same, and the one in the bacfacing polygons is mixed with the colored transparency color you chose, which is the correct behaviour. (if the diffuse color isn't black, and grey by default as you said in a default scene)
I can tell you that the transparency thing works the same way in max and maya too, because that is the way it should work.
XSI gives you the invert option, in max in similar conditions you'd have to choose inverse colors.

edit: maybe what you want to do is set the diffuse color to black?
http://img59.imageshack.us/img59/772/clip3mn.jpg

GeneralLethal
06-04-2006, 09:01 PM
This is quite logic, if you know how light behave. The color you input is the color of the light that passes through the object. If your object is transparent to red, and you shine a white light upon it, red will pass through and the rest will be reflected. Thus, the object will appear to be green.

MJV
06-04-2006, 09:18 PM
Thanks General Lethal. Strange that as a professional videographer having worked for years with gels and lighting, and having studied color light theory in some detail, that I never noticed this phenomena. When I look at an object passing red light, it also looks red to me. Can you give me a real world example of an object which passes red light but looks green to the eye? This being quite logic, I am anxious to learn of this thing.

gent_k
06-04-2006, 09:21 PM
In real life transparent objects don't have grey diffuse values do they!?!
Do transparent objects' colors even show up in the pitch dark?

you have to have something in the background to see whats happening, as the way you're going you left the diffuse value to a bright grey, and set a transparent color. What do you actually want it to do, be difuse or transparent?? Say you have a blue diffuse value and a green transparent value, what would you expect it to do? appear blue, green, or mixed?
As you see in the example I posted when the object doesn't have any diffuse properties the color comes out the way you'd expect (provided there's something visible behind obiously).

JDex
06-04-2006, 09:40 PM
I'm aware of no such inverse coloring in the real world.

MJV... I'm in agreement with you here.


The Transparency option is really a 0 to 1 setup, that they have allowed you to put a color into it.

0 means no light passes through it.
1 means all light passes through it.

In RGB mode you have 0,0,0 to 1,1,1 (and really negative infinity to positive infinity)

You have a white RGB(1,1,1) light transimiting rays through an object, and you want the rays passing through the object to become red (1,0,0)...

The way you do that is you want no Green Rays to get through, and you want no Blue Rays to get through... only the Red Rays...

Since "0" means no light passes through it and "1" means all light passes through it, to remove the Green and Blue Rays, you ideally would set the transparency color to 1,0,0 (Red is transparent, Green is opaque, Blue is opaque)... So it seems that the default is inversed already and you need to inverse the backwards default to get the logical result... but perhaps there is a good reason it's this way now and it's just not been spelled out for us that don't get it.

gent_k
06-04-2006, 09:51 PM
You're still not considering the diffuse amount though . . .

JDex
06-04-2006, 09:57 PM
Of course you're right... I'm not... But should it be that way? If I want logical control over my render, Transparency is dealing with how rays are effected by my material, and Diffuse is how my object is effected by my rays... does it not make more sense to have them separated?

Edit: I'm thinking ideally here and am willing to say I'm wrong, just stirring the pot a little, looking for some "why" and not some "how it is".

MJV
06-04-2006, 10:37 PM
You'll get the behaviour you want when black is transparent and white opaque, i.e. you'll just have to toggle 'invert'.
This doesn't invert the specular, the one facing the camera is the same, and the one in the bacfacing polygons is mixed with the colored transparency color you chose, which is the correct behaviour. (if the diffuse color isn't black, and grey by default as you said in a default scene)
I can tell you that the transparency thing works the same way in max and maya too, because that is the way it should work.
XSI gives you the invert option, in max in similar conditions you'd have to choose inverse colors.

edit: maybe what you want to do is set the diffuse color to black?


Thanks for trying to help gent_k. Using invert would also invert the strength of the color, and worse, would invert the color of the shadow. That is obviously not the solution. But your comment about the diffuse color got me experimenting and I think I've found the problem. It's not the transparency which is becoming inverted, it's the diffuse which is becoming inverted! As long as your transparency uses no diffuse, then you wouldn't notice, but for a semi transparent, semi opaque object, the problem would be immediately apparent. I did a google search on the issue and was quite surprised to find nothing on the subject. I would have guessed it would be a topic at least one person before me would have found of interest, what with MR now being used in three different programs.

As shown in the illustrations below, it is the diffuse channel's behavior which is at issue. Normally, when an object is transparent, it can't simultaneously be diffuse, so it probably seemed logical from a programming perspective to subtract the transparency from the diffuse. Unfortunately such a simplistic solution isn't adequate because of the problem which then occurs with color transparencies.

http://mvpny.com/XSITranparencyInvertedMV2.jpg


http://mvpny.com/XSITranparencyInvertedMV3.jpg

tarkovsky
06-05-2006, 10:51 AM
I'm not an expert on this, but it makes sense to me that if you have an object of a certain color, and then light it with white light and only let one color pass through the object, the rest of the spectrum will define the color of the object.

GeneralLethal
06-05-2006, 01:54 PM
Thanks General Lethal. Strange that as a professional videographer having worked for years with gels and lighting, and having studied color light theory in some detail, that I never noticed this phenomena. When I look at an object passing red light, it also looks red to me. Can you give me a real world example of an object which passes red light but looks green to the eye? This being quite logic, I am anxious to learn of this thing.

You don't have to get sarcastic, I'm trying to figure this out, same as you. You have to agree that if you shine white light on an object and that it becomes red as it passes through that object, the green light must be absorbed or reflected some way. Now in the real world, you don't have white objects that are only transparent to red light. But XSI allows you to do this. It is logical that if such an object existed in real life, an object that let red light through and reflected the rest of the spectrum, it would appear to be green. That's not how a red gel is made however, a red gel is a red object that is partially transparent to white light. If you set up such an object in XSI, it will behave as expected. Now that's my idea of how it works, with the incomplete notions of light physics I learned in school, so if I'm mistaken just tell me how it really works.

rube
06-05-2006, 05:21 PM
by only putting transparency on the green channel you're having the green light pass through while allowing the red and blue portions on the light still affect the object... that's why you get the magenta color.

to answer your question thoough... put the same value in all the RGB channels for transparency

I haven't read all of it all of the posts so I may have repeated something.

rube

CGTalk Moderation
06-05-2006, 05:21 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.