Re: YafaRay rendering plug-in

by enkonyito » Mon Jan 13, 2020 3:46 pm

With the YafaRay Blender-Exporter, I was able to find examples of XML scenes using different types of light.

enkonyito, before I investigate your problem, could you try again with this new version fist?
With this version 1.0 Beta 4, the following three problems occur again.

1. No light emitted for arealight.
Example of implementation.

Code: Select all

params.put("type", "arealight");
Point3f corner = new Point3f(-100, -100, 100);
Point3f point1 = new Point3f(-100, 100, 100);
Point3f point2 = new Point3f(100, -100, 100);
params.put("corner", corner);
params.put("point1", point1);
params.put("point2", point2);
params.put("from", new float [] {0, 0, 100});
params.put("color", new float [] {
          ((lightColor >> 16) & 0xFF) * ((this.homeLightColor >> 16) & 0xFF),
          ((lightColor >> 8) & 0xFF) * ((this.homeLightColor >> 8) & 0xFF),
          (lightColor & 0xFF) * (this.homeLightColor & 0xFF), 1});
params.put("power", power);
params.put("samples", 4);
createLight(UUID.randomUUID().toString(), params);
I think it's related to line 84 of the arealight.cc file even for double sided panels.

2. Identifier not taken into account for spherelight and arealight.
To make the sphere or area lights visible, add

Code: Select all

params.put("object", id);
returns the error "[font=courier new]Invalid object ID given![/font]".
How to find this identifier after the creation of the object (mesh)?

3. SH3D crash for meshlight.
Example of implementation.

Code: Select all

params.put("type", "meshlight");
params.put("double_sided", false);
params.put("light_enabled", true);
params.put("object", 1);
params.put("color", new float [] {
          ((lightColor >> 16) & 0xFF) * ((this.homeLightColor >> 16) & 0xFF),
          ((lightColor >> 8) & 0xFF) * ((this.homeLightColor >> 8) & 0xFF),
          (lightColor & 0xFF) * (this.homeLightColor & 0xFF), 1});
params.put("power", power);
params.put("samples", 4);
createLight(UUID.randomUUID().toString(), params);
These portions of code are implemented in the [font=courier new]exportLightSource[/font] method of the [font=courier new]YafarayRenderer[/font] class.