Well that all depends. Let me explain why this system is necessary:
[ol][li]The Mia Material has a very delicate balance between the color and reflectivity passes as I found out earlier in this thread. You want to stick to that as much as possible.
[/li]
[li]Mega_TK is limited with a few passes by only giving the “result”. The Mia passes go one step further and break everything down into the “Raw” and “Level” passes, that when added together give the result. It’s one more layer of control that quite frankly I find necessary.
[/li]
For example say you want to color correct the actual texture of an object in compositing. Puppet thankfully took the steps to separate diffuse and color (unlike Maya’s Pass presets) so you can CC both independently, but uh-oh, the color is still in the Indirect pass. That means if you use indirect, you are essentially stuck with you got in the maya render.
[li]The P_shaders only have 10 special passes. That may be enough if your Maya Render looks really close to the final result, but usually that is not the case. If it is, you probably spent an unnecessary amount of time tweaking and re-rendering in Maya. I like to have the control over each individual Material in compositing, which requires creating a Matte Pass for each. It’s a pain to setup and hopefully DeeX will be able to make that setup easier in the future, but I simply can’t get that done in 10 passes.
[/li]
[li]10 special passes is not nearly enough for additional custom passes as well.
[/li]
For example, say you want a point world pass. Goodbye to one pass slot. Now how about an SSS pass for easier skin compositing in Post. Say goodbye to another Pass. Maybe you want SSS broken down additionally into the 3 different layers. Again goodbye to even more. Now how about a fake hair shadow to multiply in post on a characters head, so you don’t have to keep making corrections in Photoshop to get it just right. One more pass slot down. Now what about a facing Ratio? You get the idea.
[/ol]
Don’t get me wrong, Puppet has an awesome system, but it has a few downfalls depending on what level of functionality you need out of it.
I have a little problem : i fail to create a phenomena of a car_paint_phen shad in Maya 2009.:hmm:
If anyone win to create a phenomena of a car_paint_phen, please say me :hmm: .
I sent you a private msg to explain why you get this error
phenomenon "deeX_mi_car_paint" root not found
The reason is because the mi_car_paint itself is a phenomena, not a shader based on paint Shader and the mi_car_paint_x is a copies of a copies! so when you point the root to mi_car_paint_x there is no root since mi_car_paint_x itself need a root witch is assigned somewhere in Paint shader.
If you need to build a phenomena based on mi_car_paint_phen_x for outputting some result passes you need to look at others data like Scripts/AEtemplate and Others, also AdskShaderSDK.mi (mental ray/include)
anyway here is your code corrected without the _X
Hi Crispy. All that is very interesting, but I have some questions about it: you said you need to stick with mia_material because of the embedded physical light balance. But then you want so much control on it (raw+level for every channel) that you could easily overset that mechanism. Isn’t it a contradiction? More so that you said one shouldn’t take too much time tweaking settings in Maya, so you probably don’t get so close to your final effect. You are probably going to break that desired balance anyway.
Btw forgive me if I say some obvious inaccuracies, I didn’t go too far with compositing yet.
You are absolutely correct. The bottom line is you go with what looks right in the most efficient way possible. Compositing in itself is a trade-off of sorts, even a cheat to some degree. You try to play by the rules as much as possible but at some point you need the freedom to break them. Why? Because doing so can save you hundreds of hours of work by allowing you to work more like an artist and less like a technician.
There is a reason so many 3d still artists do touch-up to their final render in Photoshop. Technically, that is an even bigger mistake than compositing with passes, but realistically, from an artistic and deadline perspective, it’s the best option many 3D Artists have. That and pass compositing is not an easy thing to learn ;).
By the way, there are ways to fake th Mia material balance with a facing ratio pass. Doesn’t mean it’s physically accurate but hey, who wants to wait an extra 10 minutes rendering a scene to see one small difference with each slight change. The best practice in my eyes is to get things somewhat close in Maya without going overkill. You could literally spend a month trying to get a Maya render perfect when you could achieve similar results with compositing in a few days, possibly hours.
Like we see, we must use a “mi_metallic_paint_output_mixer” (hidden shader ? :wise: ).
Now it is working. To night, i will try to merge this code with my code.
Thanks for your words Crispy. I understand, that’s why I’m trying to put myself in that fight too.
But oddly I know many people who are allergic to most post work, like 3d purists you know? I know an archviz guy who refuses to do any plate matching. Instead he prefer just to model everything for free uahaha
So DeeX has his hands full with getting this to work and latter adding custom Pass support. Let’s see what we as a community can do in the mean time work out a Matte Pass solution. I proposed a Matte Pass Creator Script in the programing forums. Best of all it won’t suffer from the render 5x render increase.
It would mean we would get 2 different EXRs. One from DeeX's ouputs, and one from Maya's Passes that have all the Mattes. Of course this is all potentially temporary if DeeX adds something similar on a per material basis inside the shaders. But like I said, he is clearly busy at the moment.
Look carefully in AdskShaderSDK.mi
at line 167: Shader for the mi_metallic_paint_x outputs.
at line 269: Shader for the mi_car_paint_phen_x outputs.
So this is the Shader, witch debut with declare shader.
and the code you posted in paint.mi is just a phenomena based on AdskShaderSDK Shader with declare phenomena.
Let me just clear up a few things which might be overlooked…
[quote=“crispy4004”]
[ol]
[li]The Mia Material has a very delicate balance between the color and reflectivity passes as I found out earlier in this thread. You want to stick to that as much as possible.[/li][/quote]
[/ol]This “delicate balance” is just because the material is energy conserving, ie the diffuse + shadow + reflection always = 1. So a completely reflective material with have no diffuse shading etc. This stops users from breaking the laws of physics
Now this is when you need to start being VERY careful. There’s something a lot of people don’t understand. There is actually a very good reason maya’s pass system and some of puppets pass contain the colour information mixed in - its all about multiplication.
To quote master zap: “Technically you can only postpone additive math 100% properly to post. Any time you do multiplicative math (in post), you should be worried, because you will run into trouble.”
That’s because of the way multiplicative math works. In render time, it is happening at a subpixel level because of antialiasing, then filtered to get the final pixel. When you try do that in post, you can only do it per pixel so you will end up with some serious issues (looks like the edges dont quite line up), especially evident when you have semi transparent objects or high contrast areas. For an example, goto the link further down.
The only way to composite 100% correctly without introducing any problems is to do all the multiplication at rendertime - which is why colour is premultiplied with lighting passes. Puppet gets around this in his shaders by using a output shader the divides the colour from some passes at the pixel level, I don’t know how well this works, but you can do the same thing in any compositing package.
My suggestion (especially for production), stay away from these problems! It can be very hard to fix, the amount of control you get from splitting passes up to raw/level passes is not always worth the problems you will encounter.
To quote master zap: “Technically you can only postpone additive math 100% properly to post. Any time you do multiplicative math (in post), you should be worried, because you will run into trouble.”
p_MegaTK have some trick for avoid such problem like on followed image:
For example you’ll get right image with p_MegaTK and left one with any other simple passes system (diffuse * shadow).
Yes, it’s multiply problem…
I’m using dividing buffers for fix it…
Wow, thanks mercuito for bringing this up, never noticed it before. I built a similar scene with just the color_buffer_witters and low and behold, the artifacts exists. All my scenes are pretty brightly lit, so maybe that’s why I’ve never noticed this before.
Looks like Puppet somehow got around it though. I’ll test it with Puppets and Deex’s outputs when I get back home.
Yeah I’ve looked into your little trick, just had a couple of concerns about how accurate it might be? I was exploring a similar technique but decided against it as it was doing odd things with semi transparent objects (I believe it still composited correctly though, just looked odd before hand).
Most studios use premultiplied passes anyway - i think this is how renderman does it? Either way, doing only addition in comp is a great way to go, keeps things simple and reduces chances of problems.
I love the ability to alter stuff in comp, but I find sometimes people rely on it too much, and you end getting renders out of maya that are pretty crap and then comp can only push it so far. I encourage people to get a good render out of maya and then use comp to make a good render great.
My trick works fine before you are using not hard color correct.
It may have some problem with hard color correct in black areas where low samples was used. In these areas some aliasing may appear (result of low samples and dividing).
But ussualy it’s not visible after compositing all passes. Because such area usually multiplyed by dark diffuse or something else.
So it works fine in 90% cases. It’s not ideal, but it get result more closer to beauty than other passes techniques (with pure “shadow” and “color” passes).
If you don’t need pure “shadow” or “color” pass, you may use “shading” pass, that already contain all these passes combined.
Or just disable “dividing” in my code
In any cases it’s better than to have outline like on my image that not possible to fix at all.
It’s not mental ray relative issue. It’s any render problem.
For example I’m using same trick in my renderman shaders.
It is possible to use this tool to separate all the elements from the miss fast skin shader?
I can get it to render out the front/back/mid sss passes, but not spec/ ref / diffuse etc.
Is it necessary to use something like mix8layer to add a blinn for the spec and ref channels?
Could you please give a poor mental ray noob a quick instruction on how I could set up misss_fast_skin with your shaders in order to render out all the separate passes.
I don’t know what combination to use between the deex misss fast shader, deex mia material etc. Which nodes are to be plugged into the the various attributes for light map, diffuse shader, spec etc in the deex misss shader?
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.