PDA

View Full Version : ctrl_irradiance


francescaluce
09-20-2004, 01:13 AM
what it does is to let you compose the final result by tweaking directly the color for fg emissions and
irradiance.. the fgemissions are controlled with something like the raytype in xsi or the one made by
szabolic... here you get also an HSV color corrector to better manage the effect.. it simply catches the fg
rays and return the shader after implemented the c.correction.. this happens only for the fg and photon
rays.. that is..


+ use the emission tab to get fg into the scene... basically how much that color will
contribute to the final fg/gi solution.. enabling emission will let you overwrite the standard emission for
the shader.. if you have already an emitting material, like a constant or one with incandescence enabled
you can tweak that 'emission' with emission tab params.. if not you can specify directly a 2nd color just
for the fg calculation. the scene example is when you have a sphere dome 'emitting light', here you ctrl
how much light will be in the scene from the sphere, how much is saturated that color and so on.. by
tweaking the saturation you'll get rid of overbleeded skies while maintaning the right colors visually.


the irradiance otherwise ctrl how much of that fg solution will be showed on your material.. and it is in all
the aspect the same as the irradiance controls you'll find under the maya materials (mentalray tab)..
that for using this one you'll have also to put to black.. here the default values act really as the default
from maya... what does the irradiance function? compute the irradiance, multiply that for the diffuse color
and then add the whole to the final color for the mat... here you have the possibility to use a different
color from the diffuse one.. with maya mats the diffuse color is inherithed from the diffuse slot.. here you
can specify a different one.. if not should be the same as your diffuse.. and also you can fine tune your
colors mood under a fg/gi env.. that is different than just tweak the diffuse color.. so in general..


+ use the irradiance tab to fine ctrl the fg solution on that material, to control overexposures I have
implemented a really fast and smart tone mapping algorithm that without have to make a whole pass,
can get rid of overexposed zones while maintain the same ambient and color scheme by exposing the
virtual sensibility and aperture for that color conditions (the second sphere is just tonemapped).
the scene example is when you have already made the light and gi setup but you find your obj too
overexposed or maybe to dark and not so in contrast with the whole scene and you wanna simply
color correct them as you were in a non gi env.

obviously you can enable both of them for your materials.


the basic setup is:: put to black the irradiance for your maya material, plug it into the input of the
ctrl_irradiance shader, enable irradiance and then tweak your params.


a little addendum is to consider the photon shaders in maya. that are a litte weird.. each illum mat has
already a photon part.. but this one will work only if the last shader will be that material.. that is if you
use just a simply colorpasstrought node.. it wont work (maybe use the surfaceshader shader..)..
so I exposed the maya_photonsurface shader and you can simply use this one and plug it into the
photon slot for the mr mat and get full ctrl over your shader net.. it is true that the params there should
match the ones of your diffussive mat.. but better make a phen to link those then use the maya buildin,
at least for me. do not (re)register in the mr rayrc file.. just put in the include folder.


http://img21.exs.cx/img21/3650/ctrl_irradiance_wf.jpg

**



ciao
francesca

annaleah
09-20-2004, 01:27 AM
Where does the .fti file go....sorry for a stupid question.

slipknot66
09-20-2004, 01:31 AM
Obrigado=thank you again Francesca:thumbsup:

annaleah put those files into C:\ProgramFiles\Alias\Maya6.0\icons:)

annaleah
09-20-2004, 01:54 AM
Obrigado=thank you again Francesca:thumbsup:

annaleah put those files into C:\ProgramFiles\Alias\Maya6.0\icons:)
Thank you.

Jozvex
09-20-2004, 02:16 AM
Wow!

That's all I can say for now, I must test this out!

tripNfall
09-20-2004, 07:37 AM
You are a super genius. This is exactly what I needed.

THANK YOU.

Dr. Ira Kane
09-20-2004, 09:28 AM
Thanks for the contribution Francesca !

grafix
09-20-2004, 09:40 AM
Grazie, Francesca!

