PDA

View Full Version : selective GI/FG sampling (new shader)


francescaluce
10-13-2004, 03:48 AM
http://img86.exs.cx/img86/204/ctrl_irr_owFG.jpg
**

http://www.highend3d.com/maya/shaders/?group=mayashaders&section=&sort=dt_modified+desc
( -> ctrl.irradiance for mentalray v1.3 )


ciao
francesca

Finkster
10-13-2004, 04:18 AM
Very cool! I shall give it a try.
Thanks!

phil
10-13-2004, 04:47 AM
Looks very interesting francesca, Thanks for sharing.

cheers,
phil b

combatmantra
10-13-2004, 07:47 AM
Thanks a million, this shader opens up a lot of posibilities and control :thumbsup:

francescaluce
10-13-2004, 03:25 PM
damn.. it's true.. I'm a bit shocked about this.. it's not only this shader.. but the last mr3.2/3.3 release that is amazing.. it allows you to manipulate the FG/GI structure.. I just catched that and implemented in a new function.. no matter about your fg/gi.. they are completely dealed by mr as always.. we have now just local fg\gi settings.. or better, it's not only a perobject setting implementation.. like if each obj in the .mi file has its own settings.. but it is a per-material basis.. we have exposed the settings to the whole mr.. you can really paint your image with fg solutions.. drive settings with the rendertree.. use groups to get different fg for the same partition.. animate them.. and so on.



to the shader.. the emission tab simply drives your emissive color... if you have a sphere dome that lights your scene.. on the emission tab you'll find colorcorrection slots to set how the color will paints your objs.. for example you can get saturation ctrl over the emissive color to ctrl the bleeding of the emission while mantaining the same 'eye' apparence for your sky. the irradiance tab is a substitution of the irradiance parameter of your material.. that's why you have to put to black and let the shader do its evaluation.. with the default params you'll find on that tab you'l get exactly the same behaviour like with an irradiance color set to 1,1,1 on your mat.. the new function divide by PI the irradiance contribution.. xsi does not use this way.. so the default irradiance.k value is 3.14.. if you wanna the true behaviour set it to 1.. until the irradiance implementation generally works only with the diffuse color not already shaded.. to be correct you should supply here a diffuse.color to the irradiance function that should be the same as your diffuse mat.. simply copy it from the mat tab or plug it here the same node you plugged into the diffuse mat slot.. both of the above things could be made also in the rendertree with the defaults nodes.. they come from a maya shader I made.. the tone.mapping part instead implements a fast algorithm I found on internet to deal with your overexposed zones while preserving the same color mood of your mat.. use the sensibility params with care..0,01 as steps.. and take also care that the overwriting settings for FG/GI works only when enabled the irradiance tab.
**



ciao
francesca

Rabid pitbull
10-13-2004, 09:14 PM
This sounds very powerful indeed! I am a little confused about installing it though. I have added the files into the followiwing folders.

D:\design\XSI_4.0_Foundation\Application\bin

D:\design\XSI_4.0_Foundation\Application\spdl

The dll into the bin, and the spdl into the spdl folder. Is this correct? I have looked into the documents included in xsi and have not found anything out. I looked in the nodes menu of the render tree and cannot find where to locate this shader.

ray
10-13-2004, 11:26 PM
yay nice stuff, francesca!

pitbull, copy the two files into any folder, then install from xsi via file->addon->plugin(spdl), they will put where xsi needs them to be.


rr

Rabid pitbull
10-13-2004, 11:30 PM
:blush: Thanks will now go and properly install this.

Nocturn
10-14-2004, 12:27 AM
Wow! What a useful shader!!

Thank you Francesca, this made my week. Month.


edit: just played around with it a bit, and I can't get the override fg setting to work, it still takes the settings from the render region. The other settings work fine.
I just tried a simple scene with a sphere and grid, and tried to set the fg settings for the grid higher then for the sphere.

edit again: or it does change....but it's still interlinked somehow with the render regions fg settings?

the overwrite on the ctrl irradiance shader seems to work, but only if you set it to view dependant?

