Jump to content

Bump maps look great in unity but terrible ingame


Recommended Posts

Hello all,

I've recently encountered a problem with my bump maps in which they look good when I place them in unity but horrendously jaggy once I put the part ingame.

Here's a screenshot of the part in unity:

6ZDK2JR.png?1

And here's the part in KSP

lEM5e1h.jpg?1

My import settings for the bump map are:

Create from greyscale checked

Filtering sharp

Wrap mode Repeat

Filter mode Trilinear

Aniso level 1

Max size 2048

Format Compressed

And I'm writinig to KSP with MBMs (but the same problem happens with all texture formats)

Does anyone know how I can fix this?

I've tried different sized bump maps and using a different program to convert the bump to a normal, but it seems like unity is just exporting horribly compressed textures to KSP and I don't know why.

I also checked inside the MBM file and the normal map portion of the data is set properly.

Link to comment
Share on other sites

Are you using bump, or normal maps? Have you set them as the correct kind of map in Unity? Have you messed with any of the filtering/compression stuff in Unity?

I'm importing a standard grey bump map and telling unity to create a normal map from grayscale. The only things I've changed from default is the bumpiness of the map

- - - Updated - - -

Are you using a non KSP shader (as KSP has its own shaders in Unity)?

I'm using KSP/Bumped Specular

Link to comment
Share on other sites

I've not had this problem, but then I don't change any settings plus I convert my bump maps into normal maps in GIMP first.

I don't know what sharp filtering does, but it kind of looks like it might be the culprit.

I'm going to try this right now. Would you mind sharing what gimp plugin you used and any settings you changed?

I tried smooth filtering too and it didn't change anything

Link to comment
Share on other sites

NormalMap. The only option you need to change, is to Invert Y. Unity seems to interpret normal maps slightly differently I guess. Other than that I only play around with Filter and Scale, to get the depth I want. Make sure you create a backup of your layers because this plugin converts, it doesn't generate a new layer.
Link to comment
Share on other sites

NormalMap. The only option you need to change, is to Invert Y. Unity seems to interpret normal maps slightly differently I guess. Other than that I only play around with Filter and Scale, to get the depth I want. Make sure you create a backup of your layers because this plugin converts, it doesn't generate a new layer.

Thanks, that seems to have fixed my problem. I also deleted my entire Unity scene and started from scratch just in case it had weird exporting settings, and now the bumps ingame match the normal map perfectly.

Link to comment
Share on other sites

NathanKell

Also, it's a really bad idea to compress normal maps. If you need to save the RAM, just reduce the size--a 512x512 RGB/A will look better than a 1024x1024 DXT1/5 normal map.

I disagree with that. The whole point of compression is to give higher resolutions at a lower cost. First kerbal uses tga or png, not dxt, and png does not create mipmaps.

Second.

DXT1 and DXT5 can give you vastly different compression artifacts. If you can get away with a smaller texture then you should be using that smaller texture to start with. If half sizing your texture gives you better results than compressed. Then your not using the correct compression settings and/or your normal map does not have enough detail in it to warrant a larger texture in the first place.

All of this is subjective but a properly created compressed texture can look almost as good as its uncompressed counterpart, and be much, much lighter.

http://www.bencloward.com/tutorials_normal_maps12.shtml

And more technical stuff.

http://www.nvidia.com/object/real-time-normal-map-dxt-compression.html

Link to comment
Share on other sites

KSP will convert all PNG and MBM (if not flag "leave uncompressed") to DXT1/5 (1 if no alpha present, 5 if alpha present). There's a bug (or feature?) in the loader where it *doesn't* do this automatically to TGAs, hence the Texture Compressor mod. Regarding compression: due to (IIRC) licensing issues re: DXT, all compression happens at runtime and there is but a single option (use hiquality compression yes/no) in the Unity compressor. So the options are really pretty limited.

I have no doubt that properly compressed textures will work well as normal maps; but as KSP does it, they tend not to (c.f. comparison shots of your Atlas with and without compressed normals).

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...