View Full Version : surface and useBG shader replacement in mtor?
vimal 04-09-2005, 10:44 AM hi guys,
i want to create alpha for a prop in my scene for which i'll use the use background shader in maya, i want to know what is similar type of shader in mtor and also for surface shader.
|
|
conomara
04-09-2005, 02:35 PM
hey, not sure if this is what you want to know, but u can use the ensemble appeaance in slim to specify alpha. this also allows shadowing based on the alpha channel.
conor
rendermaniac
04-09-2005, 11:47 PM
RAT ships with a shader called RATCollector which collects shadows (and reflections) much like the use background shader does in Maya. Unfortunately it hasn't been kept up to date with the light templates that ship with RAT so you will need to write your own. Basically it does:
surface shadowCollector()
{
color shadowed = 1;
illuminance(P, PI/2)
{
color shad = 0;
if (lightsource("__inShadowC", shad) == 1)
shadowed += shad;
}
Ci = 0;
Oi = shadowed;
}
You have to watch out for two things - firstly multiple shadow casting lights (which should be workeable). Also if you have a 3D surface (not a plane) which recieves shadows on both sides then things can get really weird. Transparency can be odd too. (especially semitransparency).
The solution is to change Ci and Oi to:
Ci = shadowed;
Oi = surfaceOpacity;
You cannot then layer this on top of the image as you do with Maya - instead you need to use a keymix to mix a shadow colour in.
Simon
vimal
04-10-2005, 11:27 AM
thank u simon my saviour...........
it's good that RATcollect shader collects ref and shadow but i want alpha for an object to which i'm assigning a shader, i hope u got what i want, i don't want that object to receive anything but it has to be like a blackhole or create alpha in it's place.
And is there any shader for maya's SURFACE SHADER.
I've a scene where my front door opens, i need the area near the entrance to become brighter. what is the easiest and simplest way to do that?
rendermaniac
04-10-2005, 06:03 PM
The equivilant of a sruface shader is jsut a constant shader isn't it? There is a template for that. (Or the image file ones if you just want to attach an image file).
A Maya "black hole" is called a holdout matte (balck colour and black alpha). To add this create a RIB box and put
Matte 1
in it. Then attach it to yuor surface. If you have transparenecy or displacement it will do the right thing.
Hope that's what yuo are looking for.
Simon
vimal
04-11-2005, 10:42 AM
hi simon,
the constant shader doubt was a very silly one from my side, sorry! i've read about it but i forgot. but the rib box and matte 1 stuff (for surface shader) was very simple and quiet fantastic (atleast for me). i didn't have a clue about the usage of RIB box, that too with typing matte 1 i never imagined it would work like this. where can i read about such simple (but powerful) usage of RIB boxes and the script that we use in it? is it there in the docs itself or somewhere else.
The program stuff which u gave for receiving shd and ref is beyond my knowledge as of now, i'm unable to understand a word in it, i'll ask questions on that later on.....
once again thanks a lot....
rendermaniac
04-11-2005, 10:42 PM
RIB boxes are what makes RAT useable half the time! They are also good for things like Reading RIB archive files. Although to be honest there really should be a check box in the shader to do holdout mattes.
RIB is the language that prman (and any other RenderMan compatible renderer) reads - with a RIB box you are inserting commands directly into your scene file for prman to read.
There aren't really any books on RAT or SLIM. But there is Advanced RenderMan (http://www.amazon.com/exec/obidos/ASIN/1558606181/rendermania-20) by Tony Apodaca and Larry Gritz which is THE book everyone using RenderMan has on their desks. I promise you it will go over your head the first time you read it, but eventually it will be the first thing you grab to look this stuff up - it's very comprehensive.
Simon
CGTalk Moderation
04-11-2005, 10:42 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.
vBulletin v3.0.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.