BabylonJS / BabylonToolkit

Home of the community maintained Unity & Unreal exporters for Babylon.js
179 stars 47 forks source link

Exporter create wrong jpg files #13

Closed CusthomeDev closed 4 years ago

CusthomeDev commented 5 years ago

Hi,

When I select jpeg format for exporting lightmaps, the exporter create .jpg files for light maps (great). But, when I open that files in Photoshop (to optimize them), Photoshop says these jpeg file are not real jpeg.

After some investigations, it looks like the exporter just create png file and rename it with .jpg extension. But in reality, the file is a png.

See this lightmap file after using Babylon exporter for Unity :

Filename: Rex2_Lightmap-0_comp_light.jpg
Filetime: 2019-08-23 14:15:05 GMT
File Type: image/png
Dimensions: 1024x1024
Color Channels: 3, 16-bit
File Size: 726,167 bytes
MD5: 911c368776ab86315e3be3cd74857fb7
SHA1: 395c522f09390b5c7167b3fa4831e609223ed7c6
SHA256: 085607ba7d2d1d5ad70f9b0ccec18f2342e87ff0389268a277f33772a4615c52

Is there a technical reason why jpg file are in reality png file ?

Regards

MackeyK24 commented 5 years ago

Must be a bug... Actually in my new version... Lightmaps are always PNG. It uses native shaders to Render HDR -> LDR Lightmaps as Lossless compressed png.

I wonder if i just make lightmaps in the classic version png as well ... ???

Let me take a look at the classic edition of the exporter :)

CusthomeDev commented 5 years ago

Hi @MackeyK24, Thank you for your help. Have you been able to look at the classic edition ? Do you need mode informations ?

MackeyK24 commented 4 years ago

Fixed