Announcement

Collapse
No announcement yet.

random light temperature/color

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

  • random light temperature/color

    Anyone got any good ideas for how to randomly assign different colors/temps to vraylights? I tried with a vraymultisubtex and changing the object id of lights but no worky.

    Also tried geometry and vraylightmtl with vraymultisubtex but that didnt work either.

    any ideas gratefully received

    pg
    www.peterguthrie.net
    www.peterguthrie.net/blog/
    www.pg-skies.net/

  • #2
    almost got there:

    geometry with random matIDs and a multi sub object material with lots of different vraylightmtls inside. BUT direct illumination doesnt work when nested inside a multi sub-object. (is this a bug?)
    www.peterguthrie.net
    www.peterguthrie.net/blog/
    www.pg-skies.net/

    Comment


    • #3
      Maybe the best approach is to write a script that goes through all selected lights and assigns some random temperature values.

      Best regards,
      Vlado
      I only act like I know everything, Rogers.

      Comment


      • #4
        Originally posted by vlado View Post
        Maybe the best approach is to write a script that goes through all selected lights and assigns some random temperature values.

        Best regards,
        Vlado
        probably.... can any scripters help me out? I don't do maxscript!
        www.peterguthrie.net
        www.peterguthrie.net/blog/
        www.pg-skies.net/

        Comment


        • #5
          I thought you were going to say that

          Try the following:

          *) Go to MaxScript > New script and paste this:
          Code:
          fn randomLightColors minTemp maxTemp = (
          	local numSelected=$.count
          	for i=1 to numSelected do (
          		if (hasProperty $[i] "color_temperature") then (
          			$[i].color_mode=1
          			$[i].color_temperature=random minTemp maxTemp
          		)
          	)
          )
          Press Ctrl+E (or Tools > Evaluate All in the MaxScript editor)

          *) Select your lights, open the MaxScript listener and type
          Code:
          randomLightColors 3000 7000
          and press Enter. This will assign random temperatures between 3000 and 7000 to the selected lights (which must be copies, not instances obviously).

          Best regards,
          Vlado
          I only act like I know everything, Rogers.

          Comment


          • #6
            madness... so quick!

            thanks Vlado, you're a legend.
            www.peterguthrie.net
            www.peterguthrie.net/blog/
            www.pg-skies.net/

            Comment


            • #7
              Peter,
              A quick way of doing this is to use this script here-
              http://www.scriptspot.com/3ds-max/sc...-modifier-zorb

              Its a very handy script with an easy to use UI.

              It works with materials/lights/xrefs and everything else!
              I use it mainly for doing lots of randomised UVW stuff and random variations on light colours and intensities.
              Chris Jackson
              Shiftmedia
              www.shiftmedia.sydney

              Comment


              • #8
                Mod mod Zorb is indispensable in some situations. I use it mostly for removing modifiers across many unique objects. Good call, Chris.
                James Burrell www.objektiv-j.com
                Visit my Patreon patreon.com/JamesBurrell

                Comment


                • #9
                  zorb is probably the best thing about max (after vray)

                  Comment


                  • #10
                    That looks really useful, thanks Chris!
                    www.peterguthrie.net
                    www.peterguthrie.net/blog/
                    www.pg-skies.net/

                    Comment


                    • #11
                      tried zorb but get a maxscript error with vraylights.. maybe it needs to be updated for most recent vray?
                      www.peterguthrie.net
                      www.peterguthrie.net/blog/
                      www.pg-skies.net/

                      Comment


                      • #12
                        You can use similar ideas with these scripts to randomize all sorts of similar things. I did this to randomise lights turning on in a huge residential tower for a timelapse animation. Worked amazingly well - very convincing effect.
                        Alex York
                        Founder of Atelier York - Bespoke Architectural Visualisation
                        www.atelieryork.co.uk

                        Comment


                        • #13
                          Personally, the better solution would either be a (new) randomizable node to be plugged into the light as a map and let the lights behave with some published info these "random" maps can read.
                          This actually touches on an issue larger than this one, as there are too many non-compatible randomizers out there (I'm referring to stuff that randomizes parametrically and not scripts that modify stuff on a one time basis).

                          Randomization is such an essential part of what we do, that I would like to see Vray have it's own set of standardized "hooks" for other plugins to read from. ObjID, MatID don't always cut it, and they are a part of the max core.
                          Vray and plugins for vray do things with geometry etc. today that go far beyond what people envisioned when they came up with obj and mat IDs. and thus we end up with a ratsnest of 3rd party plugins that don't always work.

                          Is this something that exists in the VraySDK but is under utilized, or not at all?
                          Would it be an interesting addition?
                          Signing out,
                          Christian

                          Comment


                          • #14
                            We will probably implement the same approach as in Maya with the V-Ray user attributes, where you can put stuff as custom node properties and then read them through a special texture.

                            Best regards,
                            Vlado
                            I only act like I know everything, Rogers.

                            Comment

                            Working...
                            X