Page 1 of 2 12 LastLast
Results 1 to 20 of 23
  1. #1
    Member GodOfBigThings's Avatar
    Join Date
    Nov 2008
    Location
    Indiyeaah!!
    Posts
    1,085

    Change color based on incident energy in Cycles.

    It's possible in BI to change the color of an object based on the amount of light falling on it.

    Is it possible in Cycles right now?

    Any hacks/complicated node setups/OSL scripts to achieve it?
    " I've said it before and I'll say it again: Democracy simply doesn't work " -Kent Brockman



  2. #2
    You can't do it directly in Cycles, but you can do it in the compositor (assign it a simple one color material, use the ObjectID/MaterialID to separate it out in the compositor, change its color and overlay it again).



  3. #3
    Member GodOfBigThings's Avatar
    Join Date
    Nov 2008
    Location
    Indiyeaah!!
    Posts
    1,085
    Let me make my question more specific here. The bottom image has a paint whose intensity falls off very rapidly with the angle (it is a lot darker where it's facing perpendicular to the light source).

    The top one if a lot brighter even when it's facing perpendicular to the light.

    I could probably get close to this effect by changing the roughness values, but it gives very little control, and you cannot change the hue, which happens with a lot of car paints.



    And another one where the saturation changes with the angle.

    Last edited by GodOfBigThings; 30-Dec-12 at 02:42.
    " I've said it before and I'll say it again: Democracy simply doesn't work " -Kent Brockman



  4. #4
    You need access to "throughput" and "L" integrator core variables that not exposed to node system. Node tree provide only some "weight" that will be multiplied (or added in case of last direct edge to light source) to final color.
    Last edited by storm_st; 29-Dec-12 at 04:54.



  5. #5
    you seems to be describing the effect of spec or normals behavior not energy function olf color

    i' think iv seen one function of light color but very complicated to do

    are you really interested in one like that
    i can try to locate where i havee the ref for this effect!

    happy cycles
    Last edited by RickyBlender; 29-Dec-12 at 09:07.
    Nice 3D models = 25 % K.I.S.S + 25 % common sense + 25 % Inspiration + 25 % Knowledge
    Win 10 64 bits / Thanks and a Happy 2.79 with Cycles



  6. #6
    Member GodOfBigThings's Avatar
    Join Date
    Nov 2008
    Location
    Indiyeaah!!
    Posts
    1,085
    Originally Posted by RickyBlender View Post
    are you really interested in one like that
    i can try to locate where i avhe teh ref for this effect!
    Yes, would be appreciated.
    " I've said it before and I'll say it again: Democracy simply doesn't work " -Kent Brockman



  7. #7
    here is a script to play with color of light source
    but find it very difficult to understand

    ies light
    http://www.blendernation.com/2012/11/02/ies-like-lights-in-cycles-architectural-lighting/#more-30812
    http://blenderartists.org/forum/show...tural-Lighting



    http://blenderartists.org/forum/show...-Architectural

    hope it gives you some ideas but not certain it you can use this info

    i'm trying to locate another one playing with colors
    but cannot remember for now which one!

    you could also go to ain thead on cycles and ask question there

    http://blenderartists.org/forum/showthread.php?216113-Brecht-s-easter-egg-surprise-Modernizing-shading-and-rendering/page501

    there the dev might answer you on this color spectrum thing!
    and when and if it might be implemented in cycles



    happy cycles
    Last edited by RickyBlender; 29-Dec-12 at 09:21.
    Nice 3D models = 25 % K.I.S.S + 25 % common sense + 25 % Inspiration + 25 % Knowledge
    Win 10 64 bits / Thanks and a Happy 2.79 with Cycles



  8. #8
    there is an OSL shaders that can play with reflected colors RBG

    soap bubles / irrisdescence
    http://blenderthings.blogspot.nl/201...r-blender.html

    and this one


    rainbow OSL
    http://blenderartists.org/forum/show...Blender-Cycles



    are these good one ?

    thanks
    Nice 3D models = 25 % K.I.S.S + 25 % common sense + 25 % Inspiration + 25 % Knowledge
    Win 10 64 bits / Thanks and a Happy 2.79 with Cycles



  9. #9
    Member GodOfBigThings's Avatar
    Join Date
    Nov 2008
    Location
    Indiyeaah!!
    Posts
    1,085
    Thanks for the help. RickyBlender. None of these are exactly what I'm looking for.

    I'll ask in the cycles thread.
    " I've said it before and I'll say it again: Democracy simply doesn't work " -Kent Brockman



  10. #10
    I think using color ramp to control the diffuse color should do the trick. I can get similar effect using 'facing' input as factor to the color ramp. You can also use the angle trick that RickyBlender mentioned (the ies like lighting thread) to control the color ramp as well.

    Edit: The falloff doesnt seem to depend on the light angle though even using the angle trick from the other thread.... It only depends on viewing angle... I guess i posted too early
    Last edited by anurag.k; 30-Dec-12 at 03:07.



  11. #11
    Member GodOfBigThings's Avatar
    Join Date
    Nov 2008
    Location
    Indiyeaah!!
    Posts
    1,085
    I've managed to find a solution, but it only works if there's jus one light. The position vector of the shading point, the lamp, and the surface normal are all you need to find the angle the normal makes with incident light, which you can use as input for color ramp.

    But this does doesn't work with any other light setup. Looking for a solution to that now.
    " I've said it before and I'll say it again: Democracy simply doesn't work " -Kent Brockman



  12. #12
    I guess the only way possible would be to get amount of light at the point like you suggested (or some OSL magic). How are you using the position of light, are you entering the values manually?



  13. #13
    Member GodOfBigThings's Avatar
    Join Date
    Nov 2008
    Location
    Indiyeaah!!
    Posts
    1,085
    Yeah, for now I'm entering the lamp's position vector manually. But the wiki says it's possible using the attribute node to get an object's position. Even if that doesn't work, I guess it would be possible using OSL.

    Here's a quick little example.

    The question about an actual solution still stays.
    Attached Images Attached Images  
    Attached Files Attached Files
    " I've said it before and I'll say it again: Democracy simply doesn't work " -Kent Brockman



  14. #14
    i got an example for showing the normals on faces
    but less coorfull then yours!


    salutations
    Nice 3D models = 25 % K.I.S.S + 25 % common sense + 25 % Inspiration + 25 % Knowledge
    Win 10 64 bits / Thanks and a Happy 2.79 with Cycles



  15. #15
    you can make such rainbow paints by mixing different roughness glossy shaders together (that's also how that sort of paint is made, different colored flakes with different reflective properties). It's not necessary to trick a physicly based materialsystem where you don't actualy need to

    Click image for larger version. 

Name:	rainbowpaint.png 
Views:	111 
Size:	424.7 KB 
ID:	209366



  16. #16
    The phong_ramp closure is available in Blender OSL, it is just not exposed as a node.

    I put a bare bones implementation together, if you're interested you can find it here:

    http://blenderthings.blogspot.com/20...hader-for.html

    I realize that angle dependent diffuse reflection is problably not the whole story for a car paint shader but it is a start.

    Name:  phong_ramp1.png
Views: 705
Size:  263.3 KB
    cheers
    Check out my new add-on, IDMapper, or the other ones on my Blender Market store.
    There you will also find my e-books 'Creating Add-ons for Blender', 'Open Shading Language for Blender' and the new 'Blender Add-on Cookbook'.
    Main blog: http://blenderthings.blogspot.com



  17. #17
    another way woudl be to use another renderer
    like Yafaray or Luxrender!
    which have more features then cycles!
    i remember that luxrender have an option for lamps energy and spectrum!

    salutations
    Nice 3D models = 25 % K.I.S.S + 25 % common sense + 25 % Inspiration + 25 % Knowledge
    Win 10 64 bits / Thanks and a Happy 2.79 with Cycles



  18. #18
    Member Ace Dragon's Avatar
    Join Date
    Feb 2006
    Location
    Wichita Kansas (USA)
    Posts
    28,541
    Originally Posted by RickyBlender View Post
    i remember that luxrender have an option for lamps energy and spectrum!
    As far as I know, the lamp energy and spectrum textures in Luxrender are textures to use with emissive materials to control the color and the behavior of the light, they do not actually allow a material to change color or do something similar based on the amount of light falling on it.

    In fact, I don't think Luxrender has any sort of option comparable to the blend weight node or the 'incoming' parameter available through the geometry node. Luxrender instead has a carpaint shader which more or less has a fresnal effect built into it, but I don't think it's quite as customizable as what you can do in Cycles with the individual shading components.
    Sweet Dragon dreams, lovely Dragon kisses, gorgeous Dragon hugs. How sweet would life be to romp with Dragons, teasing you with their fire and you being in their games, perhaps they can even turn you into one as well.
    Adventures in Cycles; My official sketchbook



  19. #19
    Member GodOfBigThings's Avatar
    Join Date
    Nov 2008
    Location
    Indiyeaah!!
    Posts
    1,085
    Originally Posted by varkenvarken View Post
    The phong_ramp closure is available in Blender OSL, it is just not exposed as a node.
    Thanks for the post on your blog post. I didn't know about it.

    While you can't control glossy with that approach, it's definitely going to be useful for the diffuse component of the car paint.
    " I've said it before and I'll say it again: Democracy simply doesn't work " -Kent Brockman



  20. #20
    as i said you can get a normal color for each face nodes set up !

    there is no direct way to get light intensity
    but may be an indirect way!
    is not there a way to get from the normal RGB values the intensity from each face
    then you could re adjust the color function of that intensity may be ?


    salutationsl
    Nice 3D models = 25 % K.I.S.S + 25 % common sense + 25 % Inspiration + 25 % Knowledge
    Win 10 64 bits / Thanks and a Happy 2.79 with Cycles



Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •