MarbleItUp / MIULevelCreationKit

Open level editor for Marble It Up! http://www.marbleitup.com/
Other
19 stars 11 forks source link

Cannot get DXT1 and DXT5 compression for lightmap and shadowmap textures #10

Open MaxLaumeister opened 5 years ago

MaxLaumeister commented 5 years ago

I set the settings for the lightmap as recommended in the lightmaps section of the README, but Unity is still giving the texture HDR compression instead of the required DXT5 compression. I get a similar result with the shadowmap - Unity gives it ARBG 16 bit compression instead of the required DXT1. Having these textures in the wrong format is of course preventing the level export.

I am using Unity Personal 2017.4.17f1 LTS.

Here is a screenshot showing that the texture settings match the README:

Lightmap Inspector

bengarney commented 5 years ago

Do you have HDR rendering turned on perhaps?

On Sat, Jan 5, 2019 at 1:06 PM Maximillian Laumeister < notifications@github.com> wrote:

I set the settings for the lightmap as recommended in the lightmaps section of the README, but Unity is still giving the texture HDR compression instead of the required DXT5 compression. I get a similar result with the shadowmap - Unity gives it ARBG 16 bit compression instead of the required DXT1. Having these textures in the wrong format is of course preventing the level export.

I am using Unity Personal 2017.4.17f1 LTS.

Here is a screenshot showing that the texture settings match the README:

[image: Lightmap Inspector] https://user-images.githubusercontent.com/4030205/50729152-b7e25a80-10e9-11e9-87be-bc8c37ceb320.PNG

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/MarbleItUp/MIULevelCreationKit/issues/10, or mute the thread https://github.com/notifications/unsubscribe-auth/AAIG7IGErelgnPW0bKhLgLwEvXUPws55ks5vARPtgaJpZM4ZyF2C .

MaxLaumeister commented 5 years ago

I unchecked "Allow HDR" for the main camera ("Preview Camera" in the example) and the problem persists. As far as I know there is no global Unity setting for HDR rendering, it's on a camera-by-camera basis.

The only things I had added to the example scene were built-in sign and bumper objects, as well as a plain unity cube with a mesh collider. I just tried removing the cube and re-baking the lightmaps, and the compression still isn't in the right format unfortunately.

bengarney commented 5 years ago

Ah - have you tried changing your lightmap encoding quality setting per https://docs.unity3d.com/Manual/Lightmaps-TechnicalInformation.html ? It should be on Normal Quality.

MaxLaumeister commented 5 years ago

Thank you for your help, I got the lightmap to compress properly but the shadowmap is still acting up.

I went into the Project Settings -> Player -> Other settings -> Rendering and changed the Lightmap Encoding quality to Normal Quality as shown in the document you linked.

Then I went to the lighting panel and clicked "Generate Lighting".

Finally I went back to the inspector for the shadowmap and lightmap textures and changed the texture settings again to what is shown in this repo's README (2048 with normal quality compression), as they had changed themselves back to default.

Now my lightmap shows "RGBA Compressed DXT5", which is the correct compression. However the shadowmap still shows "ARGB 16 bit" compression, which the MIU plugin complains about on export.

bengarney commented 5 years ago

Hmm. What if you delete all the lighting stuff on disk and re-light?

On Wed, Jan 9, 2019 at 5:01 PM Maximillian Laumeister < notifications@github.com> wrote:

Thank you for your help, I got the lightmap to compress properly but the shadowmap is still acting up.

I went into the Project Settings -> Player -> Other settings -> Rendering and changed the Lightmap Encoding quality to Normal Quality as shown in the document you linked.

Then I went to the lighting panel and clicked "Generate Lighting".

Finally I went back to the inspector for the shadowmap and lightmap textures and changed the texture settings again to what is shown in this repo's README (2048 with normal quality compression), as they had changed themselves back to default.

