From 8367c329cf803d90cbd0e2bfedc1aeca59c67903 Mon Sep 17 00:00:00 2001 From: Alfredo de Greef Date: Fri, 10 Jun 2005 00:12:42 +0000 Subject: 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. --- source/blender/yafray/intern/export_File.cpp | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'source/blender/yafray/intern/export_File.cpp') 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 << "\n"; ostr << "\t\n"; ostr << "\t\tr << "\" g=\"" << matr->g << "\" b=\"" << matr->b << "\" />\n"; - ostr << "\t\tspecr << "\" 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\n"; ostr << "\t\tmirr << "\" g=\"" << matr->mirg << "\" b=\"" << matr->mirb << "\" />\n"; ostr << "\t\tref << "\" />\n"; ostr << "\t\tspec << "\" />\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\n"; ostr << "\ttex->imaflag & TEX_INTERPOL) ? "bilinear" : "none") << "\" />\n"; + if (wtex->tex->filtersize>1.f) ostr << "\t\n"; ostr << "\n\n"; xmlfile << ostr.str(); return true; -- cgit v1.2.3