Blender Git Commit Log

Git Commits -> Revision 48155c2

Revision 48155c2 by Lukas Stockner (master)
May 26, 2018, 23:24 (GMT)
Cycles: Add Support for IES files as textures for light strength

This patch adds support for IES files, a file format that is commonly used to store the directional intensity distribution of light sources.
The new IES node is supposed to be plugged into the Strength input of the Emission node of the lamp.

Since people generating IES files do not really seem to care about the standard, the parser is flexible enough to accept all test files I have tried.
Some common weirdnesses are distributing values over multiple lines that should go into one line, using commas instead of spaces as delimiters and adding various useless stuff at the end of the file.

The user interface of the node is similar to the script node, the user can either select an internal Text or load a file.
Internally, IES files are handled similar to Image textures: They are stored in slots by the LightManager and each unique IES is assigned to one slot.

The local coordinate system of the lamp is used, so that the direction of the light can be changed. For UI reasons, it's usually best to add an area light,
rotate it and then change its type, since especially the point light does not immediately show its local coordinate system in the viewport.

Reviewers: #cycles, dingto, sergey, brecht

Reviewed By: #cycles, dingto, brecht

Subscribers: OgDEV, crazyrobinhood, secundar, cardboard, pisuke, intrah, swerner, micah_denn, harvester, gottfried, disnel, campbellbarton, duarteframos, Lapineige, brecht, juicyfruit, dingto, marek, rickyblender, bliblubli, lockal, sergey

Differential Revision: https://developer.blender.org/D1543

Commit Details:

Full Hash: 48155c210a3fd65f6fc2b5be3357b47a8af3711a
Parent Commit: ef50285
Lines Changed: +1119, -20

5 Added Paths:

/intern/cycles/kernel/shaders/node_ies_light.osl (+42, -0) (View)
/intern/cycles/kernel/svm/svm_ies.h (+110, -0) (View)
/intern/cycles/util/util_ies.cpp (+392, -0) (View)
/intern/cycles/util/util_ies.h (+61, -0) (View)
/source/blender/nodes/shader/nodes/node_shader_ies_light.c (+61, -0) (View)

34 Modified Paths:

/intern/cycles/blender/blender_shader.cpp (+13, -0) (Diff)
/intern/cycles/blender/blender_util.h (+15, -0) (Diff)
/intern/cycles/graph/node_type.h (+7, -6) (Diff)
/intern/cycles/kernel/CMakeLists.txt (+1, -0) (Diff)
/intern/cycles/kernel/kernel_light.h (+2, -2) (Diff)
/intern/cycles/kernel/kernel_textures.h (+3, -0) (Diff)
/intern/cycles/kernel/osl/osl_services.cpp (+7, -1) (Diff)
/intern/cycles/kernel/shaders/CMakeLists.txt (+1, -0) (Diff)
/intern/cycles/kernel/svm/svm.h (+4, -0) (Diff)
/intern/cycles/kernel/svm/svm_types.h (+1, -0) (Diff)
/intern/cycles/render/graph.cpp (+6, -0) (Diff)
/intern/cycles/render/light.cpp (+122, -0) (Diff)
/intern/cycles/render/light.h (+17, -0) (Diff)
/intern/cycles/render/nodes.cpp (+96, -4) (Diff)
/intern/cycles/render/nodes.h (+22, -0) (Diff)
/intern/cycles/render/osl.cpp (+7, -2) (Diff)
/intern/cycles/render/osl.h (+4, -1) (Diff)
/intern/cycles/render/scene.cpp (+2, -1) (Diff)
/intern/cycles/render/scene.h (+3, -0) (Diff)
/intern/cycles/render/svm.cpp (+5, -2) (Diff)
/intern/cycles/render/svm.h (+4, -1) (Diff)
/intern/cycles/util/CMakeLists.txt (+2, -0) (Diff)
/intern/cycles/util/util_math.h (+11, -0) (Diff)
/release/scripts/startup/nodeitems_builtins.py (+1, -0) (Diff)
/source/blender/blenkernel/BKE_node.h (+1, -0) (Diff)
/source/blender/blenkernel/intern/bpath.c (+8, -0) (Diff)
/source/blender/blenkernel/intern/node.c (+1, -0) (Diff)
/source/blender/editors/space_node/drawnode.c (+18, -0) (Diff)
/source/blender/makesdna/DNA_node_types.h (+9, -0) (Diff)
/source/blender/makesrna/intern/rna_nodetree.c (+56, -0) (Diff)
/source/blender/makesrna/RNA_access.h (+1, -0) (Diff)
/source/blender/nodes/CMakeLists.txt (+1, -0) (Diff)
/source/blender/nodes/NOD_shader.h (+1, -0) (Diff)
/source/blender/nodes/NOD_static_types.h (+1, -0) (Diff)
By: Miika HämäläinenLast update: Nov-07-2014 14:18MiikaHweb | 2003-2021