Jump to content

Why is my part's lighting messed up?


Recommended Posts

My part's got some bad behavior with lighting, I'm at a loss why.

7g2klMr.png

I snapped this in Kerbin's shadow, so Val's light is the only light source.  See how the lighting seems to be about 60 degrees off of the base part where it connects to the (stock) command module?

Maybe it's not obvious, but the part has a trunk and three doors that swing open like the shielded docking port.  You can see Val's light is shining on the wrong one - and it's obviously not just wrong in the Z axis, because otherwise it'd have a smooth transition of some sort to the other two doors.

Wierdly, shadows don't seem to be broken - they land where they should.

WTH.  Anybody got any clues for me?

Link to comment
Share on other sites

I could be wrong but I suspect you are suffering from the same issue as here.

Essentially, if you are using a shader that looks for a normal (bump) map and don't have one, things behave strangely. Either switch the shader in use on the part to one that doesn't need a bump map or supply a bump map if this is the case.

Link to comment
Share on other sites

17 hours ago, Manwith Noname said:

I could be wrong but I suspect you are suffering from the same issue as here.

I think you're close to it, but not exactly it.  First, yep, there's a bump map involved, but it seems to be there -- at least when I did the 'Write' thing in Unity it placed 3 files - my texture, my bump map, and my .mu file...  (That wasn't me doing it, so Unity must be down with the idea that I've got a bump map).

But!  If I switch the shader from "KSP/Bumped Specular" to "KSP/Specular" the problem goes away!  Further, if I choose any of the KSP textures with a bump map it seems to have the problem (and not if the texture doesn't use a bump map).

The problem is visible in the Unity editor, so my suspicion is that I somehow haven't learned the secret handshake of bump maps in Unity.  I seem to have it figured for Blender, but Unity has its own ideas.

My (limited) experience with Unity is that all things have a golden path.  There are many golden paths.  One leads to bliss and harmony in KSP.  Others lead to other destinations.  The path to bliss in KSP is not marked.  If you stray from the path, you'll be eaten by wolves.

Link to comment
Share on other sites

@NermNermNerm

How are you making your normal map?

A couple of years ago when I first tried my hand at adding some to stock parts, I experienced a similar issue.

Spoiler

687ADFE68FE24AFED90F0708F224A0095800B866

This seam would show due to a combination of the mirroring used for the textures but also my poorly made normal map. I was doing everything in GIMP and it took me a few hours to realise that "bumpmap" in GIMP's tools was not "normalmap" for game textures.

Link to comment
Share on other sites

19 hours ago, Manwith Noname said:

@NermNermNerm

How are you making your normal map?

I converted my "Bump" map to a "Normal" map, using a plugin for Gimp.  And Lo!  Fixed!  The part looks better in KSP than it does in Blender or Unity.

And we won't even mention that the selector in the Materials pane says "Bump" in small, but authoritative letters...  Well, yes we will mention it I guess :)

Ah well, it's probably a bug in PartTools; maybe in days past it really did mean bump map, but clearly now it doesn't.

When I imported the .blend file it made a snarky comment about the bump map and I translated what it said as an offer to fix it and assumed it had done something good.  I think it was just pointing and laughing and expecting me to fix it.

l7EHhTq.jpg

Wow I fail at art.

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