Announcement

Collapse
No announcement yet.

Quick script help - Current max color picker as VrayColor

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

  • Quick script help - Current max color picker as VrayColor

    Hey there,

    Because of all the LWF, I'm trying to code a script that is taking the current diffuse color (if it hasn't anything piped in the map slot) and creating a VrayColor Map that has that color duped in.
    My goal is obviously avoiding all the color representation that the default color picker of max is doing and that can be avoid by a VrayColor map.

    Something similar to the autogamma script that has been released in 2008 (http://www.scriptspot.com/3ds-max/plugins/autogamma) but that's using the colorcorrect plugin (which I hate) and which is doing it on everything when I would like to do it only on the color picker of max.

    In a first step, I would use it only for the diffuse, but I would be keen to know if you guys are using it for reflect/refraction/fog color as well...

    Anyone that has maxscript capabilities could help me out here?

    Thanks

    Stan
    3LP Team

  • #2
    I don't think there is any need to correct the reflect/refract slots.

    If you want add a VRayColor to all the empty diffuse slots you could do something like:
    Code:
    (
    	for mat in getClassInstances vrayMtl where mat.texmap_diffuse == undefined do mat.texmap_diffuse = vrayColor color:(mat.diffuse)
    )
    Dan Brew

    Comment


    • #3
      Awesome!
      Thanks mate, it's working perfectly

      So no CC for reflect/refract/fog, interesting... would this mean that those colors are not affected by the conversion in max, or not worth doing it?
      Because when you create maps as bitmaps, those are interpreted aren't them?
      So a 128 gray as a color in reflect would not act the same with bitmap then with the color picker in max, isn't it?

      Anyway, thanks a lot for the maxscript line

      Stan
      3LP Team

      Comment


      • #4
        Originally posted by 3LP View Post
        So a 128 gray as a color in reflect would not act the same with bitmap then with the color picker in max, isn't it?Stan
        As I understand it, if you put bitmap with 128 grey into the reflect slot and override the gamma to 1.0 in the load dialogue then that is the same as entering a value of 0.5.
        Dan Brew

        Comment

        Working...
        X