VRMats Gamma issues

I have 246 vrmats coming from Rhino. The Rhino renders look fine, but using the same vrmats in max results in washed out images, almost like double gamma.

Max is setup with LWF. I’m not sure how Rhino was setup with the source files. Is there a quick way to fix it in max without having to modify each vrmat?

what 3ds max version are you using?

if you are using 3ds max 2014, try this script:

fileInGamma = 2.2
fileOutGamma = 2.2

Thanks for trying to help, but I’m not having Max gamma issues
The gamma issues are with vrmat files. If you ever used them, you’d understand what I mean

oppssss…sorry i cannot help you :frowning:

may i know what is vrmat? can i use it with vray 2.40.04?

It’s a special type of material that you stick into a VRayVRmatMtl (instead of a VRayMtl). It basically lets you transfer the exact material between, max, sketchup, rhino etc.
I havent used 2.4 in a while, but yes, I think you can use it. However, I don’t think you want to. Trust me on this one, you want to avoid those as much as you can. You can set the gamma individually for each one. You can’t see the maps in the viewport. Also it uses a special ChaosGroup material editor, not the max one. There’s just too many limitations to use it fully. It’s a nice idea, just need some work. For now however, if you can avoid it, do so.

There’s some free low res samples here: http://www.chaosgroup.com/en/2/downloads.html?s=v-ray-materials

I work with a lot of Rhino and Sketchup files, so it’s a bit more complex to avoid using the vrmats.

Can you show us or send us a Rhino/3dsMax scene with the same .vrmat so we could investigate what’s going on?

Inside each vrmat, the gamma ranges between 1 and 1.6. Seems it was used to set the lightness/darkness in Rhino, or so it appears. I’ve remade most of the materials painstakingly over a couple of days. If we had a converter for this, I would have been done in 5 minutes

Do the materials in Rhino have the same gamma values?
If the gamma values are the same in both platforms Rhino and 3DSmax I see no issues here.

I don’t touch the gamma of the vrmat. However, in Max, if I simply open the VRay mat editor and just click the “Preview” button without changing anything, then the preview changes form the nice looking mat, to a washed out version of it. Bit hectic at the moment, but will send some sample later in the week when I get time

So the VRmat looks fine in Rhino but the same one appears washed out in Max?

Yes, basically

You think it could be because Rhino itself is set to Gamma 1.0, but max itself is set to gamma 2.2?

Not sure if Rhino/Max gamma is taken into account by the V-Ray Material Editor.
Might be better to pack rhino/max scene along .vrmat file for investigation.

OK here’s a sample of one of the vrmats.

When I select the vrmat to load, it gives me a preview of how it should look. Which is correct. A nice black glossy ball.

In the max material editor however, I can see that it is not looking correct. More of a washed out black

If I then open the Editor, I get the correct nice black ball when I loaded the vrmat, but as soon as I click on “Preview” the ball changes to the same washed out black as in the max matrial editor

This is a simple example. When there’s textures invovled, most of the vrmats have been setup wtih maps that in the editor is set to either “linear” gamma 1, or “gamma corrected” gaam1 1, instead of the expected “sRGB”
If I set the textures to sRGB, then the file is correct max, but because the VRay editor is LIMITED, there’s no quick way to do this across 246 vrmat files.

In the example above, the black gloss, I don’t see a gamma setting so not sure how to set it.

It would be great if Lele or some other clever person can write either a maxscript, or batch script, to edit the gamma across miltiple vrmats (which is just an XML). Or if we can get an update to the VRayVRmatMtl with an override gamma setting

Here’s the VRMAT

Oh and my Max gamma is setup correctly for LWF. fileingamma and fileoutgamma is 2.2. All normal VRayMtl and textures show correctly, just all VRMATS are off




Black Gloss.zip (25.1 KB)

A solution to this would be great. A new project that just came in has 363 vrmats and it’s not practical to edit each one of these manually.

My text editor can replace text over files in a folder, Great!

Any plans to make the vrmats visible in viewport?

Its true that the material is off in the V-Ray Material Editor in 3dsMax but the rendering doesn’t look very different from Rhino.
Here is what I have in 3dsMax: and the same material rendered in Rhino:
The result from the preview and the final rendering in 3dsMax is actually much closer compared to Rhino preview and final render.


What happens when Rhino itself is setup for gamma 1.0 instead of 2.2?