GI Studies


During the last few days I’ve spent some time on exploring Yafray and the possibilities of GI. I tried myself on indoor and outdoor lighting, here are the results:

Outdoor - I tried to achieve a moody, afternoon / evening feeling…

Light setup: I used a sun light for the yellowish light and placed a big area light as Photon emitter (with Global Photons being turned on) in the same place. I have also placed 4 more Area lights pointing inside the temple to support the GI and make the dark shadows a little bit lighter and softer. However, I’d like to know if there’s actually a way to produce soft Shadows with Yafray and to get rid of these strange looking sharp shadows? It seems like only the standard omnidirectional light seems to be able to produce soft shadows but I couldn’t find a way to fake sunlight with such a light. Any ideas on solving that problem?


Light setup: Two spot lights were used, one yellowish and one blueish, like the sky (maybe a little bit too blue…). Two area lights were placed into the windows, pointing inside the room.

Well, the concepts of both images were taken from a tutorial for Mental Ray and Maya. I thought that the results might be reproducable with Blender and tested it (I will do another one soon). I had to experiment a lot as I haven’t really worked with GI (except for lighting with HDRIs) yet. Anyway, please let me know what could be improved and how I might do that. It is also possible that I’ll work a little more on them as I’m not completely satisfied but I don’t know yet.
At least I could see that GI is really a very powerful method to get good looking lighting.
Either way, hope you can help me here.


it seems like me and you are having the same questions on the same day. yesterday I was trying to accomplish the same thing. I’m also trying to do the outdoor scene with a soft shadow. any how I downloaded this PDF file…I did not even get to read it but I think it might have the answer (judging by the images I saw)


If you want the best natural light lighting, HDRI is really the way to go. Here’s an HDRI test I did with Blender and Yafray a while ago.
It’s lit only with an HDRI image in the environment, no additional lights.
It’s mostly just messing around with the GI intensity/exposure.

This is another lighting test i did with Blender/Yafray. This one is lit with no HDRI, just a single lamp and alot of tweaking on the yafray part.


@carnage: Hey, nice to see that I’m not the only one having to experiment with these things…
I actually found that pdf file yesterday already, while I was searching for some solutions myself. It contains some nice tips and hints but it doesn’t seem to help us when it comes down to soft shadows. But I’d still recommend you to take a look at it, especially since it isn’t that long.
BTW, do you mind showing me the results of your tests?

@toastie: Yeah, I know, HDRI’s are awesome and really easy to use. I have done several projects with them already but their lighting isn’t always useful. Sometimes other methods of GI would achieve better results.
But your images look good, especially the second one which really catches the lighting by daylight. Did you use a regular omni lamp or a spotlight?


darkMyke: I used a single Sun Lamp for it.

I found it wasn’t powerful enough to cause good lighting at first, but after playing with YafRay’s exposure I came to a good result.


You’re probably talking about:
(it’s always good to link to your reference)

I made a quick test render of a cube and just an arealight:

and the blend:

the problem arises when you enable photons in the GI settings, you need to apply some tricks if you want to use photons. This is probably the thread for you:


Ok, I’ve been experimenting myself aswell, but I’m starting to understand what your problem was… The contrast is way better (higher) when photons are turned on in the GI settings… I had to set the GI power tp 5.5 to get the light intensity to match mental ray’s!

I posted a question in the YafRay forum now, I hope someone over there can help us finish this tutorial :slight_smile:

Anyway, for everyone interested to join this GI studygroup, I converted the two tutorial scenes mentioned in this thread to Blender, see the attached zip. The second layer contains the outside scene (all lights removed, except for the sphere… I could have used the world for the GI aswell, but I didn’t do that to match the tutorial).
I didn’t do anything yet to the first layer (which contains the ‘indoor’ scene. I put cone placeholders in place of the lights, because I could not get these to export.

Have fun!


Hey, sorry for not replying yesterday but CGTalk was down all the time I tried to get on.

Anyway, you’re right about the tuts, next time I’ll link to them. If I give credit I shall give proper credit to the author! I actually modelled the scenes, I didn’t know that there’s an importer for the .mb scenes. Bleh, at least it wasn’t too difficult to model that stuff :wink:

I’m also quite curious what response you’ll get at the Yafray forums, I really hope they know what to do, too!
But you’ve seen it yourself, Photons help a lot to improve the GI quality. And even though it requires some tricks to achieve soft shadows I think they’re necessary to get the best and most realistic result with GI.

And if someone’s going to try the indoor lighting scene, don’t forget to place two Arealights into the windows, too. They will emit Photons and improve the overall GI. If you’re only using two spotlights your scene won’t be light evenly and that looks kinda strange, at least it did when I tested it.


I did not use a .mb importer (I did a search before this post, but I could not find one either), because I have access to Maya at uni and it was easier for me just to export this from Maya (to OBJ) and import it in Blender…

about the light model differences: I find it very annoying aswell, that YafRay appears to have very bright spots near the lamp and then suddenly the light fades out really quickly, resulting in unnatural looking light shifts… It only works much better when you put the lamp further away, but that’s kind of a workaround


Still no replies at the Yafray forum =/
I guess we will have to experiment ourselves. I’ll do that but at the moment I’m quite busy with two other projects.

@Inktvlek: BTW, while we’re at it…
There you can find another tutorial that I wanted to try but the setup seems to be rather tricky as it isn’t that easy to place all the planes correctly. So, if you ever get the chance to export the scene with maya, too, that would be very cool. Just do it when you’re bored and you’ve got nothing else to do but if you’re busy forget about it, it is really not important :wink:


This is tricky! I can’t seem to get the reflected look that the Mental Ray image had. Anyway, here are my attemps. The first one took 1:20 to render, the second 1:47, and the third took 12:35 (BTW that’s minutes and seconds)


Agan, the same set up. This pic shows that the bounce light isn’t the same as MR. It only took 1:40 to render.


Yeah, you’re right. Your third image does look better than mine but it’s still not there…
May I ask what kind of setup you’ve used for the second and the third image? Also, it seems to me that your “sun” is a little bit too strong. The directly lit areas are looking very bright.


I used an area light for the shadow (I selected the “No Diffuse” and “No Specularity” so that It would only cast a shadow). Then, I place a lamp (Is that what you guys call an omni lamp?) at the same place. For the lamp I put a little GloInt (.010) and glow type to 1. No photons on the GI panel (I still don’t understand them yet). Also, I used the World sky rather than a mesh sky dome (It renders faster).

Having said this, I found out that the area light IS casting light (It’s not simply casting a shadow) that is why the sun is so bright.

I hope someone can figure out how to do this properly. If it’s possible.


You did not enable Photons in the GI panel (you should try it, seeing as this is a GI and Photons study thread :wink: )? Then it is clear that the Area light is emitting Light. Only if you turn Photons on it is used as Photon emitter rather than as a light emitter. And you’re right, even if you turn on “No Diffuse” and “No specular” you will still have light coming from the lamp. It doesn’t seem to be possible to get a Light producing only shadows.

And yes, an Omni lamp is the standardish lamp which emits light in all directions.



i have another problem:

as you can see there are dark refelctions on my ring and the ring
is refelcted dark on the ball. that should not happen. i have ray depth and other above

also in this image is the same issue:

and here i have the same shadow problem:

it seems to me thatyafray has not the same bounce ray result that mental ray for example or other free renderes.with such a strong light on top the shadow should not be that dark.

any help to fix that?



Hi Cekuhnen, I’ve downloaded your scene from the Elysiun thread and I’ve made some changes:

  • I’ve changed the wall material
  • I’ve centered the light on the ceiling.
  • I’ve put emit object above the area light, and it is slightly bigger.
  • I’ve changed arealight samples to 16
  • I’ve changed emit power and Gi Power, both 2.5.

You can download the scene here.
That’s the result, shadows areas are less dark than before:

Sorry, lack of time didn’t let me participate in this interesting thread. Lets keep it going.


wow that is a difference. des the higher sample rate for the area light affect the shadow?
i thought that when i use full gi the area light wil be a photon helper only!?

anyway the shadow looks much more what i am used to see when i do studio shots.
thank you a lot.

did you notice the black reflection issue? do you know how to solve that?




do you mind sharing the blend file with us? i tried to rebuild this scene with out any luck.
i also get dark/black shadows instead of colored shadows from bouncing light.

it is pretty anyoung how ofen important questions are ignored at the yafray forum.
i guess the coders do not have the time any more. to bad.



does the higher sample rate for the area light affect the shadow?

  In my opinion yes:)

I thought that when i use full gi the area light wil be a photon helper only!?

    In my opinion, in that example the emit material is actually the photon helper:)
   did you notice the black reflection issue? do you know how to solve that?
  We would need the blend files to make conclusions.:wise:

it is pretty anyoung how ofen important questions are ignored at the yafray forum.
i guess the coders do not have the time any more. to bad.

I guess the life of YafRay main developer, Jandro, has changed a lot. Before was an computer sciences student, now he is a full-time hard worker. He is in first stages of his professional career, so he must be doing a lot of extra hours. Sad indeed for us, but life is coming along for him.:thumbsup: