Forum Coordinators: RedPhantom
Poser - OFFICIAL F.A.Q (Last Updated: 2024 Nov 03 10:43 am)
Attached Link: http://www.utm.edu/%7Emharvey/MathFunctions/Powers.html
don't know if this can help, but it's worth a look!Thanks for answering my first question, stemardue. What I was trying to do was entering the value manually which, for some reason, doesn't work. Your shader works all right. (and dividing by 0 doesn't freeze my Poser5. Which version are you on ?) Now, for my second question, is there a way to extract the Hue Saturation Luminosity values from a given color ? I read all the site you pointed to above, but it seems math functions cannot give the answer I seek...
is there a way to extract the Hue Saturation Luminosity values from a given color ? I don't know any in bare poser other than reading em in the color palette, but maybe there is some variable in Python to get those values from a given texture/picture. In photoshop you can see them in the 'info' palette just mousing over a pic, but i don't know if this can help you. Oh, btw i'm using P5 SR4 in win98 (maybe OS is the key of my freezing problems)
If you look at your colour in Photoshop or a similar app you can find out what the HSL values should be. I don't know of a way to do it in the material room. What exactly are you trying to do? If you just want one colour, you'd be better off with the simple colour node. You can set the colour using HSL in that if you want. The advantage of using the user defined node is that you can use mathematical operations as inputs for the RGB/HSL values to make the colour vary across 3D space. With RGB you can use the component node to extract the individual R, G and B values and pass them to other nodes, but there doesn't seem to be an HSL equivalent. Stewer might know one.
View Ajax's Gallery - View
Ajax's Freestuff - View
Ajax's Store -
Send Ajax a message
Attached Link: http://www.renderosity.com/messages.ez?ForumID=12355&Form.ShowMessage=1906697
What I'm trying to achieve is to set several colors at once. I want to set the color in a single "simple color" node, then extract its HSL values, modify the S and L value so that I'll have lighter or darker tones of the same color to plug into a color ramp. The final goal is explained in the thread below : http://www.renderosity.com/messages.ez?ForumID=12355&Form.ShowMessage=1906697 I have tried to multiply the base color by different shades of grey, but it gives of a greyish look to the color, whereas I want it just darker or lighter.
View Ajax's Gallery - View
Ajax's Freestuff - View
Ajax's Store -
Send Ajax a message
Yeah, makes sense that it wouldn't work too well for bright colours. Hmmm. Maybe you could use the brightness of the colour to set the value of the power you raise it to. The diffuse node creates normal diffuse shading, just like what you get when you set the diffuse colour of the root node. The difference is that you can use the diffuse node as input for other nodes and process it. Since I've set the diffuse colour to white, the output can be though of as a number between zero and one (it's actually a grey RGB colour between black and white). I multiply it by 4, round it and divide by 4 to get four shades that will show on the model in the appropriate places according to the lights in the scene. It's a similar approach to using a specular node to tell you where the shades should be on the model.
View Ajax's Gallery - View
Ajax's Freestuff - View
Ajax's Store -
Send Ajax a message
In fact, what I'm trying to do is reducing the luminosity of the brightest colors. So I'm experimenting with combining your shader above with mine : multiplying by a small amount of grey the powered color. The brighter the color, the higher the amount of grey. But, in turn, this doesn't work too wel for darker colors. I'm not giving up...
Attached Link: http://www.easyrgb.com/math.php?MATH=M18
Dunno if this'll help or not, but I googled it: (BTW - "to google" is now an officially recognised word:-]). Got this from the attached link..- I leave it to you wizards to work out the nodes required:-).... RGB to HLS: var_R = ( R / 255 ) //RGB values = From 0 to 255 var_G = ( G / 255 ) var_B = ( B / 255 ) var_Min = min( var_R, var_G, var_B ) //Min. value of RGB var_Max = max( var_R, var_G, var_B ) //Max. value of RGB del_Max = var_Max - var_Min //Delta RGB value L = ( var_Max + var_Min ) / 2 if ( del_Max == 0 ) //This is a gray, no chroma... { H = 0 //HSL results = From 0 to 1 S = 0 } else //Chromatic data... { if ( L < 0.5 ) S = del_Max / ( var_Max + var_Min ) else S = del_Max / ( 2 - var_Max - var_Min ) del_R = ( ( ( var_Max - var_R ) / 6 ) + ( del_Max / 2 ) ) / del_Max del_G = ( ( ( var_Max - var_G ) / 6 ) + ( del_Max / 2 ) ) / del_Max del_B = ( ( ( var_Max - var_B ) / 6 ) + ( del_Max / 2 ) ) / del_Max if ( var_R == var_Max ) H = del_B - del_G else if ( var_G == var_Max ) H = ( 1 / 3 ) + del_R - del_B else if ( var_B == var_Max ) H = ( 2 / 3 ) + del_G - del_R if ( H < 0 ) ; H += 1 if ( H > 1 ) ; H -= 1 } Cheers, DiolmaUrrggghhh. I could certainly do that with nodes, but it's a lot of nodes. When you get that many, the material room slows down to an irritating extent.
View Ajax's Gallery - View
Ajax's Freestuff - View
Ajax's Store -
Send Ajax a message
This site uses cookies to deliver the best experience. Our own cookies make user accounts and other features possible. Third-party cookies are used to display relevant ads and to analyze how Renderosity is used. By using our site, you acknowledge that you have read and understood our Terms of Service, including our Cookie Policy and our Privacy Policy.
Thanks for having a look. Here are my problems : 1- the "user_define" node outputs a color from numeric value. I use it in HSL mode (I expect it is Hue Saturation Luminosity). What is the correspondance between Poser usual color box (where all these 3 values are noted from 1 to 240) and this node (where these value appear to be noted from 0 to 1) ? I tried the linear method (1/240), but to no avail. 2- is there a way to do the reverse of the "user_define" node ? I mean : entering a color and getting its values for Hue Saturation Luminosity (which would make my first question pointless for the use I'm planning). Thanks in advance for your answers or hints.