PDA

View Full Version : Physical Sky Maya (mad_physicalSky)


smaragden
11-03-2006, 05:29 PM
UPDATE!!
mad_physicalSky v1.1

Changes:
* sun direction is now computed from the connected light.
* Overrides for FG_ray, Ref_ray, Env_ray and Eye_ray.
* Source code cleanup.
* Manual with parameter info, tutorial and examples.
* Updated example file.

Download the new file from: Mad Crew Blog (http://blog.madcrew.se/index.php?entry=entry061110-184424)

----------------------------------------------------------------------------------

This is a mental ray shader based on the paper A Practical Analytic Model for Daylight (http://www.cs.utah.edu/%7Eshirley/papers/sunsky/) presented at Siggraph 1999.

http://blog.madcrew.se/images/madsky_render01.jpghttp://blog.madcrew.se/images/madsky_render02.jpg
http://blog.madcrew.se/images/madsky_render03.jpghttp://blog.madcrew.se/images/madsky_render04.jpg

To Download go to: Mad Crew Blog (http://blog.madcrew.se/index.php?entry=entry061103-191701)

/Smaragden

bazuka
11-03-2006, 05:49 PM
download link doesnt work!

smaragden
11-03-2006, 05:50 PM
Ooops now it does.

bazuka
11-03-2006, 05:53 PM
great man 10x, ur fast :)

bazuka
11-03-2006, 06:02 PM
how about some nice tutorial?

and would be nice if u could put some sliders for sun position, time, date year, something like vray, fR2 or maxwell has :)

cheers

Jozvex
11-03-2006, 08:54 PM
Nice work!

It's easy enough to add a directional light aim constrained in the same way as your arrow, for the sunlight. Yours is more intuitive to position than the VRay for Maya beta sun system. At least the last beta I tried.

It would be great to be able to get rid of the 'ground/horizon' brown colour though!

:thumbsup:

smaragden
11-04-2006, 02:19 AM
this is the first implementation i did. Please tell me how you want and with what parameters you want to drive the shader and i will hopefully fullfill your needs. I'm working on a maya node that visualize the sky and sun.

/Smaragden

ghostlake114
11-04-2006, 06:16 AM
Yes, a nice tutorial will great
The shader work well with FG, but it bleed color from the sky too much...

YourDaftPunk
11-04-2006, 03:42 PM
I think the color bleed is accurate- it's just that if you take a picture of the sky, your camera will white balance the image to something more neutral. Since we cannot do that with Maya cameras (without lens shader), I guess just add a saturation component smaragden? But don't tone it down by default.

ghostlake114
11-04-2006, 09:08 PM
I am not sure about the accuracy, but with eyes,you could see that even under the blue sky, the color from sky could not bleed so much :)

faultymoose
11-04-2006, 10:39 PM
Actually, it does. It's not colour bleed, it's simply that in the case of these renders, where the sky is the only light source, naturally the colour of the light will be the same as the colour of the sky. Your brain may attempt to balance the tonal range of what you see in real life, but if you go take a look around - particularly focusing on shadowy areas - you'll notice that indeed, skylight provides a highly saturated diffuse illumination.

shine77
11-05-2006, 11:24 AM
Is it only for maya 8. Because on maya 7 Im getting this error.

"LINK 0.0 error 191007: cannot load C:/Program Files/Alias/Maya7.0/mentalray/lib/mad_physicalSky.dll, This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem.

API 0.0 warn 302004: C:/Program Files/Alias/Maya7.0/mentalray/include/mad_physicalSky.mi, line 13: while defining declaration "mad_physicalSky": declaring nonexisting function mad_physicalSky"

Thanx in advance :(.

smaragden
11-05-2006, 02:24 PM
try to install .NET Framework 2.0.

yassein
11-05-2006, 03:04 PM
thancks mr:smaragden
nice work :applause:

penpix
11-05-2006, 06:56 PM
How to install it ? :love:

shine77
11-05-2006, 09:20 PM
try to install .NET Framework 2.0.

Thanx Ill try that.

Exo7
11-07-2006, 07:54 AM
Hi smaragden !

What's new (yet!!!) about that shader ?

I had some neat results with it, especially within reflections using DGS !

The attributes beneath Extra Attributes seems to have no effect so far, are you preparing something with them ?

I sincerely hope you are still planning to put more work on it; the sun should be visible, using vectors for sun position is not very intuitive too... I'm saying that in the sense that it would be cool if the shader could be ready for an easy integration on its own, your rig works good but it has to be imported everytime as a whole, not much like others mr shaders.

As Jozvex pointed out, a directional light can be easily constrained to it, but what if I need to constrain the direction of the sun with a pre-existing light, like the handy sunLight found in Bonus Tools ? Pluging the lightData's direction in "dir" didn't seem to work for me, am I missing something ?

And mate, you didn't drop only one word on how to ! Could you please at least share the scene you used to produce these 4 beautiful images, or let's say some settings if that's ok ?

Thank you smaragden, keep it up !

Nice work in your blog by the way, few words (!) but nice work :applause:

[edit] Don't give up, really, everyone hasn't got Maya 8 AND 3dsMax 9 alltogether yet !

loneone
11-07-2006, 02:35 PM
hello ! :)
it's look like some maxwell concept..
it looks very good but i don't know how install it...
I try but i have a message "maya aborted":shrug:
Maybe you could take time to make a wordpad.doc (or anithing else) for us with a little tutorial.:love:

I will be glad about testing it..

Visor66
11-07-2006, 03:17 PM
Hi smaragden!

Thanks alot for this shader! Had a closer look now and it really works fine! There is just one thing in your test scene that I dont understand: with all the connections you made, why do you connect the SunPosLocator Translate to the input of a +/- Average node and then, output the result to the SunVector Input of the SunPosLocator back again to then plug the output of the SunVector to the input of the SunVector at the mad_physicalSky !? Why dont you just conncet the translate of the locator to the input vector of the mad_physicalSky directly?

Do you get me? :eek:

Hope for an answer to better understand the connections!

Thanks in advance!

Visor

smaragden
11-07-2006, 08:39 PM
Nice that that you like the shader. I've been kinda busy the last week. But i have been working on the shader and a special Maya locator that totaly visualize all of the shader.
Thanks alot for this shader! Had a closer look now and it really works fine! There is just one thing in your test scene that I dont understand: with all the connections you made, why do you connect the SunPosLocator Translate to the input of a +/- Average node and then, output the result to the SunVector Input of the SunPosLocator back again to then plug the output of the SunVector to the input of the SunVector at the mad_physicalSky !? Why dont you just conncet the translate of the locator to the input vector of the mad_physicalSky directly?That connection is pretty unnecessary. Because i copied the parameters from the original implementation the shader wants the vector from origo to the point on the sky where the sun is(lightPosition-Origo=inversedLightDirection). One thing i can fix ASAP is to invert that vector in the shader so that you kan connect the translation of your light directly tho the sunVector. If anyone have a better idea please tell me.

I will upload the testScenes tomorrow when i come to work.
I also thinking about the ability to tweak the exposure and gamma based on the ray type. e.g FG, reflection, eye etc.
I will try to be faster of answer to your questions, i will try to make a simple tutorial tomorrow to.

regards
/Smaragden

ghostlake114
11-07-2006, 08:51 PM
Great when knowing that you are working with a new version and tutorial... Hope to see it soon

Exo7
11-07-2006, 09:03 PM
Thanks for your follow up !

Koogle
11-07-2006, 09:15 PM
yes I liked the shader too, any improvements welcomed thanks

smaragden
11-08-2006, 07:14 PM
I will post an update tomorrow morning, i didn't manage to get it all done today.

This is what i have changed.


You now connect a light to the shader and the shader calculates the vector for you.
Sun output color attribute to connect to the suns light to get the right color.
overrides based on FG,GI,TRACE,REF...
manual with with parameter descriptions, tutorial and examples.
A more descriptive example scene.
Regards
/Smaragden

Visor66
11-08-2006, 07:23 PM
Hi smaragden!

Thanks for your update! This sounds really good and I think we all cant wait for this to come! Keep up the good work and thanks for all!

Great stuff! :thumbsup:


Greetz

smaragden
11-10-2006, 04:51 PM
UPDATE!!
mad_physicalSky v1.1

Changes:
* sun direction is now computed from the connected light.
* Overrides for FG_ray, Ref_ray, Env_ray and Eye_ray.
* Source code cleanup.
* Manual with parameter info, tutorial and examples.
* Updated example file.

Download the new file from: Mad Crew Blog (http://blog.madcrew.se/index.php?entry=entry061110-184424)

shine77
11-13-2006, 08:04 PM
Thanx for this great shader:)

Is it possible to have all the overides "like the eye ray" modify the floor. Like in the example scene if I turn the eye ray to zero the floor still renders, and if I turn the floor off the reflections on the water change dramaticly.