Haven't had the time for testing, but overexposed regions have been a problem in many renders I did. Great!!!

-Grafix

Elvis75k
09-20-2004, 10:06 AM
Hoha! Tested.. All works great on maya 6.0.1 :thumbsup:

francescaluce
09-21-2004, 01:57 AM
ouch.. there's a little error in the .mi file... line19 update to this

scalar "m_contrast_e", #:default 0 softmin -1.0 softmax 1.0




ciao
francesca

Jozvex
09-21-2004, 02:15 AM
It really is a great shader Francesca. What are the 'power' and 'power k' settings for though?

I'm going to try and add button to the AETemplate called 'Reset' that gives you back all the default settings, because there's a lot of them!

mental
09-21-2004, 06:04 AM
thank you francesca :)

lazzhar
09-21-2004, 07:13 PM
Waw!! It's really useful shader !! it solves tons of problems when your Final Gathering !
Thank you very much for this precious gift.

Atwooki
09-21-2004, 07:32 PM
Thanks Francesca - you're really out there in a league of your own; a shining star :)

Atwooki

pascal
10-11-2004, 02:11 PM
erm... It sounds really interesting!!! But I really can't figure how it's working:shrug: .

I have tried with a simple sphere/plane lighted with IBL and tried to play with the tonemapping function but it doesn't seems to change anything whatever I try.
Is it possible for someone to upload a similar test scene? Or just give me some steps? Or is it just me who a bit dumb on this one?...

What I would like to do is to use an existing material and use the tonemapping to avoid the overexposed areas...

Thanks in advance...

Pascal.

francescaluce
10-11-2004, 05:16 PM
What I would like to do is to use an existing material and use the tonemapping to avoid the overexposed areas.. set to black the irradiance for your material.. plug it into the color input of ctrl.irrandiance.. check the tweak.irradiance.. check the use.as.diffuse.color and set it to the same as the diffuse color of your material.. tweak.




ciao
francesca

francescaluce
10-13-2004, 03:46 PM
ctrl_irradiance_V1.2


I implemented a new amazing feature from mentalray3.3.. we can ctrl FG/GI settings in the hypershade.. on a per-shader basis. :)

http://img62.exs.cx/img62/4808/maya_ctrl_irr_ow.jpg
*when in view dependant mode..
the fg overwriting will consider the min and max settings as they were pixel of your screen image..
1 is 1 pixel..



ciao
francesca

Goon
10-13-2004, 04:23 PM
you rock francescaluce :love:

thx

Jozvex
10-14-2004, 12:03 AM
Great great great!

I've been using view dependant FG a lot lately and it's really cool.

annaleah
10-14-2004, 12:13 AM
Thank you francescaluce!

Jackdeth
10-23-2004, 05:18 PM
Linux?? Redhat9?? Please.:)

johnnynightlife
11-06-2004, 03:55 AM
Francescaluce, does this work for maya5? i loaded all files, and added the lines into the maya. rayrc file, but i got the error "specified module could not be loaded. thanx in advance

Jackdeth
11-06-2004, 04:22 AM
Francescaluce, I send you a PM a few days ago about the Linux compile, so write me back so I can send you the file.

Thanks again.

Doublecrash
11-08-2004, 11:20 AM
Really cool! Thanks a lot! :thumbsup:



Stefano

francescaluce
11-08-2004, 06:56 PM
thanks to colin strause here also the v1.3 linux porting.

:):)

included also a basic scene to let you use occlusion from finalgathering.



ciao
francesca

Daniel Whitton
11-09-2004, 08:28 AM
I seem to be having a littlte trouble figuring out how to set it up for occlusion. I'm following what you have on highend by placing a blend color node into the material slot. Pluggin the Ctrl node into that but I get aborted renders (not returning a strcut or something)

francescaluce
11-13-2004, 04:38 PM
mmhh. basic stuff here.. the ctrl.ir returns a color struct.. you need let's say a luminance node to get it in a scalar term then plug it as blend factor for the blender.. there's a very basic scene in the above link.

