PDA

View Full Version : Disable Swatch Generation, Mia_X Material


Jan Svalland
12-03-2007, 10:09 AM
Hi!

In maya 2008, is there any way to disable swatch generation for the MentalRay Mia_x material in the hypershade? It doesn't seem to respect the "Disable File Load" attribute on the file texture nodes, and makes the hypershade extremly slow when working with multiple high res textures.

djx
12-03-2007, 11:00 AM
I'm not sure about a toggle inside maya, but you can disable it more permanently by changing a line in D:\Program Files\Autodesk\Maya2008\scripts\others\mentalrayCustomNodeClass.mel (dont change the original - make a copy to your local scripts folder and change that).

You need to remove ":swatch/mentalRaySwatchGen" for mia_material_x.
Change
if ($nodeType == "mia_material" ||
$nodeType == "mia_material_x")
"rendernode/mentalray/material:connection/mentalray/shadow:/connection/mentalray/photon:shader/surface:swatch/mentalRaySwatchGen";


to
if ($nodeType == "mia_material" ||
$nodeType == "mia_material_x")
"rendernode/mentalray/material:connection/mentalray/shadow:/connection/mentalray/photon:shader/surface";


-- David

cpan
12-03-2007, 11:04 AM
You can now set a maximum resolution for your Material Sample swatches. If your file texture size exceeds the specified resolution, a swatch will not be created until explicitly requested: in the Hypershade, right-click the swatch and select Refresh Swatch from the marking menu; or, in the Material Sample swatch in the Attribute Editor, click on the swatch to refresh the display. This reduces memory consumption and improves conversion time, increasing performance especially when dealing with many large textures. This is most useful for initial load of scenes with many large file textures. Once a swatch is created, it will always be displayed.

Select the maximum resolution from the drop-down list. You can also select the Custom option and enter the resolution that you like. File textures of a resolution above this value are not displayed in the Material Sample swatch in the Attribute Editor or in the Hypershade. The default is 2Kx2K.

you can find this switch in the Display Preferences window:)

Jan Svalland
12-03-2007, 11:46 AM
djx: Thanx! I'll try this :)

calinp: I have tried this, but it doesn't seem to work well with the mentalray shaders.

ovendelon
12-05-2007, 08:18 AM
You can try dragging 'custom' swatch from the renderview window, it may override the swatch generation

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