diff options
author | Alejandro Conty Estevez <conty@yafray.org> | 2004-01-13 19:51:35 +0300 |
---|---|---|
committer | Alejandro Conty Estevez <conty@yafray.org> | 2004-01-13 19:51:35 +0300 |
commit | 47126550801198a6a41c50c7fccc1b81a1220110 (patch) | |
tree | 61e58e6d87794b7019455c61da1eaa1bcec548b9 /source/blender/yafray | |
parent | 4c718d49cdd21ca93f846206f19f36d882237e71 (diff) |
Global photons export for yafray. Square arealights, spot and point can work
as emitters. Needs latest yafray code, still not in cvs.
Diffstat (limited to 'source/blender/yafray')
-rwxr-xr-x | source/blender/yafray/intern/export_File.cpp | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/source/blender/yafray/intern/export_File.cpp b/source/blender/yafray/intern/export_File.cpp index 45df2af9579..13a7d6ff6c9 100755 --- a/source/blender/yafray/intern/export_File.cpp +++ b/source/blender/yafray/intern/export_File.cpp @@ -959,7 +959,7 @@ void yafrayFileRender_t::writeAreaLamp(LampRen* lamp,int num) if(lamp->area_shape != LA_AREA_SQUARE) return; float *a=lamp->area[0],*b=lamp->area[1],*c=lamp->area[2],*d=lamp->area[3]; ostr.str(""); - ostr << "<light type=\"arealight\" name=\"LAMP" << num+1 << "\" dummy=\"off\" " <<endl; + ostr << "<light type=\"arealight\" name=\"LAMP" << num+1 << "\" dummy=\"on\" " <<endl; ostr << "\tpower=\"" << lamp->energy <<"\">" <<endl; ostr << "\t<color r=\""<<lamp->r<<"\" g=\""<<lamp->g<<"\" b=\""<<lamp->b<<"\"/>"<<endl; ostr << "\t<a x=\""<<a[0]<<"\" y=\""<<a[1]<<"\" z=\""<<a[2]<<"\"/>"<<endl; @@ -1109,9 +1109,17 @@ void yafrayFileRender_t::writeHemilight() void yafrayFileRender_t::writePathlight() { ostr.str(""); + if(R.r.GIphotons) + { + ostr << "<light type=\"globalphotonlight\" name=\"gpm\" photons=\""<<R.r.GIphotoncount<<"\""<<endl; + ostr << "\tradius=\"" <<R.r.GIphotonradius << "\" depth=\""<< ((R.r.GIdepth>2) ? (R.r.GIdepth-1) : 1) + << "\" search=\""<< R.r.GImixphotons<<"\" >"<<endl; + ostr << "</light>"<<endl; + } ostr << "<light type=\"pathlight\" name=\"path_LT\" power=\"" << R.r.GIpower << "\" "; - ostr << " depth=\"" << R.r.GIdepth << "\" caus_depth=\"" << R.r.GIcausdepth <<"\"\n"; - if (R.r.GIcache) + ostr << " depth=\"" <<((R.r.GIphotons) ? 1 : R.r.GIdepth)<< "\" caus_depth=\"" << R.r.GIcausdepth <<"\"\n"; + if(R.r.GIdirect && R.r.GIphotons) ostr << "direct=\"on\"" << endl; + if (R.r.GIcache && ! (R.r.GIdirect && R.r.GIphotons)) { switch (R.r.GIquality) { |