http://img63.exs.cx/img63/6094/ctrl_occ_maya_base.jpg
set to black the input and to white the radiance diffuse color.. and b/w also the blend colors.
should be an occlusion pass (no other colors, no other materials).
enable finalgather in the globals and set to fg.rebuild if the first frame of the anim.. for next frames
you could (freeze or) append the solution by decheking that option.. using the fgocclusion cache.

http://img63.exs.cx/img63/3657/deesse_occ.th.jpg (http://img63.exs.cx/my.php?loc=img63&image=deesse_occ.jpg)
6.25mins (firstframe)
4.38 (append)
2.59 (freeze)



ciao
francesca

Sciatica
11-13-2004, 10:13 PM
You rock so hard, your diamond :p :)

Thanks alot for the effort put into this, and for sharing it with us! :)

lazzhar
11-15-2004, 05:23 PM
Really nice to have this way to get AO. It seems very fast, I had to go comparing it with other shaders though.
thanks a lot.

ohiro2
11-19-2004, 08:59 PM
This shader is great.
Thanks francesca!!:thumbsup:

michael_b
01-16-2005, 04:17 PM
first of all thanks to francesca for this shader.

i just tested it and all worked fine, except for the bump maps of my file textures.
i plugged the file textures into the color channel of the irradiance tab -
but where to place the bump maps??
does anybody have a solution for this problem ?

ciao, michael

swag
01-16-2005, 07:07 PM
use the bump combiner

michael_b
01-16-2005, 07:56 PM
thank you swag,
already searched for

AEbumpCombinerTemplate.mel
render_bumpCombiner.xpm
bumpCombiner.fti

but can't find it.
perhaps you know where it is !?

ciao, michael

michael_b
01-16-2005, 08:16 PM
okay, problem solved.

thanks for help

neutronic
01-17-2005, 03:13 PM
do you know folks, that we will not have anymore a post by francesca because she is actually BANNED from this site ?? :banghead:
I'm writing right now to Leigh to ask wtf is happening, asking for an instant readmit... I hope you'll do the same !!

/n

Daniel Whitton
01-17-2005, 06:15 PM
Wow, You mean good contributions get you banned, or was it something she said:sad:

slipknot66
01-17-2005, 09:03 PM
thats sad, really sad......... :hmm:

bjoern
01-17-2005, 10:16 PM
whaaaaaaaaaaat? Why that?
francescaluce did one of the graetest work for all the MR friends.
pooooor

Goon
01-17-2005, 10:54 PM
that really sucks. francescaluce was a great contributor, though her posts could get rather demeaning and edgy.

slipknot66
01-18-2005, 01:05 AM
(hope im right!!) .... guess she was not banned.... :rolleyes:

drubster
01-18-2005, 06:56 PM
i don't fully understand how to connect this shader. Do i connect my material shaders to the color input of the irridiance shader. (then how do i connect this shader to my objects?) or do i connect the irridiance shader to the color attribute of the irridiance of my maya material?

grafix
01-18-2005, 09:01 PM
(hope im right!!) .... guess she was not banned.... :rolleyes:

I'd wish you were right, but she is not on the members list anymore. Try to do a search by yourself... :sad:

This really sucks! What has happened?

T-R
01-19-2005, 01:30 AM
Now slipnot66 is banned. whats going on here!http://cgtalk.com/images/smilies/eek.gif

grafix
01-19-2005, 08:00 AM
Oh my God I'm banned too !!!

:D

Sciatica
01-19-2005, 09:18 AM
This thread is cursed! O_o
Heh.. its also gonna be closed soon :p
Shame about francescaluce.. I really enjoyed her work and contributions..

francescaluce
01-19-2005, 03:00 PM
I'm back.

I was really banned. :blush:
but thanks to the effort of a lot of ppz..
I got back my subscription.