Now my lightmap shows "RGBA Compressed DXT5", which is the correct compression. However the shadowmap still shows "ARGB 16 bit" compression, which the MIU plugin complains about on export.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/MarbleItUp/MIULevelCreationKit/issues/10#issuecomment-452930826, or mute the thread https://github.com/notifications/unsubscribe-auth/AAIG7HqHZjftI1opwLIWnKyWuuim35ZWks5vBpDhgaJpZM4ZyF2C .

MaxLaumeister commented 5 years ago

I deleted the two textures, clicked "Clear Baked Data" in the Lighting panel, then "Generate Lighting" again. Shadowmap is still showing "ARGB 16 bit".

bengarney commented 5 years ago

Weird. But it exports and loads OK?

On Wed, Jan 9, 2019 at 7:52 PM Maximillian Laumeister < notifications@github.com> wrote:

I deleted the two textures, clicked "Clear Baked Data" in the Lighting panel, then "Generate Lighting" again. Shadowmap is still showing "ARGB 16 bit".

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/MarbleItUp/MIULevelCreationKit/issues/10#issuecomment-452961987, or mute the thread https://github.com/notifications/unsubscribe-auth/AAIG7KK2XZ-VO6R22RRAvbWSt31nsu2Vks5vBrkRgaJpZM4ZyF2C .

MaxLaumeister commented 5 years ago

Unfortunately it fails on export. The MIU Level Kit panel says "Lightmap Shadow Texture not DXT1 Compressed". Which is totally true, I just can't figure out how to get it DXT1 compressed.

bengarney commented 5 years ago

Can you just turn off shadowmap generation? Or does it require it?

It looks like it's 16 bit when you have something HDR enabled. Do you have any HDR checkboxes enabled in the Project > Graphics Settings?

On Thu, Jan 10, 2019 at 10:37 AM Maximillian Laumeister < notifications@github.com> wrote:

Unfortunately it fails on export. The MIU Level Kit panel says "Lightmap Shadow Texture not DXT1 Compressed". Which is totally true, I just can't figure out how to get it DXT1 compressed.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/MarbleItUp/MIULevelCreationKit/issues/10#issuecomment-453205506, or mute the thread https://github.com/notifications/unsubscribe-auth/AAIG7HenEgyvYt5ozX76oDlpPLnYMXsdks5vB4h5gaJpZM4ZyF2C .

MaxLaumeister commented 5 years ago

I just went to Project Settings -> Graphics and unchecked "Use Defaults" on Low, Medium and High tiers. Then for each tier, I unchecked the "Use HDR" setting.

Then I did a "Clear Baked Data" and "Generate Lighting" again, and set the shadowmap texture back to the recommended settings in its inspector again and clicked apply. Still showing ARGB 16 bit compression.

As far as turning off shadowmap generation altogether, would that make any levels I create not have any shadows when played in-game?

bengarney commented 5 years ago

No, the shadowmap enhances how some specular highlights appear. But the lightmap is what makes things have dark/light appearance.

Very strange. Not sure why it's happening that way for you. If you go to 2017.2.1p3 does it behave any differently?

On Thu, Jan 10, 2019 at 11:21 AM Maximillian Laumeister < notifications@github.com> wrote:

I just went to Project Settings -> Graphics and unchecked "Use Defaults" on Low, Medium and High tiers. Then for each tier, I unchecked the "Use HDR" setting.

Then I did a "Clear Baked Data" and "Generate Lighting" again, and set the shadowmap texture back to the recommended settings in its inspector again and clicked apply. Still showing ARGB 16 bit compression.

As far as turning off shadowmap generation altogether, would that make any levels I create not have any shadows when played in-game?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/MarbleItUp/MIULevelCreationKit/issues/10#issuecomment-453220191, or mute the thread https://github.com/notifications/unsubscribe-auth/AAIG7KZsZPxxAZJTm-h6sVymJapS4_-qks5vB5KhgaJpZM4ZyF2C .

jmuzz commented 4 years ago

I had the same problem. Unity 2017 is unavailable now. I fixed it by disabling the shadowmap. That setting is not so clear, so in case anybody needs it, here is a picture.

lighting (1)