Jump to content

Randomise Light Hue Colour [SOLVED]


Recommended Posts

How can I randomise the hue of a light colour?

So far I have tried using the Motion FX Noise, but the problem here is the RGB values go above 1, making the light too colour bright.

I tried another example where I coloured a sphere red, then used a Point VOP with a Colour Correct node, then Motion FX to randomise the hue of the initial set red colour.
This way works best, because it is truly randomising the red hue from it's initial set red colour and the rgb values do not go above 1.

My problem here is I don't know how to get those @Cd colour values onto the light itself. Can I type vex expressions into the RGB values of a light to grab the @Cd from another object?

HIP File attached of where I am at.

 

Random_Hue_Shift_Light_Colour.hip

Edited by GlennimusPrime
Link to comment
Share on other sites

image.png.58de1dd0119e9e914208db6f2d49d9d2.png

Is this what you meant?
I took the Cd values and placed it in the light color.

Because the color attribute is stored in points. And all the points have the same Cd info.
I used these expressions to send it to light:
point("../Random_Hue_Colour_Generator", 0, Cd, 0)
image.thumb.png.3f5d827b255d37e97c8cc141072bedea.png
I will break it down if you don't get what's happening.
point() < get value from a specific attribute and from a specific point.
1. is from which node it should receive the info
2. point number
3. attribute name
4. index, in this case, XYZ, 0 = X, 1 = Y, 2 = Z

This is the color stored in Random_Hue_Colour_Generator.                 This is the color value stored in Light.
image.png.6ca453bca2992c15c3dc68b9e536e30e.png                                  image.png.75aaf13b37df4df2f8a3438a96ec0966.png 
 

Edited by laurups
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...