thanks for the consideration.


ciao
francesca

Bonsai
01-19-2005, 03:31 PM
What happened, if i may ask ?

bjoern
01-19-2005, 03:37 PM
Hooray !! :-)
looking forward, for more of your great MR stuff!
welcome back!!

swag
01-19-2005, 03:38 PM
francesca you know bad girls go everywhere

Jackdeth
01-19-2005, 07:29 PM
I'm back.

I was really banned. :blush:
but thanks to the effort of a lot of ppz..
I got back my subscription.

thanks for the consideration.


ciao
francesca

Spank...Spank...:)

slipknot66
01-19-2005, 09:32 PM
Welcome Back (((((Francesca)))))))) :cool: :thumbsup:

pjrich
03-14-2005, 07:46 PM
I'm trying to use this shader with mental ray's final gathering in maya 6, so I can light a scene with bright objects while still seeing the color of the original object. So far, the only way I can get an object bright enough is to turn the irradiance, ambient color, or incandescence up so high that the object becomes pure white, and all color is lost. This shader looks like it could help, but I'm having difficulty with it.

For others who may try to use the shader: the zip in the first post turns out to be a rar with no extension inside a zip. Before I figured this out, I found v1.3 on highend3d, but the interface doesn't seem to be the same as the one in the screenshots in earlier posts in this thread. In any case, the setup instructions are quite vague, and possibly for a different version than I have. I haven't installed the original version, as Francesca's recommendation on highend3d was to use 1.3.

My questions:

1) Should I assign the ctrl_irradiance shader to my object or leave the original shader assigned?

2) If I assign the ctrl_irradiance shader:
The instructions appear to say to connect the miIrradiance of my shader to the ctrl_irradiance.m_input. This results in an error at render time: "Shader.miIrradiance: unsupported type of connection, current plug value used instead //", and my render is black. Is this the correct connection?

3) If I leave the original shader assigned, none of the ctrl_irradiance shader controls seem to have any effect on my render. Am I just missing the proper version of the shader?

4) The instructions say to "enable irradiance". There's a checkbox in the shader attributes named "M_use_irradiance", is this the same thing?

5) There are two sets of controls for bleed, Kb, hue, sat, val, contrast, one with a "_e" suffix and one with "_i". What is "i", "e", and Kb, and how do they all work?

This looks like a powerful shader that could solve a major problem I have with maya's mental ray final gathering implementation. I would be happy to write some documentation for it once I figure it out.

Here's a screenshot of how this shader appears in maya's Attribute Editor, for comparison:

http://zoomy.net/img/ctrl.gif

Cheers,
Peter

freshNfunky
03-14-2005, 11:38 PM
mmhh. basic stuff here.. the ctrl.ir returns a color struct.. you need let's say a luminance node to get it in a scalar term then plug it as blend factor for the blender.. there's a very basic scene in the above link.

http://img63.exs.cx/img63/6094/ctrl_occ_maya_base.jpg
set to black the input and to white the radiance diffuse color.. and b/w also the blend colors.
should be an occlusion pass (no other colors, no other materials).
enable finalgather in the globals and set to fg.rebuild if the first frame of the anim.. for next frames
you could (freeze or) append the solution by decheking that option.. using the fgocclusion cache.

http://img63.exs.cx/img63/3657/deesse_occ.th.jpg (http://img63.exs.cx/my.php?loc=img63&image=deesse_occ.jpg)
6.25mins (firstframe)
4.38 (append)
2.59 (freeze)



ciao
francesca

at post #27 francheska rote this, maybe it can help you a littel bit :)

by the way, why you have a totally white scene? ? ? ? ? ? ? ? :surprised
what do you want to achieve with a total overexposed material ?

Final Gather alone is mainly good for imaged based Lightning, otherwhise i would recomment
Global Illumination.

it really would interest me... :curious:

so far

