Page 1 of 5 123 ... LastLast
Results 1 to 20 of 83
  1. #1

    IES-Like Lights in Cycles / Architectural Lighting

    Hi everyone

    Recently i started playing around with angle-dependent lights to imitage IES Lighting Profiles with Cycles. This trick works with Mesh-Lighting (Emission Shader), as well as Area Lights. I've found the Area Lights to behave better than Emission-Planes, mainly because you can independantly adjust the Size and Strength without influencing each other.


    Click image for larger version. 

Name:	ies6.png 
Views:	6523 
Size:	385.7 KB 
ID:	192702 Click image for larger version. 

Name:	ies7.png 
Views:	7691 
Size:	630.5 KB 
ID:	192704

    Demo File

    http://www.pasteall.org/blend/16001

    Change Lamp Size to vary "fuzzyness" (doesn't influence overall brightness, unlike emission-planes).
    Play around with the ColorRamp to achieve different effects.

    How it works

    I get the angle between the normal and the incoming ray into the light to determine the light characteristics for this angle: vector-dotproduct: a*b=|a|*|b|*cos(phi). both vectors are normalized, so |a| and |b| are both 1, we get cos(phi)=a*b

    Then this drives a Colorramp to determine the Color/Strength depending on "the angle". For simplicity i don't use the angle - arccos(a*b) - but just a*b, because it's in the right range [0;1] and i don't need a linear scale.

    The additional Light Falloff Node helps reducing the overly bright spots near the lamp, so it's not "physicly correct" but can help alot reducing noise/fireflies.

    what next

    To use real .ies files, someone would simply have to write an converter to write the data into an image file, which could then replace the ColorRamp-Node. This could be a very nice feature for people doing architectural renders. making some image files as a library for different lights.

    I hope this can be of use to some uf you
    Last edited by gexwing; 20-Aug-12 at 06:36.



  2. #2
    Member
    Join Date
    Mar 2012
    Location
    Italy
    Posts
    2,056
    Great stuff! Gotta try this.

    EDIT: tried this and it's super cool. I'm thinking how much stuff could be done with nodes that i'm not even considering/understanding because of my non-math background...sigh.

    I mean, dotproduct!? Incoming/normal!? Vector math!?

    Thanks.
    Last edited by marcoG_ita; 19-Aug-12 at 11:05.
    Testing: Vray for Blender // Old projects: #1 - Eames chaise lounge #2 - Chester Interior



  3. #3
    Member Spirou4D's Avatar
    Join Date
    Jul 2010
    Location
    Lille, France
    Posts
    1,090
    Hi Gexwing,
    Thanks a lot for your generosity.
    "to write an converter" could you explain your idea, please?
    Words are Images that loosed Light!
    Linux Mint 17.3 RosaBi-Quad Intel 2.66Ghz x64Bytes - Nvidia OpenGL GT 630 4Go-vram



  4. #4
    Great work. This is excellent. Thanks.



  5. #5
    @gexwing
    Thank you, very much.



  6. #6
    Member Caronte's Avatar
    Join Date
    Mar 2002
    Location
    Valencia-Spain-Europe
    Posts
    606
    Elegant method.
    Thanks for share
    Originally Posted by gexwing View Post
    To use real .ies files, someone would simply have to write a converter to write the data into an image...
    I think would be better if someone write a python script that convert ies values into color-ramp node directly
    Caronte.
    http://www.nicodigital.com
    \"Some day, all will be digital\"



  7. #7
    Originally Posted by Caronte View Post
    I think would be better if someone write a python script that convert ies values into color-ramp node directly
    The best thing would be a direct implementation for .ies files in lights.. and that's at the moment still a bit over my head. The script sounds a bit complicated to work with (working with the second example picture with only 18 values was already a bit of a pain) reading an image would be way user-friendlier, and i only proposed this for convenience so you could get some free .ies files and convert them easily, for custom stuff you can still use colorramp, or even other textures, like a wave texture there. Feeding the dotproduct into it's coordinates, works well too:

    Click image for larger version. 

Name:	ies5.png 
Views:	1251 
Size:	401.8 KB 
ID:	192730



  8. #8
    gexwing,

    this is awesome! Much better than our dabbling with geometry to fake ies lights about one year ago or so (time flies!), and so fast! Thank you very much for posting, very clever!

    I wonder if this approach has been possible all along but nobody got the idea until now.

    What a great solution!
    Competition is great and fun for things like sports and games. For more serious matters cooperation might be a better approach. Let's try it out for a change.



  9. #9
    Member Ace Dragon's Avatar
    Join Date
    Feb 2006
    Location
    Wichita Kansas (USA)
    Posts
    26,645
    Originally Posted by Sanne View Post
    gexwing,
    I wonder if this approach has been possible all along but nobody got the idea until now.
    I believe such a thing would've been possible since the ramp node was committed, but he seemed to be the first one to actually try using something like the geometry node to modulate the power of the light.

    Testing it myself, it looks to be a pretty impressive trick, while it is true that there's no specific sampling or speed advantages with this setup, it essentially means that we have discovered a way to turn a mesh emitter into a spotlight without using the actual lamp type. (which means you have all of the indirect and mesh-related goodies as well like caustics and an adjustable start radius.)
    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



  10. #10
    Member Jonathan L's Avatar
    Join Date
    Aug 2011
    Location
    Seattle, Washington
    Posts
    1,708
    This is a nice trick! Just wait till storm's volumetric patch and it will be 10x cooler.
    Check out my portfolio and tutorials.



  11. #11
    Member
    Join Date
    Dec 2009
    Location
    Sydney
    Posts
    155
    Very clever idea, I will be interested to play with this technique. Thanks for sharing!



  12. #12
    Member Ace Dragon's Avatar
    Join Date
    Feb 2006
    Location
    Wichita Kansas (USA)
    Posts
    26,645
    To everyone wanting to play with the technique.

    Not to hijack this thread, but noting that it might be time consuming to set this up over and over again if needed, I decided to take the liberty of converting this system to a group node format which can be found in this file.
    Cycles_spotTest.blend

    The group node contains various controls on the width of the light cone as well as a few more to control the visibility and falloff of a common IES type similar to what is already seen in this thread. I will note that for flexibility reasons, it may not be the best to include a pre-defined ramp node in the setup, but it's the best that can be done until a developer gives the user the ability to embed widgets like the ramp inside of the group node interface.
    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



  13. #13
    Member NinthJake's Avatar
    Join Date
    May 2009
    Location
    Sweden
    Posts
    2,239
    This is simply amazing, I wish I had the sort of math knowledge that you and Agus3D has. You can do incredible stuff with Cycles already if you only have the knowledge to really use it



  14. #14
    Member bashi's Avatar
    Join Date
    Oct 2010
    Location
    Bern, Switzerland
    Posts
    1,018
    Very Nice setup ;-)
    bwide.wordpress.com - Free NodePack, 70+ Cycles + Compositor
    Happy Destruction with: Bullet Constraints Tools



  15. #15
    Genius. Wouldn't even have occurred to me that you could do this.



  16. #16

    prism

    Immediately I knew I just had to try this. great Idea gexwing.Click image for larger version. 

Name:	prism1.png 
Views:	368 
Size:	440.5 KB 
ID:	192825



  17. #17
    Well, dont tell you not ask...
    21 min, it was so cool to play with ramp. Thanks for idea.
    I have no yet spot lamp support, tiny quad used as light source. (point light is not useful because it reset normal to always have dot()=1)
    Click image for larger version. 

Name:	Снимок экрана о&#1.png 
Views:	2779 
Size:	1.19 MB 
ID:	192871
    Only 2 scattering to speed up and make more contrast rays (bounce = 1)



  18. #18
    Member Caronte's Avatar
    Join Date
    Mar 2002
    Location
    Valencia-Spain-Europe
    Posts
    606
    Wonderfull!!
    P.D: Anyone have a build for Mac OS X?
    Caronte.
    http://www.nicodigital.com
    \"Some day, all will be digital\"



  19. #19
    storm, that looks beatifull
    can't wait until we have volumetrics in trunk, thanks for your work!



  20. #20
    Member Kemmler's Avatar
    Join Date
    Mar 2007
    Location
    USA
    Posts
    1,412
    pretty sweet. Real IES implementation should be the eventual goal, but this is really cool for the time being.



Page 1 of 5 123 ... 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
  •