francescaluce
10-14-2004, 01:17 AM
wow.. I got a bit of time to play with this new thing.. mentalray is thrilling me.. I used here
two different crtl_irradiance.. one for the turtles on the left and one as a cluster for the floor
under the turtles.. the fg.max.radius for the cluster mat is drived by a distance falloff .. the
last portion in the shadow is a default mat.. look how there're no differences or steps in the
illumination.. the turtle on the left uses a view.dependant fg sampling to get a finer solution..
the rest of the scene just uses 220 as accuracy and 0,0 for min/max radii.. I left a strong
filtering to better see the fg points.
the last image is the previsualization phase to see how mentalray work out the local fg
settings also in the previz step.. to make the things crazy I first rendered a fg only frame to
get the map.. then I linked the map to the beuty pass in xsi and rendered out the super
turtles in a dist rendering. what can I say.. mentalray. :)



http://img14.exs.cx/img14/8751/ctrlirrad_turtles_owFG.jpg

http://img14.exs.cx/img14/580/ctrlirrad_turtlesprevis_owFG.jpg



#nocturn.. probably my fault.. I have still not updated the logic section for the spdl.. if you have not
overwrite.. it is coz you have to enable first the irradiance tab... then go to the option tab...
also do not forget to set to black the radiance color for your material in the indirect illumination tab..
and to set the diffuse.color in the irradiance tab of the ctrl_irrad the same as the diffuse color of your mat..

or use a way like this one.. with also the radiance of the phong set to black and the irradiance enabled..
you have all the things you need to get the default xsi irradiance plus the local overwriting settings.

http://img41.exs.cx/img41/3487/ctrlirrad_turtles_diffuseIR.jpg
**


ciao
francesca

Nocturn
10-14-2004, 01:56 AM
Yes, I tried your suggestions also, and it seems that the overwrite only works if I turn view dependant on. If I don't, no matter how high I set the fg rays to, and how I change the min max settings, it still takes the settings from the render region.

uggh....forget what I said, it does change, it's just that it looks like when you don't have it set to view dependant, the higher fg settings on the ctrl_irradiance shader are more "sensitive" to what the render region settings are. I suppose this is normal behavior, if the two settings vary a lot. So I had to raise just slightly the low region settings, and the overwrite looked very good.

But hopefully this is a minor issue. It's such a great shader, will save tons of rendertime!

Splin
10-14-2004, 11:39 AM
WOW, thanks alot for sharing, this is too sweet to be true :thumbsup:

mdb
10-14-2004, 11:42 AM
Francesca did you do any tests comparing rendertime with and without this local control on the same scene?


- mdb

Spacelord
10-14-2004, 12:14 PM
Francesca, this looks great, can't wait to play with it !
Thanks

francescaluce
10-14-2004, 06:16 PM
did you do any tests comparing rendertime with and without this local control on the same scene?apart the fact that you could try by yourself... :)
the issue is not only rendertimes.. you can minimize them greatly by using the ctrl.irradiance
on scene basis.. working out your library as different materials for different subjects and
meanings in the scene.. like the distance to the camera or the geom complexity of the model..
but you can also use the ctrl.irrad even when you plan to not use it for final rendering
but instead you use it as previz.. you apply the shader just to the mat or objs you need to
tweak in that contest maybe with the final settings for the whole scene just to test
that zone or efx.. also it is up to your skills to obtain an uniform solution for the whole scene..
using different fg samplings.. and also reducing render times..
the biggest reliability here for me is that you can selectively choose your parts
and paint them with different solutions.. so I used a weight map for example to let the two
different settings blend together while focusing only on the portion of the floor where much
solution is needed.. I left a strong filter to see the fg.rays.. now I could increase the
accuracy to get rid of the finer pointilisme but here a good way is to reduce
the weightmap black color and let the smooth solution (but without detail) better
'blends' with the finer one.. look at the boundaries how the fg is already well smoothed..
I should tweak the weightmap to get a smooth result.. also I just fastly painted a
weightmap.. but I would use a bitmap to get more ctrl on this process..
here the scene will took up to 1h if the max fg local settings should be the globals for the
whole scene.. 23mins is what I got.


http://img6.exs.cx/img6/1757/superTurtles_mapFG_workflow.jpg
**


ciao
francesca

Fluckrat
10-15-2004, 08:23 AM
Hey Francesca, this shader looks fantastic... :thumbsup:

I'd always stayed away from FG/GI and sought more comfortable (time-wise) old-school techniques, this great addition looks like it may loosen things up enough for me to start properly exploiting FG/GI in my work. For that, I am really grateful!

Excellent stuff.

francescaluce
10-15-2004, 11:43 AM
Fluckrat.. I'm happy for you.. I also got a revamped feeling about GI/FG.. for example I never played just for fun with a FG scene and a full 3D dof (here, the maya_dof.. 48samples).. with AA 0,2.. starting from a min, max radii of .001 and .01 in view.dependant mode.. I applied the same expression that drives the focus distance to the accuracy settings for the overwriting material.. more dof.. more blur.. less accuracy.. the same min, max for all the models.. 58mins.. I think it was previously impossible with the default xsi nodes.. I mean if I can remember the last time I tried it was something like 20h for an easy scene like this one..



title:: 'I see you looking at this new thing..'
http://img22.exs.cx/img22/3936/chubby_dof_owFG.jpg
**


ciao
francesca

preludian
10-15-2004, 05:11 PM
20h ?? you must be kidding, I'm shocked :scream: what resolution are you talking about? I know that LW'S FPrime is unbeatable fast, but even 58 min seem quit a lot for such a scene. Is DOF the problem? or the combi of GI/FG and DOF? I wish I could render my movie with GI/FG but those times would kill me ;)

Splin
10-15-2004, 06:37 PM
I cant see how does fprime fit in here?
MR DOF is really slow but it gives very good quality. Altough I am also curious, what was the rez of your final rendering francescaluce?
For example here(MRfM) without dof it was around 2h and with dof ca 7h @1280x690. Plus mr volume fog was used here and all in one pass.
http://c3dmotion.com/Splin/forum/Muna/munad_red_1280.jpg
But this all stinks to be kinda off topic.

Altough that 20h makes me curious.

preludian
10-15-2004, 06:50 PM
FPrime fits in here, because I am used to render with it and only recently switched over to XSI, so I really have no idea what times are normal for MR with GI/FG. Maybe FPrime spoiled me :) but I just would like to know so comparisons, some sort of big thumb rendering specs, what are normal rendering times for PAL or for print res? Is it possible to use GI/FG for a PAL res movie whilst staying under 15m/Frame? With the shader of francescaluce I first thought why not, but 58m for this simple picture is deadly high IMHO, so better stick to the good old lightning techniques. And 20h with pure XSI has really shocked me to death, I'm not used to these rendering times anymore.
I hope I'm not hijacking this thread though...I only meant to deepen my understanding for her shader and MR render speed/optimization.

francescaluce
10-15-2004, 07:09 PM
Altough that 20h makes me curious.no, sorry I mean that at the 20th hour I just stopped the renderer.. it was not finished.:)

I'm not speaking about a normal scene to get for production or whatever.. I'm speaking about an insane (and unnecessary) amount of sampling.. just to test... fg was (1280, 0.01, 0.1, in viewdependant mode..), with 48 samples for Dof and AA at 0,2 (0,06 as contrast).. 1280*960.. try to render it with any other apz out there.. you'll never see the end.. here, while maintaining the same highquality for the 'visible' focused part I got 58 mins.. under the only purpose to test my shader.. forget GI, FG, dof and all what is not basic lighting.. if you have to render an animation by yourself.. for me with a time under 1h on a dualproc I have an affordable solution to go for production in also a small studio.. or just to get my beauty picture where I need it.



ciao
francesca

Splin
10-15-2004, 07:25 PM
Hehe, well I guess fprime has spoiled you greatly yes! :drool:
MR & fprime are two different breeds. MR is very open and with exccellent pass handling like xsi, it simply opens whole new world for you. If times are too long, there are millions of ways to cut corners, it is up to you as a end user to decide which way to choose. And thats exactly whats francescaluce is doing here, simply giving a new shortcut. I really could have used it last time when my scene had great difference between small and large details. Now I can forget it, no fear, cant wait to play with it.
Fprime is closed and you need to take it as it is, closed. Tho of course mr takes more time to learn it and get used to it. For example, some time ago I had to do a interior lighting. Client basically loved those nice suddle gi interiors(volumetrics, glass etc). The end result was, he didnt make a difference between a pic what was rendered with 15h vs ca1h, plus I was able to push the whole thing further in post. So that in the end I was able to cut times to 30min(pal rez) and render out ani, what was perfectly fine in that case. Mr is cool, but distributed rendering is highly reccomended to push all those pixels throught :)
Stills are no problem on single pc.