Jozvex
03-14-2005, 11:45 PM
She has a totally white scene because she's using that image as an "occlusion pass". She can then multiply it over her normal render (without FG) to get the final result. Having it as a pass rather than using occlusion in the main image gives you more control.

francescaluce
03-15-2005, 12:49 AM
by the way, why you have a totally white scene? ? ? ? ? ? ? ? :surprised
what do you want to achieve with a total overexposed material ?
this shader does two things for you. calculate an irradiance value for the point
being shaded on a per-call basis(if on) or return the fg alpha at that point.
this means that should be used in two exclusive modes.
1.add irradiance to your material.
to enable and see the effective influence of the shader on your renderings you
have to plug a material shader into the input slot, the material shader should
have the irradiance set to zero, or better no irradiance calculation at all. you'll
add that really with the ctrl_irradiance itself. if you forget to low down the
irradiance value of your mat you'll get just barely no differences on your outputs.
2.ambient occlusion pass.
to allow the shader to return occlusion you have to supply a black input,
and a white radiance value. this means that the shader will not calculate the
irradiance but will return earlier with occlusion data [...]. in this mode there're
no colors, no lights and nothing else than the geometry and the ctrl_irradiance
shader with black and white on input and radiance; you're not doing a fg pass
but really an occlusion pass. the white is white, it's not overexposed or whatever,
and the black is the occlusion. until it returns the average alphas you'll use it as
a mask to blend the whites and blacks. also the r.times are not those of a fg calc
but really those of an occlusion probing if not faster, plus there's the occlusion
cache in the form of a fgmap to get better times on animations. fg is not fg.


ciao
francesca


@pjrich:: you have not installed correctly the .mel template.
then, try the two scenes downloadable at post #25.

pjrich
03-15-2005, 07:29 AM
Grazi Francesca - your last post gave me the clues to find my problem.

The _readme.txt file in ctrl_irradiance_v1.3\maya\maya refers to "AEbumpCombinerTemplate.mel" instead of "AEctrl_irradianceTemplate.mel", which confused me, so I didn't put the .mel anywhere. Re-interpreting the instructions fixed my interface problem, and the other instructions made more sense.

The rest of it I had to get through trial and error. This is something I've been trying to do for a long time, but I'm not much of a programmer, so I could only wait for new versions of software, and pray. Until today!

Here's how I got it to work for me (I'll try to be very clear, for other novices):

http://zoomy.net/img/lotus_pb.jpg
A lovely lotus. I want it to glow, and light up the plane below.

http://zoomy.net/img/lotus_maya.jpg
Default light is turned off in Render Globals, and there are no lights in the scene. I try a render with Maya Software; the lotus hangs in space. The shader has an incoming color connection going to both diffuse and incandescent. (Having a separate node to define color seems to be important: if you try to use the shader's own color attribute, you'll wind up making connection loops later.)

http://zoomy.net/img/lotus_mr1.jpg
Final gathering goes on, with 1000 rays - some light hits the plane, but not much. I want more.

http://zoomy.net/img/lotus_mr2.jpg
I multiply the color going to the incandescent by 10. More light comes out, but the lotus is too hot! Also, the color information is lost, because the lotus is glowing white.

http://zoomy.net/img/lotus_mr3.jpg
I unplug the connection from incand and plug it into miIrradiance. We get better color bleed, but the lotus is still too hot. Playing with miIrradiance and miIrradianceColor just doesn't work - you can't adjust one without affecting the other, and then you have the same problem. This is no doubt because of some property of physics, or maybe math.

Maybe there's a way around this problem using only mental ray nodes, but the best solution I could find was Jeremy Birn's suggestion to use two objects, a display object and a hidden object to produce photons.

ctrl_irradiance

If you've installed the shader correctly, complete with the .mel for the interface, "Ctrl _irradiance" will be in the "Create > Mental ray materials" submenu in Hypershade. The color source node connects to the ctrl_irradiance node's m_IRRdiffuse and m_input. We also leave it connected to the lotus material's color. Then the ctrl_irradiance outValue connects to the shader's miIrradiance.
http://zoomy.net/img/hypershade.gif


