View topic - Portal lights

Portal lights

Post here general questions about usage of YafaRay and about the Blender Exporter UI

Portal lights

Post Wed Aug 05, 2015 3:21 am

Does anyone know what the proper xml code is for a portal light? It is hard to find any information about portal lights in general.

I am trying to add portal lights/light portals, whichever the proper name is, to the Wings3D YafaRay plugin. From what I have read, I get the impression that a "light portal" simply controls light from background lighting and does not produce its own light. Is this correct?

I am getting an error code. It is just the number "5".
Is there a listing of all the error codes and what they mean?

Edit: I added with_caustic, with_diffuse, and photon_only settings to the XML file and now I am getting a render but I am getting an error code of "884", whatever that means...

Thanks,
oort
oort
 
Posts: 221
Joined: Wed Jun 01, 2005 2:11 pm

Re: Portal lights

Post Thu Aug 06, 2015 2:06 am

Light Portals seem to be working in my Wings3D plugin. The error codes I was getting seem to be related to not having enough photons and/or the lighting method used.

Lighting with an HDRI and using a Light Portal seems to work with some background settings but not all. The lighting method used seems to also be a factor. Pathtracing seems to work all the time but Photon Mapping works with some settings and not others. SPPM may not work at all with Light Portals.

I do not see any difference when I change the power and samples settings.
I continue to do more testing...

In some tests, adding a Light Portal is cutting render times in half.

oort
oort
 
Posts: 221
Joined: Wed Jun 01, 2005 2:11 pm

Re: Portal lights

Post Thu Aug 06, 2015 6:05 pm

Hello, oort.

oort wrote:Does anyone know what the proper xml code is for a portal light? It is hard to find any information about portal lights in general.

I am trying to add portal lights/light portals, whichever the proper name is, to the Wings3D YafaRay plugin. From what I have read, I get the impression that a "light portal" simply controls light from background lighting and does not produce its own light. Is this correct?

I am getting an error code. It is just the number "5".
Is there a listing of all the error codes and what they mean?

Edit: I added with_caustic, with_diffuse, and photon_only settings to the XML file and now I am getting a render but I am getting an error code of "884", whatever that means...

Thanks,
oort



Have you seen this document? It explain several aspects about portal lights.

https://docs.google.com/document/d/1OZFmrUXsopMsuhHU_IVSo2FBh0XQx_hG7ryrrfBWgks/edit#

Where are you getting those errors? Could you send me an example xml file?

About how to create the portal lights in xml, perhaps we could do some tests creating them in Blender and exporting the scene in xml to check what has been added there...

Best regards!
User avatar
David Bluecame
 
Posts: 460
Joined: Mon Jan 21, 2013 12:42 pm
Location: Spain

Re: Portal lights

Post Fri Aug 07, 2015 1:52 am

David,
Thanks for your response.

I did see that one and I found this one where they are called "Light Portals" instead of "Portal Lights".
http://blenderartists.org/forum/showthread.php?362104-Experimental-Cycles-light-portals

From my understanding of the information on those sites, I think that "Light Portal" is a better name. The Light Portal controls photons instead of producing light??? Working more like a magnifying glass???

The error is produced if I use the wrong settings for specific lighting methods. I see them in the Wings3D console window when the render fails. I think you would see them when running yafaray-xml.exe from a command line. I did some testing today and found out the following:

Direct Lighting = Photon Only has to be enabled in the Light Portal to avoid a "5" rendering error. It does not matter if Diffuse Photons or Caustic Photons are enabled in the Light Portal. (I do not know if there is any advantage in using Light Portals with Direct Lighting).

Photon Mapping = Photon Only has to be enabled in the Light Portal to avoid a "5" rendering error. Diffuse Photons and Caustic Photons must NOT be enabled, otherwise there is a "5" rendering error. When using an HDRI to light the scene, Diffuse Photons has to be enabled in the ambient light settings to avoid a "5" rendering error.

Pathtracing = Photon Only has to be enabled in the Light Portal to avoid a "5" rendering error. It does not matter if Diffuse Photons or Caustic Photons are enabled in the Light Portal. You do not have to enable Diffuse Photons for HDRI lighting when using Pathtracing.

SPPM = With all settings I get a "5" rendering error.

These results are with a closed room with a single window with a Light Portal and Ambient lighting (Constant Color or HDRI). I do not know if the results would be different using spot lights and/or area lights, or other.

I used to export an xml file from Blender in order to figure out the code but I cannot find that option in Blender 2.74.

I plan to post an updated version of the Wings3D YafaRay plugin, with Light Portals added as an object option soon.

Thanks,
oort
oort
 
Posts: 221
Joined: Wed Jun 01, 2005 2:11 pm


Return to General Questions and Blender Exporter UI



Who is online

Users browsing this forum: No registered users and 6 guests