I`m using maya 7
thanx.

shrisha
11-13-2006, 09:07 PM
Thank you smaragden.
Looks like shader not for Maya 64-bit. Do you planing to do this for 64-bit version?

techmage
11-13-2006, 10:21 PM
Thank you very much, I've been wanting this in MR for so long. Everything seems to be working perfectly. The only thing I think it could possibly need is a way to set everything with time/date/location. Also maybe a way to clouds in the sky, but I feel I might be asking too much with that.:thumbsup:

Exo7
11-13-2006, 11:23 PM
The only thing I think it could possibly need is a way to set everything with time/date/location.
Well, you can use sun.mll wich is a plugin directional light for that, it's in the bonus tools for your version of Maya.

Load the plugin and type: sunLight.

younglion
11-14-2006, 05:14 AM
nice man thanx for posting this, respect

smaragden
11-18-2006, 10:58 AM
I have uploaded a mad_physicalSky.dll for maya 8 on the blog.

http://blog.madcrew.se/index.php?entry=entry061110-184424

/Smaragden

Exo7
11-18-2006, 03:14 PM
It's working fine ! But why is it ?

I mean the previous version were working fine too on M8 (at least the very first, didn't test the 1.1 between oops). Is there any difference with former (supposed for Maya 7.0) 1.1 ?

Kel Solaar
11-19-2006, 12:32 PM
Really Great shader, Can give awesome results combined with ctrlBuffers tonemapping functions of Francesca.
---I'm editing my post because i'have encountered a strange behavior : MR is stopping rendering my SSS since I have installed the shader and use it in a scene. For example a misss_fast_skin alone with FG and an ibl with grey color is running fine. If i put the Physical Sky in texture for my ibl or in the miEnvironmentShader of the camera, rendering stop just after FG tiles with no error (but the lightmap is not computed). After that, deleting the Physical Sky node is not enough, i have to restart my maya, delete the Physical Sky node and everything is back to normal. Is there somebody else having this strange behavior?

shrisha
11-19-2006, 04:41 PM
I't not for maya 8 64-bit ? Because again not working.

MohannadGO
11-19-2006, 04:45 PM
Thank you very much, we will wait for eight.

FSGFX
11-19-2006, 04:57 PM
i don't have much knowledge about maya plugins - so can please somebody tell me how to install this plugin?

thx in advance

Tonydingo
11-20-2006, 07:50 AM
thanks! i like it!

Boumboum34
11-22-2006, 03:42 AM
Great job on this! Huge thanks from me! I'm so glad there's now a manual to go with it--helped a lot.

I did have one problem--so did several others here--I didn't know how to install it and it took me days to figure it out. So I suggest that on page 1 or 2 of your manual you put in instructions on how to install it properly (not all of us are experts on this).

For those of you who have not figured out how to install it yet, here's how:
!. The install has a number of folders, each with one file. On my computer Maya 7.0
is located in C:\Program Files\Alias\Maya 7.0 so please adjust it to your own path.
2. The AETemplates goes in \Maya 7.0\scripts\AETemplates.
3. The icon goes in \Maya 7.0\icons
4. The include goes in \Maya 7.0\mentalray\include
5. The lib goes in Maya 7.0\mentalray\lib
6. The src is source code, not needed to run mad_physicalSky.
7. Now, to get mad_physicalSky to run properly, a file has to be modified.

The file to modify is \Maya 7.0\mentalray\maya.rayrc

This is a plain text file, and this file has to be modified for every mental ray shader installed to Maya.

To modify it for mad_physicalSky, two lines need to be added:
link "{MAYABASE}/lib/mad_physicalSky.{DSO}"
mi "{MAYABASE}/include/mad_physicalSky.mi"

They can't be put just anywhere. Put them just below the line that says:
registry "{MRMAYA_START}"

So that this section of the file looks something like this (from my own install):

$lookup "{MAYABASE}"
$lookup "{SYSTEM}"
$lookup "{DSO}"

registry "{MRMAYA_START}"
link "{MAYABASE}/lib/mad_physicalSky.{DSO}"
link "{MAYABASE}/lib/base.{DSO}"
link "{MAYABASE}/lib/physics.{DSO}"
link "{MAYABASE}/lib/mayabase.{DSO}"
link "{MAYABASE}/lib/contour.{DSO}"
link "{MAYABASE}/lib/subsurface.{DSO}"
link "{MAYABASE}/lib/paint.{DSO}"
link "{MAYABASE}/lib/mi_openexr.{DSO}"
link "{MAYABASE}/lib/mayahair.{DSO}"
mi "{MAYABASE}/include/mad_physicalSky.mi"
mi "{MAYABASE}/include/mayabase.mi"
mi "{MAYABASE}/include/base.mi"
mi "{MAYABASE}/include/physics.mi"
mi "{MAYABASE}/include/contour.mi"
mi "{MAYABASE}/include/subsurface.mi"
mi "{MAYABASE}/include/paint.mi"
mi "{MAYABASE}/include/mayahair.mi"
echo "mental ray for Maya - startup done"
end registry

If you are getting an "abort" error due to an undeclared mad_physicalSky function, it's because these two lines were not added properly to the maya.rayrc file.

I hope this helps the rest of you get this installed and working. :)

Once installed, simply connect mad_physicalSky to your camera as an environment shader, as shown in the pdf tutorial and it should work.

I'm hoping to save others the days of puzzlement I went through. :) I hope this gets put into the first section of the next version of the pdf manual.

Love the shader! YAY! :)

treedee
11-22-2006, 05:03 AM
That setup is not nessesary for Maya 8, However I wonder if you will have 64bit support? Not working on my end if you do.

TAVO
12-08-2006, 07:47 PM
How do i install it in Maya 8 if Boumboum34s setup is not for Maya 8 ? any help will be great.

dagon1978
12-08-2006, 10:38 PM
How do i install it in Maya 8 if Boumboum34s setup is not for Maya 8 ? any help will be great.
in maya 8 the .rayrc part (point 7) is not necessary ;)

TAVO
12-09-2006, 01:54 AM
thank you dagon, i will check it out now.

slipknot66
12-09-2006, 07:21 AM
And about ppl crying about the bad side of this set of shaders.. remember this is not a MAYA|MENTAL RAY shader set. (Miss my Maya and all the flexibility, paint FX, ooo the Hypershade... everything......damn shhhh max SUCKS!) damn :(

hazyglade
12-10-2006, 09:49 AM
hello there and thanks for sharing this wonderful shader with us. I am using this shader for visual effects and I am having some trouble with the use background shader. It appears opaque in renders whenever I am using your plugin. Please please advise. thanks!!!

smaragden
01-09-2007, 02:46 PM
I've posted a Mac version on the blog. Compiled by Rafael Santos.
I also included the installation help by Richard Adams on the blog.
Thank you Richard, hope you don't mind.

/Smaragden

Boumboum34
01-09-2007, 11:25 PM
You are very welcome :) I don't mind at all.

(wow...I'm a published author....my claim to fame....Look out, Stephen King! Yes!)

younglion
01-12-2007, 08:56 PM
first of all this is a great plugin. i have a question can i use any other lights like a spot light? cause i want to use gi for some of my scenes.

Boumboum34
01-12-2007, 11:27 PM
Yes it should work just fine with other lights. :)

Sphere♥
01-14-2007, 02:11 PM
Is there a way to directly gamma correct the texture baking process? I can bake a Physical Sky scene with FG and mia_material but the textures are dark. I can do gamma correction (2.2) in post on the textures but the color range is not optimal and I get some banding. Thanks.

(Oops, posted in wrong thread, meant to post in mia_physical sky, sorry)

younglion
01-16-2007, 12:01 AM
ok i have one more question is id like to add some clouds to the environment so it looks real, do i have to make my own and add it to a sphere, will the sky show through? even with an alpha channel on the cloud sphere?.

smaragden
01-16-2007, 08:56 AM
That should work, tell me if it doesn't.

/Smaragden

Ash-Man
01-16-2007, 01:49 PM
did anyone check the sky system in Maya 8.5 yet

younglion
01-16-2007, 02:12 PM
That should work, tell me if it doesn't.

/Smaragden
thanks ill try this and see if it works

younglion
01-16-2007, 07:01 PM
ok so i tried it with, the spot light and directional light, and also did some gi test, i found out that the gi took so much longer to render without any differeing results, and the alpha also worked well, the first pic is with directional light
http://i38.photobucket.com/albums/e128/nananom/madtest3.png
and the second is with the spot light.
http://i38.photobucket.com/albums/e128/nananom/madtest4.png

doms
02-03-2007, 04:49 PM
Hi, has anyone noticed that colors seem to become about 50% desaturated/ de-contrasted with this plugin? I've been playing around with the exposure etc but this doesn't seem to help, unless i disable the node completely? Is there anyway around this or do i need to use something like ctrl_buffer? Cheers.

thezuck
02-12-2007, 11:23 PM
this shader is awesome....
one thing im having an issue is that during the final gather stage it seems to have a certain balance of luminosity....once the rendering/smoothing phase occurs, it seems to wash out the lighting a little too much..is there a way to control that...ive been trying to nail down the settings but not getting it for some reason

3DThies
03-03-2007, 10:40 PM
I'm using MAYA 8.5 OSX and I have installed the mad_physicalsky shader correctly but when I hit the render button maya says: "// Warning: (Mayatomr.Custom) : /Applications/Autodesk/maya8.5/Maya.app/Contents/mentalray/include/mad_physicalSky.mi: couldn't find shader library //"

I don't understand the message, cause the shader library is installed and worked correctly. The renderer gives me a black image.

Any ideas?

younglion
03-03-2007, 11:58 PM
I'm using MAYA 8.5 OSX and I have installed the mad_physicalsky shader correctly but when I hit the render button maya says: "// Warning: (Mayatomr.Custom) : /Applications/Autodesk/maya8.5/Maya.app/Contents/mentalray/include/mad_physicalSky.mi: couldn't find shader library //"

I don't understand the message, cause the shader library is installed and worked correctly. The renderer gives me a black image.

Any ideas?
sorry i dont know how to help you but maya 8.5 already has a phyiscal sky built into it so in my opinion you dont need the plugin

residentcoppa
04-09-2007, 10:58 AM
Are there any major differences between this mad physical light and the built in one in maya 8.5 ?

V.

danethomas
05-02-2007, 12:50 AM
Hey guys,

I'm new to Maya so please bare with me.

I've been quite impressed with the results from the new mia_physicalsky / physical sun in 8.5.

I started experimenting with a animation I'm working on and I noticed that my textures were rendering washed out.

After a bit of googling I found this article - http://tutorialscentral.com/index.ph...1&limitstart=1 (http://tutorialscentral.com/index.php?option=com_content&task=view&id=57&Itemid=1&limit=1&limitstart=1)

Which touches on my the textures are washed out and how to fix things.

Firstly, I couldn't seem to add a gamma correction node into my texture - but I guess I can consult the docs on how to do that (again I'm very new to this). Although any pointers on how to drop in a gamma node in the hypershader would be great.

I couldn't seem to find many other threads of people having issues with their textures blowing out so I started to wonder if there was a general setting that can combat or control this?

Or does this gamma correction node need to be applied to every texture that you are using in the scene?

Finally when I get to preview my render in the script editor I keep getting:

// Error: (Mayatomr.Custom) : mia_physicalsky1: couldn't find light node sunDirection, ignored //

Any ideas what that might be?

Thanks.

residentcoppa
05-02-2007, 09:24 AM
Hi

Have a look at this thread

http://forums.cgsociety.org/showthread.php?f=87&t=452901&highlight=rendering+bad

Its quite long and a bit technical sometimes. Anyway what your tutorial says is correct and should solve the problem.

You can find the gamma correct node inder color utilities and then connect it with your material ( either the color node or the diffuse node if its a mia material ). Also add to the render camera a mia exposure simple node , under mr lenses.

Hope this helps !
It would be great to have a script or something that could correct this issue easily and faster ...

V.

MohannadGO
05-04-2007, 09:08 AM
Hey guys,

I'm new to Maya so please bare with me.

I've been quite impressed with the results from the new mia_physicalsky / physical sun in 8.5.

I started experimenting with a animation I'm working on and I noticed that my textures were rendering washed out.

After a bit of googling I found this article - http://tutorialscentral.com/index.ph...1&limitstart=1 (http://tutorialscentral.com/index.php?option=com_content&task=view&id=57&Itemid=1&limit=1&limitstart=1)

Which touches on my the textures are washed out and how to fix things.

Firstly, I couldn't seem to add a gamma correction node into my texture - but I guess I can consult the docs on how to do that (again I'm very new to this). Although any pointers on how to drop in a gamma node in the hypershader would be great.

I couldn't seem to find many other threads of people having issues with their textures blowing out so I started to wonder if there was a general setting that can combat or control this?

Or does this gamma correction node need to be applied to every texture that you are using in the scene?

Finally when I get to preview my render in the script editor I keep getting:

// Error: (Mayatomr.Custom) : mia_physicalsky1: couldn't find light node sunDirection, ignored //

Any ideas what that might be?

Thanks.


plus what residentcoppa (http://forums.cgsociety.org/member.php?u=192911) vbmenu_register("postmenu_4362980", true); said you will need to have a look at the mia_exposure_simple under mentalray menu under the camera shape node in the attribute editor, this is the whole scene gamma correction node and it is the responsible for that effect, what you need to do is increasing the Gain and decreasing the Gamma till you be satisfy but take care it will adjust the gamma for the whole shot as I mentioned,
hope it will be useful.

CGTalk Moderation
05-04-2007, 09:08 AM
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.