blurred reflections with Yafray

How to get such reflections in Yafray?
http://img465.imageshack.us/img465/5555/1daygi78zj.th.jpg

Nothing new, byt thought that may be usefull.

When a scene is ready, textured with correctly set lights, it has to be exported to Yafray’s *.xml by activating XML button in rendering preferences and setting target directory for exported file in User Preferences/File Paths/YFexport.
It’s need to modifying exported file – Ybtest.xml - by hand.
First find a material which will receive blury reflection – remember, that Blender adds “MA” prefix to each exported material’s name, so if shader was called for example “floor” then Ybtest.xml would contain something like this:
<shader type=“blendershader” name=“MAfloor” >
<attributes>
blablabla
blablabla
blablabla
</attributes>
</shader>

now two shaders have to be pasted above/under our MAfloor shader:
<shader type=“conetrace” name=“env2” reflect=“on” angle=“5” samples=“30”>
<attributes>
<color r=“0.300000” g=“0.30000” b=“0.300000” />
</attributes>
</shader>
<shader type=“fresnel” name=“fresnel” reflected=“env2” min_refle=“0.8”>
<attributes>
</attributes>
</shader>

First of them creates raytraced blur which is controlled by two parameters: angle (amount of blur) and samples (quality – the higher, the better and slower unfortunately). Second shader integrates conetrace with fresnel, which have to be called at the end of our Maflor shader:

<shader type=“blendershader” name=“MAfloor” >
<attributes>
blablabla
blablabla
blablabla
<environment value=“fresnel”/>
</attributes>
</shader>

Save it and feed Yafray with it…

translation of Scyguo’s tip found at
http://www.blender.pl/component/option,com_simpleboard/Itemid,/func,view/catid,22/id,13531/#13531

Very cool tip, jendrzych! Thanks for posting it! (You probably could have put it in Blender General, tho… I think…) Thanks, too, to Scyguo for sharing it!

this is so delicious… i only wish there was an easier way to get the xml. right now yafray is automatically launched right after it is createtd, performing an essentially unwanted render. i wanted to make myself a little python script that grabs the xml and automatically adds the code to whatever materials you select, but that unwanted render really gets in the way. :-?

if anyone can suggest a means of preventing yafray’s launch following the xml generation it’d be mighty sweet… especially for automating this process for animations!

thanks,
steve

You have to be quick on smaller scenes, but if you can catch it: in the console window, hit ctrl-c after it says “parsing ok” and before it begins rendering - catch it while everything is loading. This stops the render before it begins and after the xml file has been generated.

A couple of notes: this is in 2.37a on a Windows platform. Don’t know about others.

Also, you must have the XML button selected (on). (I think…)

Also, be sure to set the desired path of the “YBTest.xml” output file in the “File Paths -> YFexport” field in the settings header (drag down top header border to view the Blender options there.)

Hope this helps…

Adding onto what mzungu says. If you want to minimize the risk of missing your “window of opportunity” of stopping the render between xml generation and output, you can do this.

If (for example) you wanted to render at 800x600 - instead set your render size to 8 pixels by 6 pixels. In general, this will render very quickly.

Go to the generated XML file and find the reference for the render camera, something like

<camera name=“MAINCAM” type=“perspective” resx=“8” resy=“6”

Change the resx and resy values to 800 and 600, respectively. Then run yafray from the command line using this modified XML.

Would it be possible to create a small “moderator” executable that would trick blender into thinking it was yafray?

This way blender would export the XML and activate the “moderator” program (thinking it is yafray).
The moderator modify the XML accordingly, and pass it off to yafray.
Then output from yafray would be passed back through the moderator, and into blender.

This way Blender would never know that it hadn’t connected directly to yafray.

Just my 2¢
Bluey

Greetings,

although this thread is a tad old, I wanted to ask if you, jendrzych, could share that .blend file with me. I’m trying to get interiour lightning to work and all I get are poorly lit rooms, far from your very bright result. :slight_smile:

http://rapidshare.de/files/35491667/LIGHTEST.zip.html

skypa, its been a while since I’ve tinkered with Yafray, but from what I remember you had to crank the intensity of the lights way up (like 30x) to get them properly balanced. (Thot that was changed in more recent iterations, but maybe not?)

As to the blurry reflections, have you looked into Indigo? Does these very nicely. I understand radium also has some nice features in this regard - but its very early alpha right now. Still, may be of interest.

cheers…

Here’s the same scene rendered with Kerkythea GI lit by sun and phisically correct sky.
http://img222.imageshack.us/img222/8813/testkerkythea37nt.th.jpg

Thanks for the blend, jendrzych. I checked out the Kerkythea (you have a little typo there) and they have a really impressive gallery. Reminds me a little of the Maxwell stuff.