Print at Feb 3, 2026, 12:51:19 PM

Posted by enkonyito at Mar 15, 2019, 7:35:14 PM
Re: Photo rendering test
Glad to see the interest you all have for this option!


...could it be linked to the time of day...
Like the light panel - daylight? Yes, but the interest of ambient lighting is that it works day and night.


1 - The amount of light is quite low. Is there a way to increase it?
2 - Where is the light source placed? Where do the shadows originate?
3 - What is the difference with a (large) light source placed in the (middle of) the room?

In the part of the source code managing the ceiling light of the rooms, I replaced this treatment using a light sphere
float power = (float)Math.sqrt(room.getArea()) / 3;
this.sunflow.parameter("radiance", null,
power * (ceillingLightColor >> 16) / 0xD0 * (this.homeLightColor >> 16) / 255,
power * ((ceillingLightColor >> 8) & 0xFF) / 0xD0 * ((this.homeLightColor >> 8) & 0xFF) / 255,
power * (ceillingLightColor & 0xFF) / 0xD0 * (this.homeLightColor & 0xFF) / 255);
this.sunflow.parameter("center", new Point3(xCenter, roomHeight - 25, yCenter));
this.sunflow.parameter("radius", 20f);
this.sunflow.parameter("samples", 4);
this.sunflow.light(UUID.randomUUID().toString(), "sphere");
by this one using 2 light panels
float roomAreaInSquareMeter = room.getArea() / 10000;
float power = (float) Math.sqrt(roomAreaInSquareMeter) / 4; // TEST
float panelSize = (float) Math.sqrt(room.getArea()) / 4; // dimension in cm
// face-down panel
float illuminatingFaceElevation = roomHeight;
float[] verticesCoordinates1 = {xCenter - (panelSize / 2), illuminatingFaceElevation, yCenter - (panelSize / 2),
xCenter + (panelSize / 2), illuminatingFaceElevation, yCenter - (panelSize / 2),
xCenter + (panelSize / 2), illuminatingFaceElevation, yCenter + (panelSize / 2),
xCenter - (panelSize / 2), illuminatingFaceElevation, yCenter + (panelSize / 2)};
addLightPanelsToSunflow(power, ceillingLightColor, verticesCoordinates1);
// face-up panel
power = power / 4;
panelSize = (float) Math.sqrt(room.getArea()) / 2; // dimension in cm
illuminatingFaceElevation = roomElevation;
float[] verticesCoordinates2 = {xCenter - (panelSize / 2), illuminatingFaceElevation, yCenter + (panelSize / 2),
xCenter + (panelSize / 2), illuminatingFaceElevation, yCenter + (panelSize / 2),
xCenter + (panelSize / 2), illuminatingFaceElevation, yCenter - (panelSize / 2),
xCenter - (panelSize / 2), illuminatingFaceElevation, yCenter - (panelSize / 2)};
addLightPanelsToSunflow(power, ceillingLightColor, verticesCoordinates2);

In both cases, the power is based on the area of ​​the room.

The main difference between a large light sphere and light panels is that they can be placed very close to an object and project much softer shadows.
That's why I chose the solution of a medium panel on the ceiling and a panel 4 times bigger on the floor with a power 4 times smaller. This gives the impression that light comes from all sides.

I updated the download link with a version using the "maximum" power.

It would be possible to manually change the power of the ambient lighting with radio buttons or a slider but it would be necessary to see the impact that it could have on the interface of photo rendering.

Enko
----------------------------------------
EnkoNyito