Splin
10-15-2004, 07:26 PM
ungh, francescaluce was faster and got before me, tho the result is very impressive! Thx for the info :)

preludian
10-16-2004, 07:30 AM
No you really releived me, I really thought 20h is normal is a usual rendering time with MR :eek:
One of the reasons why I switched to XSI is the superb passes implementation I really will need to cut rendering times down. With only Foundation and one license I will have to optimize quit radically unless I will have enough budget to buy advanced. I haven't really dug into MR. because I wanted to concentrate myself on what I need now, first modelling, shape animation, animation. When I've done the previs I'll learn XSI texturing and then rendering with MR'S endless possibilities. Wonder what francescaluce will come with untuil then :)
But now I'm really hijacking the thread, shame on me.
francescaluce I admire your help and devotion for this community and I really wish to see you at XSI Base too very soon. Ups OT again :twisted:

RayenD
10-16-2004, 07:42 AM
This shader kick a... Thanks a ton, you have saved me a lot of headaches and time.

Funk Ride
10-16-2004, 09:11 AM
Really dumb question, but I can't seem to fnid the shader after I installed it. Where should I be looking?

Thanks.

Splin
10-16-2004, 01:25 PM
Really dumb question, but I can't seem to fnid the shader after I installed it. Where should I be looking?

Thanks.
The same way as you access other add ons. Look under Application Data Paths > User.
If that was not clear enuf, in rendertree: Nodes > Illumination > More > Paths(the little button on the top right) > User

I also had a quick look into it yesterday, it is a Godsend, mixes very very well in a rendertree :thumbsup:

Funk Ride
10-16-2004, 02:22 PM
The same way as you access other add ons. Look under Application Data Paths > User.
If that was not clear enuf, in rendertree: Nodes > Illumination > More > Paths(the little button on the top right) > User

I also had a quick look into it yesterday, it is a Godsend, mixes very very well in a rendertree :thumbsup:


That's what I thought, but it's not showing up under the user path. It's installed ok as far as I can I tell, but can't seem to see the shader when searching under illumination/more.

i'll have another roam artound.,

cheers.

Funk Ride
10-16-2004, 02:23 PM
LOL, god i can be dumb, I found it :)

francescaluce
10-17-2004, 03:19 AM
what is this ?

http://img50.exs.cx/img50/6041/ctrl_porsche_occ.jpg http://img63.exs.cx/img63/3657/deesse_occ.jpg
**
you'll say.. francesca gave up.. she got a way to manipulate GI/FG but at the end.. it is
also true that remains indirect illumination.. that even if it is maybe now more reliable and
controllable it remains slow like the hell compared to the 'old-style' tecniques.. and we are
all in a perennial hurry up.. so the only solution we have to get some 'indirect' realism to our
image is still occlusion.. the true here is that on mentalray the occlusion is also still
incomplete.. it lacks the joy of an occlusion cache.. so for the image above I proposed
myself a sort of occlusion with a cache map.. and guess what.. finalgather can generate
occlusion.. the above is an occlusion finalgathering pass.. I just applied some basic changes
to the ctrl_irradiance and voilą a mother****er fast occlusion shader.. it tooks 5/6mins to
render.. where's the cache ??.. the finalgathering map... try to freeze or append it and zoom
in and out for example.. you'll have each of the successive images at this high quality
for your animation under 2/3mins.. let see how to implement this with the ctrl_irradiance.



first, download the ctrl_irradiance_v1.3 (see the link on the 1st page)

http://img92.exs.cx/img92/887/ctrl_porsche_ocrt.jpg

.apply a material to the whole bck partition
.make a rendertree like the above
.set to black the input color (first tab)
.set to white the diffuse.color (irradiance tab)
.set to 1 the k (it was prev 3.14)
.enable the local finalgather
.make your fg settings.. start from 320, 0.1, 1, vd
.the min and max falloff are the near and far clip, 0.1, 4
.set to white the base and to black the mix color
.enable finalgathering under the render options


have a nice sunday. :)


ciao
francesca

neutronic
10-19-2004, 01:02 AM
incredible shader, fracensca. works like a charm.

n

bmwolf
10-20-2004, 02:41 AM
whenever i plug this shader into my partiitions material, the region renders black. the dirtmap shader does the same thing. whats going on? if it's just a lambert or any other illumination node for that matter it works just fine. :shrug:

francescaluce
10-20-2004, 10:04 AM
whenever i plug this shader into my partiitions material...who said that you have to plug the shader directly to your partition material?...
look the example supplied.

it's just a lambert or any other illumination node for that matter it works just fine.an occlusion pass does not involve in any way an illumination shader.. if you wanna use this patched way use the dirtmap.. of course you lose the cache.. an occlusion pass it is made to be composed in post as an ambient occlusion pass.. by multipling it with your ambient pass... also obviously.. while you get this thrilling times using finalgathering.. is because you use the returned occlusion map from fg computation not actually really the fg itself (look the previz step..).. all thing considered it is a pro way to get occlusion map with cache.. and to do this you should modify a bit your daily workflow.. and maybe also the way you think about it.


ciao
francesca

bmwolf
10-21-2004, 12:10 AM
I used it per object as well. i am using a very blurred final gathering solution just for color and subtle shading, but i would like to use an occlusion pass to supplement the final gathering. i had a render crash the other night with very fine FG settings and a long render, so i'm trying to get an acceptable solution with fast render times. my rendertree looks just like yours on the occlusion sample. but it renders solid black. even with the settings you reccomend. i'm new to xsi so it wouldn't supprise me if i'm doing something wrong. i was just wondering if somebody else has had a simmilar problem, and if they figured out what was causing it. it looks like an awesome shader i'm just not smart enough yet to figure it out!

chesterjoe
10-21-2004, 04:15 PM
IMPRESSIVE, Impressive, Impressive,Impressive :eek: You make me Soooooooo Happy :) Thanks So much francesca, un baccio per te ( don't know if that's the right way to say it, sorry hehe)

gerbenicus
01-02-2005, 04:47 PM
When I try to open in Winzip it says its not a valid file. Can anyone help? Looking forward to this shader very much!

ayan13
01-03-2005, 05:28 AM
wawa, pretty good ,thank u francescaluce.:thumbsup:

Xeroedge
01-14-2005, 07:28 PM
Can anyone explain how to use this with great detail?


I hook up everything exactly like the image tells me and then I turn on FG/GI [have my model as receiver /trasmitter and a light as a trasmitter and I put the shader on but nothing happens...

Please tell me because im tired of my models looking good in viewport and getting destoryed by the rendering ;_;


oh and if u know where I can grab a free HDRI image that would be great :]

er.. and last thing that "Cluster_FG" is just like a phong or whatever material with the name changed right ;p?

Xeroedge
01-17-2005, 04:13 AM
NEVERMIND..... im dumb...

I got it working ;p


Decided to use something else after I found out how... DOH! -_-;;


ARGH..... XD

tomeks22aa
07-24-2005, 12:20 PM
is it possible to make it working with hdri env. ?

kolobok
09-04-2005, 12:17 PM
hi all,
can anybody upload ctrl.irradiance v1.3? link on first page dead (

bmwolf
10-19-2005, 02:10 AM
you have to search for it, on that page.

http://www.highend3d.com/maya/downloads/shaders/search.php?searchtext=ctrl.irradiance&filter=3%7C284&search.x=10&search.y=8

francescaluce
10-19-2005, 02:45 PM
get it here the 1.3b. it is an important update that
resolves a bug that mr has with non-opaque objs while
tracing fg rays.. fg rays will not bypass easily semi transp
obj.. like large glass windows. the bug is already known and
it will be fixed in the next mr version probably.. so here a fix
for the while. just increase the transp_factor to increase
the chances to get a smooth solution behind a transparent
obj.

ciao
francesca

Felipe
10-19-2005, 03:46 PM
is it compatible with mr 3.4 and XSI 5 ?

Thx,

Felipe

slipknot66
10-19-2005, 03:49 PM
Yes it is.. at least im using it here with not problems. The only thing its that the FG problem still exist.

Spacelord
12-05-2005, 11:08 PM
Hi,
Has any else scene this error with ctrl_irradiance shader ?
It seems to be a bit touch and go, sometimes it works fine
and other times I get this error. A lot of the times it actually
crashes XSI, sometimes not.

Heres the error.
shader "sib_illum_lambert"illegally called mi_sample_light in shadow ray mode. Ignoring call!
'INFO : RCGI 0.3 warn 362075: shadow shader "ctrl_irradiance" illegally called "mi_trace_reflect". Shadow rays aborted!

CGTalk Moderation
12-05-2005, 11:08 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.