Originally posted by bigbossfr
View Post
Announcement
Collapse
No announcement yet.
Quick preview workflow
Collapse
X
-
Patrick Macdonald
Lighting TD : http://reformstudios.com Developer of "Mission Control", the spreadsheet editor for 3ds Max http://reformstudios.com/mission-control-for-3ds-max/
-
One question ... when using the code in my previous post (#14 on this page), if a VRayMtl has reflection color (or reflection color) set to something other than black (0.0, 0.0, 0.0), the diffuse color is not changed with that code. How come?
Any way to work around this and maintaining the shader's reflection/refraction?
Also, when using e.g. getTypeParams(pluginType) ... where does the returned list get printed?Best Regards,
Fredrik
Comment
-
Hm so it seems the color texture attribute has different names depending on which brdf is being hit:
Code:# Error: line 0: Exception: file ...\maya_vray\scripts\vray\plugin.py line 88: A parameter with name "THIS_WONT_WORK" doesn't exist for plugin "VRayMtl1@brdflayered". # # Error: line 0: Exception: file ...\maya_vray\scripts\vray\plugin.py line 88: A parameter with name "color_tex" doesn't exist for plugin "VRayMtl1@diffuse". #
Best Regards,
Fredrik
Comment
-
If you want a white diffuse color, my guess is that the easiest way is to override color gain to 0.0 and set color offset to the desired color. But you will have a performance penalty. File textures have a "Disable load" option though.
The python code will work in a very limited cases. You must check for layered brdf and then walk through the brdfs looking for diffuse brdfs. It will be probably easier to check for diffuse brdf
Code:from vray.utils import * brdfs = findByType("BRDFDiffuse") for brdf in brdfs: brdf.set("color_tex", Color(1.0, 1.0, 1.0))
V-Ray/PhoenixFD for Maya developer
Comment
-
Originally posted by ivaylo.ivanov View PostIf you want a white diffuse color, my guess is that the easiest way is to override color gain to 0.0 and set color offset to the desired color.
Basically what we want is to keep the shader as it is, and have its diffuse color overriden to a gray/white.CG Artist - RnD and CG Supervision at Industriromantik
Comment
-
I guess that could work yes. (If you set up all your shaders this way, always).
Isnt there a way to just simply disconnect the diffuse texture slot from any inputs (if any) and change the diffuse color to (0.6, 0.6, 0.6) or such in a Post Translate Python Script?
If you do it as a pre render mel it works, but all your shaders would actually change, and you only want that to happen in render time.CG Artist - RnD and CG Supervision at Industriromantik
Comment
-
Disconnecting things will change the shading network, which is a complicated shading network event. It's probably a bad design decision for Maya to allow this even for layers. You are allowed only to override values. I think Maya's node system is very sound, even if sometimes it's more work to make it the "right way". If you want a shortcut, use the Python script, but you must deal with the internal VRay representation. Using pre-render MEL is probably the worse choice.V-Ray/PhoenixFD for Maya developer
Comment
-
Im not sure if I understand. Are we still talking about doing this as a Post Translate Python Script?
Then deleting the parameter and then change the default value (often black?) to the desired color, is just what im after. This is not done in the scene (as a pre render mel would do it), but just during the render. The scene shouldnt change, and all shaders should still have their textures assigned just like before. And whenever you wanna render it normally you just remove the python script?
Maybe im looking at this in the wrong wayCG Artist - RnD and CG Supervision at Industriromantik
Comment
Comment