http://zoomy.net/img/lotus_mr5.5.jpg
The first render looks like our original Final Gathering render. In the ctrl_irradiance attributes, under Tweak.emission, check the "enable" checkbox, and increase power.k to 10:

http://zoomy.net/img/lotus_mr6.jpg
Ahhh, there it is.

Tweak.emission controls the light coming from the shader, tweak.irradiance controls the brightness of the shader itself.

My setup doesn't look like the sample shading networks Francesca made, so maybe I am missing the point entirely, and am using a flashlight as a hammer. In any case, this is a very basic application, there's much more that ctrl_irradiance can do... I hope this helps other newbies get started.

Cheers,
Peter

shine77
03-25-2005, 08:20 PM
2.ambient occlusion pass.
to allow the shader to return occlusion you have to supply a black input,
and a white radiance value. this means that the shader will not calculate the
irradiance but will return earlier with occlusion data [...]. in this mode there're
no colors, no lights and nothing else than the geometry and the ctrl_irradiance
shader with black and white on input and radiance; you're not doing a fg pass
but really an occlusion pass. the white is white, it's not overexposed or whatever,
and the black is the occlusion. until it returns the average alphas you'll use it as
a mask to blend the whites and blacks. also the r.times are not those of a fg calc
but really those of an occlusion probing if not faster, plus there's the occlusion
cache in the form of a fgmap to get better times on animations. fg is not fg.


ciao
francesca


Is it possible to calculate file transparency through this occ network.
And thanx for sharing.

shine77
03-26-2005, 04:56 PM
Is it possible to calculate file transparency through this occ network.
And thanx for sharing.

I figured it out thanx anyway

bigdog
05-11-2005, 10:23 AM
Am I missing some thing really obvious here? I can get crtl_irradiance to work with maya shaders to reduce irradiance but cannot with a DGS. Is this not possible? crtl_irradiance does not seem to do anything with a DGS as input.

LehaS
12-26-2005, 10:55 AM
Hei there.....sorry for a small off-top here

I've got an install problem case ....right after installing ctrl_irradiance i launch existing maya scene with mr shaders, switching to hypershade and maya prints out the list of MRshaders in output window saying that all of them were not found in lib mr library....

Its strange since exact same thing happened on my office comp and at home
...at home Maya simply crashed ...in the office it gave some feedback at least....

I checked all the spelling and it seems to be ok....

EDIT: Ups sorry false alarm.:D...problem solved ......i checked it again and found it was a missing include/ in my maya.rayrc.....

victor
05-26-2006, 05:16 PM
I'm trying to use this for removing the color cast from a sky object, but I have run into a problem with transparent objects.

It seems that when the final gather rays pass through another object, the color correction from ctrl_irradiance doesn't take effect anymore. Below, I just tried turning the saturation down on the sky, and it works fine for most of the scene, but below the transparent plane, the blue comes through at the full saturation.

http://img69.imageshack.us/img69/8320/saturation3du.jpg

WHat am I doing wrong or is there a better way to do what I want?

cpan
05-26-2006, 05:38 PM
instead of tweaking the saturation you could switch the 2nd color fg to white/gray... i think... didn't use ctr.irr for a long time :)

also as an alternative you could use the ctrl.rays shader:

plug the ctrl_rays into the color slot of the sky material / ibl then
set the ctrl_rays.eye color to bright blue then finaly
set the ctrl_rays.finalgather override color to gray-white

this way the eye rays see the sky obj as blue but the finalgather rays see it white ;)

-p

royterr
05-26-2006, 06:00 PM
could i use this shader as a tonemaping tool?

does it work with DGS?

ivobakker
08-15-2006, 03:14 PM
Maybe I do something wrong, but I can not find any link to download this beautiful shader. Does anybody have a link for me ?

TNX!

CGTalk Moderation
08-15-2006, 03:14 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.