Jump to content

Normal map not working in game when generated in gimp.


Recommended Posts

So after trying to use Unity to make normal maps from greyscale and getting really bad and pixelated results, I got the gimp normal map plugin. When imported into KSP though the bumping doesn't show up and looks the same as a diffuse texture. It looks fine in Unity, and I have the normal map marked as a normal map, so I'm not sure what I am doing wrong... The texture has _NRM marked at the end as well, so I know that that isn't it.

In Unity:

SNrzc8i.png

In KSP missing the bump:

RubW6SJ.png

Link to comment
Share on other sites

Try cranking the scale right up when generating the map, it'll give you a handle on whether it's really doing anything in KSP. Also, the lighting is weird in the editor, subtle stuff only seems to really show in flight. I know the default options for the gimp plugin with fine in KSP, I use it myself.

Link to comment
Share on other sites

Try cranking the scale right up when generating the map, it'll give you a handle on whether it's really doing anything in KSP. Also, the lighting is weird in the editor, subtle stuff only seems to really show in flight. I know the default options for the gimp plugin with fine in KSP, I use it myself.

Yeah I can't figure out the lighting thing, I've exported the part out of Unity with different settings a dozen times but no change :P. I increased the scale to like 40 in Gimp and the bump is showing up in KSP now, although it is really blocky and pixelated still.. the bolts almost show up as squares haha.

Link to comment
Share on other sites

Is there any way of using the nVidia tools with GIMP ( or is that what you're using anyway? ).

I'm not sure if you can, although I've never looked into it. I don't have photoshop either or else I would try... I know that lots of people use the plugin for Gimp and get good results though.

My map looks like this:

7VaaSHw.png

but in KSP looks like this:

KVMTXXI.png

(sorry for the large images, but it's hard to see the details without them)

The map is scaled up in Unity to 2048x2048 also because otherwise the pixelation on the bolts would be worse. I'd like to use 512x512 if I can to reduce memory. Am i just trying to add bump to areas that are too small to look good?

Link to comment
Share on other sites

Perhaps try bumped specular? this is the map from the hub ( which has bits of another model mapped in too )

http://i.imgur.com/44XeqSz.jpg

So yours should be doing more than it is.

Perhaps.. I'll give it a try when I have time tomorrow and see what happens. It's pretty frustrating because it seems as though I'm doing everything right xD

Link to comment
Share on other sites

VAB Lighting is a bit weird. Launch your part and timewarp to see if it works.

I put my part on the pad and timewarped, but the light coming from the tower still had the same effect with the harsh shadow line. It seems that any natural light source (the sun) seems to cast shadows on it fine, but artificial sources cause the weird effect.

It's strange that it is only happening with this one part, since my smaller thrusters on the sides are normal.

You can see it happen with an EVA'd Kerbal's lights too, for example:

aE2DvhJ.png

Link to comment
Share on other sites

What DPI does your normal map have?

if it's 72, increase to 300 - that might help..

I changed it to 300 and you're right, that makes it look a lot better, thanks!

Also, I fixed the weird lighting issue. Turns out I missed a small step when importing the mesh to Unity. Instead of "calculate normals" I left it as "import normals," so it was doing wonky things in-game visually because of that. Now it looks fine :D Oy, that was frustrating lol.

Link to comment
Share on other sites

I changed it to 300 and you're right, that makes it look a lot better, thanks!

Also, I fixed the weird lighting issue. Turns out I missed a small step when importing the mesh to Unity. Instead of "calculate normals" I left it as "import normals," so it was doing wonky things in-game visually because of that. Now it looks fine :D Oy, that was frustrating lol.

So DPI has nothing to do with it then, right? Screens don't care about inches.

Link to comment
Share on other sites

So DPI has nothing to do with it then, right? Screens don't care about inches.

I think the DPI change may have helped with the normal map pixelation, but now that I have the model imported correctly I can test it again with the 72 DPI that I had earlier and see if it really did have any effect.

Link to comment
Share on other sites

  • 2 weeks later...

A thought - what would be the extra tri count in just adding detail to the mesh instead? I suspect any performance hit would be less than the extra pass caused by using a normal map, it's not all that much detail in it. I modelled some horribly overdetailed rivet heads which cost more tris than the entire rest of my hub I think, but in the end it's still nothing much as tri-counts go.

Link to comment
Share on other sites

Yeah that might be better performance-wise, although would require unwrapping and taking the part through Unity again...a process which I'd like not to do at the moment, but maybe if I ever go back and try to make optimizations I could see about doing this :)

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...