Game Development Community

pureLight Bug Fixes

by Alkor · in pureLIGHT · 10/18/2011 (1:11 pm) · 7 replies

Hello

I was hoping that as the versions pass by some severe bug fixes were going to be made.
I was kinda dissapointing to see that it did not came to be so.
The most frustrating one is that in order to get a realistic light result with 1 meter as the unit scale, he needs to set 39 to Light Units Per Meter.
However this creates a living hell trying to work with texel sizes of 0.00145 in order to get the desired resolution that is in the green range.

Please fix this so it would make life a lot easier.

Thanks in advance!

#1
10/20/2011 (10:55 am)
I'll take a look into this for you.
#2
10/21/2011 (9:13 am)
Which 3d modelling program are you using? What units do you have setup in it? Which file format are you exporting to? And which exporter are you using?
#3
10/21/2011 (10:06 am)
The important thing seems to be your exporter itself. I did some tests using 3d max here, and found this:

-If you use the built-in ASE exporter, it always exports things as the system unit setting. So if your system units are inches, and your display units are meters, then it will still export everything in inches. There is no unit scale specified in the file.
You should setup pureLIGHT to use the system unit setting when using ASE files.

-If you use the built-in DAE exporter, there is an option in there to specify what units you want to convert to on export.
You should setup pureLIGHT to use the unit setting that you specify in the collada exporter when using collada files.


Using blender, I found:
-If you use our ase exporter, it will scale everything by whatever the scale factor is. If you want to preserve your blender units, this should be set to 1.

-If you use the built-in collada exporter, it will treat 1 blender unit as being equal to 1 meter.

Since there is no unit scale option in blender (that I am aware of), you should set the pureLIGHT scale to either be 1 unit per meter if you are modelling in metric or 39.37008 if you are modelling in inches.


Doing this, I've set up 2 scenes, one with a plane in metric units, set to be 1 meter on each side, and one with a plane in imperial units, also set to be 1 meter on each side (39.37008 units). Both converted at a texel size of 2 identically. And both are lit identically when I placed a point light directly above them 1 meter away.
#4
10/22/2011 (3:04 am)
I am using Maya 2012 with the standard collada fbx exporter.
#5
10/26/2011 (3:30 pm)
What are your scale settings and export scale settings? And what are you modelling your meshes as? It sounds to me like you are modelling in meters, but with Maya set to centimeters, making everything 100 times smaller than you think it is.

I set up a scene in Maya 2012 with Maya's working units set in meters. Built a 1 meter by 1 meter plane centered about the origin and placed a point light 1 meter above it. Then I exported with the standard collada fbx exporter, with its units set to meters. Then I created a new pureLIGHT scene, with its units set to 1 unit per meter. Then converted the mesh at the default texel size of 2, and then baked the lighting.

Then I built the same scene with Maya's working units set in centimeters. Same scene, made sure it was 100 centimeters by 100 centimeters, with the point light 100 centimeters above it. Then I exported with the standard collada fbx exporter, with its units set to centimeters. Then I created a new pureLIGHT scene, with its units set to 100 units per meter. Then converted the mesh at the default texel size of 2, and then baked the lighting.

The lightmaps unwrap identically in both scenes (at the default texel size of 2), and light identically.
#6
10/27/2011 (4:37 am)
I built the original scene in centimeters. Then I changed the World Unit to Meters and scaled accordingly. On export I chose automatic as units.
What are your recomandations for an export?

My problem was that in order to get lightmaps of decent sizes like 512 or 1024 I have to use numbers like this 0.00049.
#7
10/27/2011 (3:46 pm)
When you change the world units in Maya, it automatically rescales everything for you. Did you scale everything down by a factor of 100 manually?

If so, then setting pureLIGHT to 0.01 units per meter should be what you want.