9 #include "COLLADASWColor.h"
10 #include "COLLADASWLight.h"
17 template<
class Functor>
31 : COLLADASW::LibraryLights(
sw), export_settings(export_settings)
48 std::string la_name(
id_name(la));
50 float d, constatt, linatt, quadatt;
62 quadatt = 1.0f / (d * d);
67 COLLADASW::DirectionalLight cla(mSW, la_id, la_name);
68 cla.setColor(
col,
false,
"color");
69 cla.setConstantAttenuation(constatt);
70 exportBlenderProfile(cla, la);
76 COLLADASW::SpotLight cla(mSW, la_id, la_name);
77 cla.setColor(
col,
false,
"color");
79 cla.setFallOffExponent(la->
spotblend,
false,
"fall_off_exponent");
80 cla.setConstantAttenuation(constatt);
81 cla.setLinearAttenuation(linatt);
82 cla.setQuadraticAttenuation(quadatt);
83 exportBlenderProfile(cla, la);
88 COLLADASW::PointLight cla(mSW, la_id, la_name);
89 cla.setColor(
col,
false,
"color");
90 cla.setConstantAttenuation(constatt);
91 cla.setLinearAttenuation(linatt);
92 cla.setQuadraticAttenuation(quadatt);
93 exportBlenderProfile(cla, la);
99 COLLADASW::PointLight cla(mSW, la_id, la_name);
100 cla.setColor(
col,
false,
"color");
101 cla.setConstantAttenuation(constatt);
102 cla.setLinearAttenuation(linatt);
103 cla.setQuadraticAttenuation(quadatt);
104 exportBlenderProfile(cla, la);
111 cla.addExtraTechniqueParameter(
"blender",
"type", la->
type);
112 cla.addExtraTechniqueParameter(
"blender",
"flag", la->
flag);
113 cla.addExtraTechniqueParameter(
"blender",
"mode", la->
mode);
114 cla.addExtraTechniqueParameter(
"blender",
"gamma", la->
k,
"blender_gamma");
115 cla.addExtraTechniqueParameter(
"blender",
"red", la->
r);
116 cla.addExtraTechniqueParameter(
"blender",
"green", la->
g);
117 cla.addExtraTechniqueParameter(
"blender",
"blue", la->
b);
118 cla.addExtraTechniqueParameter(
"blender",
"shadow_r", la->
shdwr,
"blender_shadow_r");
119 cla.addExtraTechniqueParameter(
"blender",
"shadow_g", la->
shdwg,
"blender_shadow_g");
120 cla.addExtraTechniqueParameter(
"blender",
"shadow_b", la->
shdwb,
"blender_shadow_b");
121 cla.addExtraTechniqueParameter(
"blender",
"energy", la->
energy,
"blender_energy");
122 cla.addExtraTechniqueParameter(
"blender",
"dist", la->
dist,
"blender_dist");
123 cla.addExtraTechniqueParameter(
"blender",
"spotsize",
RAD2DEGF(la->
spotsize));
124 cla.addExtraTechniqueParameter(
"blender",
"spotblend", la->
spotblend);
125 cla.addExtraTechniqueParameter(
"blender",
"att1", la->
att1);
126 cla.addExtraTechniqueParameter(
"blender",
"att2", la->
att2);
128 cla.addExtraTechniqueParameter(
"blender",
"falloff_type", la->
falloff_type);
129 cla.addExtraTechniqueParameter(
"blender",
"clipsta", la->
clipsta);
130 cla.addExtraTechniqueParameter(
"blender",
"clipend", la->
clipend);
131 cla.addExtraTechniqueParameter(
"blender",
"bias", la->
bias);
132 cla.addExtraTechniqueParameter(
"blender",
"soft", la->
soft);
133 cla.addExtraTechniqueParameter(
"blender",
"bufsize", la->
bufsize);
134 cla.addExtraTechniqueParameter(
"blender",
"samp", la->
samp);
135 cla.addExtraTechniqueParameter(
"blender",
"buffers", la->
buffers);
136 cla.addExtraTechniqueParameter(
"blender",
"area_shape", la->
area_shape);
137 cla.addExtraTechniqueParameter(
"blender",
"area_size", la->
area_size);
138 cla.addExtraTechniqueParameter(
"blender",
"area_sizey", la->
area_sizey);
139 cla.addExtraTechniqueParameter(
"blender",
"area_sizez", la->
area_sizez);
#define LA_FALLOFF_INVLINEAR
void forEachLightObjectInExportSet(Scene *sce, Functor &f, LinkNode *export_set)
in reality light always falls off quadratically Particle Retrieve the data of the particle that spawned the object for example to give variation to multiple instances of an object Point Retrieve information about points in a point cloud Retrieve the edges of an object as it appears to Cycles topology will always appear triangulated Convert a blackbody temperature to an RGB value Normal Generate a perturbed normal from an RGB normal map image Typically used for faking highly detailed surfaces Generate an OSL shader from a file or text data block Image Sample an image file as a texture Sky Generate a procedural sky texture Noise Generate fractal Perlin noise Wave Generate procedural bands or rings with noise Voronoi Generate Worley noise based on the distance to random points Typically used to generate textures such as or biological cells Brick Generate a procedural texture producing bricks Texture Retrieve multiple types of texture coordinates nTypically used as inputs for texture nodes Vector Convert a or normal between and object coordinate space Combine Create a color from its and value channels Color Retrieve a color or the default fallback if none is specified Separate Split a vector into its and Z components Generates normals with round corners and may slow down renders Vector Displace the surface along an arbitrary direction White Return a random value or color based on an input seed Float Map an input float to a curve and outputs a float value Separate Color
void exportLights(Scene *sce)
LightsExporter(COLLADASW::StreamWriter *sw, BCExportSettings &export_settings)
void operator()(Object *ob)
std::string get_light_id(Object *ob)
std::string id_name(void *id)
ccl_gpu_kernel_postfix ccl_global float int int int sw