Resultados 1 al 1 de 1

Yafray photon mapping

  1. #1
    Fecha de ingreso
    Apr 2002
    Mensajes
    26,550

    Yafaray photon mapping

    Yafray Photon Mapping
    Pitat450

    . Introduction. When i was trying todo get deper into Yafray i never really knew how exactly the settings affect the rendering. I decided todo create set of example render todo show the same scene rendered with diferent values for each settings. And because i did not se anything similar todo this concerning Yafray, y decided todo share it here. The Yafray user guide is great as a overall review but the description for each option is very brief and does not explain deper, so it leaves a por Yafray Rokie with testing anyway. I must not forget todo mention this great tutorial originally by Tom TNT, which is a great knowledge base for Understanding GI in general.

    The purpose of this guide is todo help speed up decisión making during setting up the Yafray in the workflow. For a descent rendering, obviously, one has todo know what each value represents. Because putting high values does not necessarily mean god result. And it always costs extra time. So for each of the value there is, ive produced several images todo show what diference it makes. Ive a los added the posible range of each of the values. For this study of GI, ive created very simple scene with openings on one side todo create situation with complicated play of light and shadowy áreas. I used crazy wide-angle Camera so you could se more. For the light i used one Sun Lamp with 1.4 strengtht and 20 samples. For the sake of simplicity i used Clay render without any materiales. I added some balls todo show how the light interacts with objects inside. In the first part of the guide i Will try todo compare diferent values of the settings in between them. In the second part i Will compare FG render with its corresponding shown Photon Map.

    If not stated otherwise this is the setting i was using for the render. The Final Gather and show map buttons are being switched on and of, depending on an image.



    Photon Map without Final Gather.

    So i would say that it is very important todo understand this well in order todo work properly with the Final Gather later. And now let`s start with the depth setting.
    depth (0 - 50).

    This setting controls the number of bounces of the Photons cast in your scene. The higher this number, the smaller contrast between the shadow and the bright áreas. It a los increases the overall brightness of the scene. Setting the right value here means finding the best compromise between contrasty/Dark and washed-out/bright scene.



    photons (0 - 100.000.000).

    This settings is used todo adjust the number of Photons todo cast. Higher numbers increase the overall quality of lighting (when used with FG it reducces artefactos in corners). I would think of this as a sort of resolution of used Photon Map. When you increse the value, the Photon Map is more dense, so u have more información passing todo FG and thus a higher quality, Photons settings comparison.



    dif, Radius (0 - 100).

    The tool tip of this button tells you that this is a Radius todo search for non-caustic Photons. Based on my tests i would daré say this is Simply size of the Photons. To be Even more Brave i say this sets the size of a Photon in world Blender units. If we were todo use sher Photonmap for illumination, we would ned less Photons todo completely cover our surface if they were of bigger size. But such a Photon Map would be less precise, since it would have less píxeles todo carry the información os color and brightness.

    There is another very important thing todo know about this setting. But first i have todo explain something about Yafray`s Photonmap behavior in general: i found out during the tests that a surface gets illuminated by surrounding shining objects (by accepting Photons that previously hit this surface) if the angle between surface`s normal and the direction of light is greater than 90 Degrees. I suppose this is a bug because it should observe not the angle between the light and the surface`s normal but the angle between two surface`s normals. If you look at the example image below, the test-plane i put in my scene is illuminated by the Photons that previosuly hit the bright outer wall (yellow line).



    This obviously should not happen in realistic simulation because the normals point the opposite directions.

    And now bak todo the dif, Radius. If the Photon size is bigger than the thickness of you wall, it Will show in your rendering. For this scene it was using dif, Radius > 1, where the wall was 2 units thick. But because this value is Radius of the Photon (not diameter) you have todo double it. Imho this option should be called Photon size not todo lead todo further confutions. But i may be missing something important here. In the comparison images bellow you se this as a bright line along the corners.



    search (0 - 10.0000).

    For better illustration of this lever i decreased number of Photons in the scene todo 5.000 and increased the size of Photons todo 5. Because this setting would affect your rendering locally, y used zomed cutouts for examples.

    This setting is used for blurring the Photonmap todo become less dotted/spotchy. I would not know the exact algorithm, but it works with overlapping of the Photons. Based on the set value it searches for the spots where this Many Photons overlap and these spots become the bright spots. Then, it is faded out towards the Edge of the Photon. The distance between this Edge and the center of the Photon is based on the dif, Radius value. Places that overlap less Photons are darker, Even less darker and so on until there is only one Photon with no overlapping. This Photon has the brighness that is set by the emitter`s power setting in our case the Sun.

    Now you understand that the global illumination based on Photonmap is derived on the density of these spotches/photons (not by the energy or anything else). Points with more Photons overlapped become brighter places in the rendering and points where there are only few or no Photons become the dark spots on the other hand. I Recon this is the essential knowledge for Understanding and then mástering the Photon-based rendering.



    And now lets go todo the fun part.
    Final Gather: working with Photonmap.

    This part of the guide covers rendering with Final Gather algorithm, that is with the Final Gather option in the Photon settings section turned on. It shows how diferent settings can result in diferent quality of the FG render. In the first column there are render with the show map option on. This lets you quickly preview the Photon distribution before during the process of setting the GI.



    depth.

    As i said before this value is predominantly about contrast. If you go up for high values, the render tend todo be without contrast/depth, because as the Photons bounce again and again around it covers the whole scene with uniform light. If you set Low values on the other hand the rendering would be todo dark. So be aware of this especially when using simple scenes like this with not as much contrast on its own.

    Another thing todo mention is that when you have áreas that are covered with photomap texture and áreas with no Photons next todo it, it produces some nasty artefactos in the corners (when this happens on a flat plane its ok) that is especially noticable in the second image example set (depth=5).

    The last set of example images has the best feeling of a Daylight-filled rom. But it is better todo compensate for this by increasing the number of Photons in the scene rather then depth for stated reasons. Well let`s se if we can have the best of the both worlds, a high contrast and a Daylight-feeling at the same time by setting one of the options described below.




    Photons
    .

    I would say this setting is about the quality. Although the FG does a pretty god job with such Little información it gets in the first set of example (photons = 10.000), the next images show that some increase of rendering time (for casting extra Photons) is just worth it. In the last example (photons = 2.000.000) is some quite god lighting already.

    To sum it up: todo have more Photons cast means todo have less noise and less artifact After FG pass.


    FG Photons settings comparison.

    dif. Radius.

    It is proved here just well that gappy photonmaps would produce artefactos in the corners. To fix this, you could either increase number of Photons immensely or just increase this value. So these two setting can work together and should be always changed at the same time. The noise on the Walls can be reduced by increasing FG samples.


    FG dif Radius settings comparison.

    search.

    In the first set (search = 2) the Photons are mixed together so Little that some áreas are almost as bright as the ones lit by direct Sunlight. That is because every two Photons create the brightest spots and there is no space for other tints. If you set this todo five (search = 5 then five Photons ned todo overlap todo create as bright spot as in the previous example. If there are not as Many overlapping Photons in the scene as the number you set, the highest number found is being used. That is why from certain value of search up the rendering would not change.


    FG search settings comparison.

    Final Gather: quality settings.

    The base settings (apart from the very setting being tested) was like this:

    FG quality settings.


    FG samples
    .

    Number of samples for Final Gathering process. The more samples are taken, the less noice there Will be in your rendering. I don`t thing more words are neded here, the images below speak for themselves:

    FG samples settings comparison.

    fg bounces.

    Tol tip: allows Gather rays todo extend todo Path of this length. Wouldn`t really know whats going on here. It reminds me of that newspaper game for children, find ten diferences. But this is no begginer`s level, huh? Might edit later as well though, it sems todo me that with the more bounces, the image is a bit lighten and softer. I tried a color test as well todo se if the diference would be more apparent. It was, but not by todo much. I could not test higher values here then 12 because Blender was crashing there.


    FG bounces settings comparison.

    use background.

    And finally let me not forget about this Little button in the top right corner of the settings panel. It is the use background button. When it is on, it includes the background that you set in the background settings part of the panel into the computation of GI. It can make your render much more realistic. You can control the amount by power lever down in the background settings. I alos increased that approx, todo 3 so that the diference is more clear. The effect you can se in the window`s área when it gets a blueish tint.

    Note: when saving in (*.png) file format, there is an option in the render window todo turn the alfa of. That can show handy when you want todo play later with the background, because it Will not be saved and you Will get holes instead.


    Alfa box.


    FG background on/of diference.

    I Skipped the caustic mix button on purpose, because it would require diferent scene for investigation. I might add this later. I Will continúe with other rendering methods later as well like Path tracing etc.

    And this is how the final result could look like if i try todo consider the things above. Note that it is very dark, and it would probably be Even darker in real. But then what is wrong with my space? Maybe the Windows should be bigger, huh? So with setting values Low todo speed up the rendering it can work as a design tool for architects, which is gr8.


    Final result.

    The Sun now produces sharper shadows nearer todo the Windows and softer when its deper in the space. I think you would have todo use área lights todo faq this effect in the Yafray. (correct me if i am wrong there) that is very Neat. One thing that kept me wondering was why the wall in the bak was darker than the one on the left. Because i thought that a wall perpendicular todo the light source must have just more light than the one in 180 angle todo it. Well, thats where the photonmaps got quite handy. In image with the depth = 1 all the bien up here, there is quite god answer, the Windows of the rom are so Slow and the angle of Sun is such that Photons fall very Dep in the space. Then bounced Photons would fall bak on the wall with the Windows with more probability than on the bak wall so it would become more illuminated. Quite interesting.

    And that would be it for now, y hope this would show handy todo someone and if not, never mind, y learned a lot. Alos note that this can live todo some changes in the near future if i find things todo be changed.

    Chers and kep blending pitat450

    Www.Yafray.org/documentation/tutoriales/Photonmap.
    .

    -- IMÁGENES ADJUNTAS --
















    Miniaturas adjuntas Miniaturas adjuntas Clic en la imagen para ver su versión completa. 

Nombre: settings_general.jpg 
Visitas: 2166 
Tamaño: 54.5 KB 
ID: 115027   Clic en la imagen para ver su versión completa. 

Nombre: depth_1.jpg 
Visitas: 2109 
Tamaño: 80.7 KB 
ID: 115028   Clic en la imagen para ver su versión completa. 

Nombre: photons.jpg 
Visitas: 2618 
Tamaño: 102.3 KB 
ID: 115029   Clic en la imagen para ver su versión completa. 

Nombre: Illumination.jpg 
Visitas: 1909 
Tamaño: 21.1 KB 
ID: 115030  

    Clic en la imagen para ver su versión completa. 

Nombre: dif_radius.jpg 
Visitas: 2308 
Tamaño: 82.1 KB 
ID: 115031   Clic en la imagen para ver su versión completa. 

Nombre: search.jpg 
Visitas: 2442 
Tamaño: 67.0 KB 
ID: 115032   Clic en la imagen para ver su versión completa. 

Nombre: settings.jpg 
Visitas: 1871 
Tamaño: 4.7 KB 
ID: 115033   Clic en la imagen para ver su versión completa. 

Nombre: fg_depth.jpg 
Visitas: 2004 
Tamaño: 99.7 KB 
ID: 115034  

    Clic en la imagen para ver su versión completa. 

Nombre: fg_photons.jpg 
Visitas: 2033 
Tamaño: 87.0 KB 
ID: 115035   Clic en la imagen para ver su versión completa. 

Nombre: fg_dif_radius.jpg 
Visitas: 1917 
Tamaño: 109.7 KB 
ID: 115036   Clic en la imagen para ver su versión completa. 

Nombre: fg_search.jpg 
Visitas: 2049 
Tamaño: 133.1 KB 
ID: 115037   Clic en la imagen para ver su versión completa. 

Nombre: fg_settings.jpg 
Visitas: 1939 
Tamaño: 19.5 KB 
ID: 115038  

    Clic en la imagen para ver su versión completa. 

Nombre: fg_SAMPLES.jpg 
Visitas: 2104 
Tamaño: 59.8 KB 
ID: 115039   Clic en la imagen para ver su versión completa. 

Nombre: fg_bounces.jpg 
Visitas: 2068 
Tamaño: 35.7 KB 
ID: 115040   Clic en la imagen para ver su versión completa. 

Nombre: FG_background.jpg 
Visitas: 1835 
Tamaño: 18.2 KB 
ID: 115041   Clic en la imagen para ver su versión completa. 

Nombre: final3.jpg 
Visitas: 2092 
Tamaño: 84.1 KB 
ID: 115042  

    Imágenes adjuntadas Imágenes adjuntadas  
    |Agradecer cuando alguien te ayuda es de ser agradecido|

Temas similares

  1. Blender Guía rápida para photon mapping en YafRay
    Por Freemind en el foro Blender
    Respuestas: 0
    : 20-05-2012, 09:59
  2. Respuestas: 5
    : 07-05-2012, 04:21
  3. Yafray Interior photon mapping YafRay defectuoso
    Por bul en el foro Render, Iluminación y Cámaras
    Respuestas: 1
    : 22-02-2012, 17:48
  4. Respuestas: 5
    : 20-05-2010, 23:47
  5. Photon mapping
    Por pablusero en el foro Programas de Diseño 3D y CAD
    Respuestas: 0
    : 29-11-2006, 22:24