Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlfredo de Greef <eeshlo@yahoo.com>2005-06-10 04:12:42 +0400
committerAlfredo de Greef <eeshlo@yahoo.com>2005-06-10 04:12:42 +0400
commit8367c329cf803d90cbd0e2bfedc1aeca59c67903 (patch)
tree3f07cf9a3b84ddc1220d79b7b95fbbf0877fdc2b /source/blender/yafray/intern/export_File.cpp
parentf5b011592a5a28cee6ddce6404697717b1eba05d (diff)
Some small modifications.
Absorption and Dispersion parameters now only visible when 'Ray Transp' enabled. WardIso specular amount scale to match Blender output. Updated halo spotlight 'samples' to use new yafray syntax. Quick addition for access to another yafray feature: When using HDR backgrounds for lighting ('SkyDome' of 'Full' GI methods), it is currently not always possible to get smooth lighting results. Especially HDR images with small lightsource can be very noisy, because currently yafray still relies on brute force random sampling. As a temporary simple solution (better options will be available in the 'next generation' yafray), yafray can do some processing on the image to smooth out all (or most) noise. Besides smooth lighting, this also has the advantage that AA will have less work to do, GI quality can be set to the lowest level and still get reasonably good results. Disadvantage however is that shadow definition is lost. To switch on this option, set the world image texture filter parameter to any value greater than 1.0 When 'filter' is 1.0 or less, normal hdr sampling is done as before. So, current fastest possible render settings for IBL: set texture image filter parameter of the background image to any value greater than 1.0, set GI to 'SkyDome' type, enable 'Cache', (possibly enable 'NoBump' when scene uses lots of bumpmapping), set 'Quality' menu to 'Use Blender AO settings', make sure AO is enabled in blender World buttons and set there the number of AO samples to 1. Should at least be good enough for previews.
Diffstat (limited to 'source/blender/yafray/intern/export_File.cpp')
-rwxr-xr-xsource/blender/yafray/intern/export_File.cpp14
1 files changed, 12 insertions, 2 deletions
diff --git a/source/blender/yafray/intern/export_File.cpp b/source/blender/yafray/intern/export_File.cpp
index d35903ba91d..43128b35933 100755
--- a/source/blender/yafray/intern/export_File.cpp
+++ b/source/blender/yafray/intern/export_File.cpp
@@ -667,7 +667,14 @@ void yafrayFileRender_t::writeShader(const string &shader_name, Material* matr,
ostr << "<shader type=\"blendershader\" name=\"" << shader_name << "\" >\n";
ostr << "\t<attributes>\n";
ostr << "\t\t<color r=\"" << matr->r << "\" g=\"" << matr->g << "\" b=\"" << matr->b << "\" />\n";
- ostr << "\t\t<specular_color r=\"" << matr->specr << "\" g=\"" << matr->specg << "\" b=\"" << matr->specb << "\" />\n";
+ float sr=matr->specr, sg=matr->specg, sb=matr->specb;
+ if (matr->spec_shader==MA_SPEC_WARDISO) {
+ // ........
+ sr /= M_PI;
+ sg /= M_PI;
+ sb /= M_PI;
+ }
+ ostr << "\t\t<specular_color r=\"" << sr << "\" g=\"" << sg << "\" b=\"" << sb << "\" />\n";
ostr << "\t\t<mirror_color r=\"" << matr->mirr << "\" g=\"" << matr->mirg << "\" b=\"" << matr->mirb << "\" />\n";
ostr << "\t\t<diffuse_reflect value=\"" << matr->ref << "\" />\n";
ostr << "\t\t<specular_amount value=\"" << matr->spec << "\" />\n";
@@ -1615,7 +1622,9 @@ void yafrayFileRender_t::writeLamps()
ostr << "\n\thalo=\"on\" " << "res=\"" << lamp->YF_bufsize << "\"\n";
int hsmp = ((12-lamp->shadhalostep)*16)/12;
hsmp = (hsmp+1)*16; // makes range (16, 272) for halostep(12, 0), good enough?
- ostr << "\tsamples=\"" << hsmp << "\" shadow_samples=\"" << (lamp->samp*lamp->samp) << "\"\n";
+ // halo 'samples' now 'stepsize'
+ // convert from old integer samples value to some reasonable stepsize
+ ostr << "\tstepsize=\"" << (1.0/sqrt((float)hsmp)) << "\" shadow_samples=\"" << (lamp->samp*lamp->samp) << "\"\n";
ostr << "\thalo_blur=\"0\" shadow_blur=\"" << (lamp->soft*0.01f) << "\"\n";
ostr << "\tfog_density=\"" << (lamp->haint*0.2f) << "\"";
}
@@ -1886,6 +1895,7 @@ bool yafrayFileRender_t::writeWorld()
ostr << " mapping=\"tube\" >\n";
ostr << "\t<filename value=\"" << wt_path << "\" />\n";
ostr << "\t<interpolate value=\"" << ((wtex->tex->imaflag & TEX_INTERPOL) ? "bilinear" : "none") << "\" />\n";
+ if (wtex->tex->filtersize>1.f) ostr << "\t<prefilter value=\"on\" />\n";
ostr << "</background>\n\n";
xmlfile << ostr.str();
return true;