First time poster here.
Since a few weeks I am trying to write a Unity 3D to Indigo exporter for my company's architecture software.
I already got a basic mesh and material export working and am now working on exporting lights.
The exporter generates .igmesh files, texture files and the .igs project file from scratch from a C# script.
This means I have to convert from Unity's values to sensible values for use in Indigo.
The problem I now have is exporting lights correctly or at least tolerably.
We have 2 basic kinds of lights: Ceiling lights and dim LED lights.
As a test I exported both as 1cm spheres (easitest in the .igs project file) and gave them a hardcoded phong material with a base_emission of type blackbody, temperature of 7000 K and a gain of 1. This works reasonably well for the ceiling lights.
To export colored LEDs I am now trying to set the base_emission to RGB with the Unity color values. But this simply does not produce any light. Even in a room without any other light source the sphere neither shows up, nor does it emit any visible light. As soon as I switch back to blackbody via the Indigo interface they begin emitting light.
This is the lightsource XML generated by my exporter:
Code: Select all
<material>
<name>light_material_0</name>
<phong>
<exponent>
<constant>1000</constant>
</exponent>
<diffuse_albedo>
<constant>
<rgb>
<rgb>1 1 1</rgb>
<gamma>2.2</gamma>
</rgb>
</constant>
</diffuse_albedo>
<layer>0</layer>
<base_emission>
<constant>
<rgb>
<rgb>1 1 1</rgb>
<gamma>2.2</gamma>
</rgb>
</constant>
</base_emission>
</phong>
</material>
<sphere>
<center>0 1.442432E-07 2.42</center>
<radius>0.01</radius>
<material_name>light_material_0</material_name>
</sphere>
One workaround I am considering would be to create colored glass materials and simply put them around the light emitting sphere, but this seems overly complicated.
Does anyone know what I am doing wrong?