Announcement

Collapse
No announcement yet.

Colors and LWF

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Colors and LWF

    I'm helping a friend out with a file of his. He isn't using LWF, but I want to make his scene look more professional by adding it. Nearly all of his materials are colored only by the material color slot. When I apply LWF all his deep rich colors get blown out.

    Is there a script that I can run that will convert his colors back to what they are without LWF? I tried un-checking "Apply to color selectors" but that didn't do it.

    Thanks.
    - Geoff

  • #2
    This will apply an inverse 2.2 gamma to all diffuse colours in all vray materials in the scene that don't have a texture in the diffuse slot.
    Code:
    (
    	fn applyGamma col gam =
    	(
    		local r = 255*(col.r/255)^gam
    		local g = 255*(col.g/255)^gam
    		local b = 255*(col.b/255)^gam
    		color r g b
    	)
    	for m in getClassInstances vrayMtl where m.texmap_diffuse == undefined do m.diffuse = applyGamma m.diffuse 2.2
    )
    It's a bit indiscriminate so make sure you save a copy of the scene first.
    Dan Brew

    Comment


    • #3
      Thank you! It works beautifully!
      - Geoff

      Comment


      • #4
        Also new versions of Vray have a "color gamma" slot in the VrayColor now. Not as easy to batch setup but an option for future people who poke in.

        Comment


        • #5
          Originally posted by Deflaminis View Post
          Also new versions of Vray have a "color gamma" slot in the VrayColor now. Not as easy to batch setup but an option for future people who poke in.
          SO how would I translate say an RGB value of a customer for his company logo color with that VRayColor Map? Put it in there just as that said RGB then what?
          Software:
          Windows 7 Ultimate x64 SP1
          3ds Max 2016 SP4
          V-Ray Adv 3.60.04


          Hardware:
          Intel Core i7-4930K @ 3.40 GHz
          NVIDIA GeForce GTX 780 (4096MB RAM)
          64GB RAM


          DxDiag

          Comment


          • #6
            If you're converting to linear workflow then I'd say put a value like 2.2 in there for color gamma. My understanding is that isn't 100% sRGB accurate but it's as close as we can get.

            Comment


            • #7
              in truth you will never get the exact colours right for the logos as the environment and lighting affect it quite a bit just like in reality. I usually take a sample in photoshop and take the RGB values in to max and tweek them till they are correct visually.
              Cheers,
              -dave
              â–  ASUS ROG STRIX X399-E - 1950X â–  ASUS ROG STRIX X399-E - 2990WX â–  ASUS PRIME X399 - 2990WX â–  GIGABYTE AORUS X399 - 2990WX â–  ASUS Maximus Extreme XI with i9-9900k â– 

              Comment


              • #8
                Nah, of course lighting will influence it, I'm talking about the pure correct diffuse color.
                Software:
                Windows 7 Ultimate x64 SP1
                3ds Max 2016 SP4
                V-Ray Adv 3.60.04


                Hardware:
                Intel Core i7-4930K @ 3.40 GHz
                NVIDIA GeForce GTX 780 (4096MB RAM)
                64GB RAM


                DxDiag

                Comment


                • #9
                  Originally posted by YoyoBoy View Post
                  I'm helping a friend out with a file of his. He isn't using LWF, but I want to make his scene look more professional by adding it. Nearly all of his materials are colored only by the material color slot. When I apply LWF all his deep rich colors get blown out.

                  Is there a script that I can run that will convert his colors back to what they are without LWF? I tried un-checking "Apply to color selectors" but that didn't do it.

                  Thanks.
                  http://www.avizstudio.com/tools/acolormanager/ this is a scripted way of converting to LWF. I use it sometimes to convert old evermotion scenes in a fast way.
                  A.

                  ---------------------
                  www.digitaltwins.be

                  Comment


                  • #10
                    It's a difficult one but if I'm trying to convert a colour reference given as an RGB I try to consider the white value of the scene as well as gamma. For example if I ask a paint company for an RGB for 'Pure Brilliant White' they will inevitably give 255,255,255. However in my scenes I generally use 180,180,180 for white paint. So I would treat other colours the same way, multiplying by 180/255 before trying to correct the gamma.
                    Dan Brew

                    Comment


                    • #11
                      Another script http://www.scriptspot.com/3ds-max/sc...massgammacolor
                      that lets you go back and forward from 1.0 and 2.2 gamma color space. I use it to convert old scene to gamma 2.2 Works great!
                      Link seams to be dead but a google seach will do
                      Arjan Jacques
                      makeit3D

                      Comment


                      • #12
                        Originally posted by Arjan Jacques View Post
                        Another script http://www.scriptspot.com/3ds-max/sc...massgammacolor
                        that lets you go back and forward from 1.0 and 2.2 gamma color space. I use it to convert old scene to gamma 2.2 Works great!
                        Link seams to be dead but a google seach will do
                        You can find it here...
                        http://andklv.narod.ru/maxscripts/ak-maxscripts.html
                        paolo vaja
                        www.3d-arch.it

                        Comment

                        Working...
                        X