Jump to content

Diffuse & RimFalloff


Recommended Posts

Ok, so I was having issues while retexturing a model. Nasty lines kept getting generated where the parts joined. I'm attempting to create seamless models which I know is somewhat insane but... boats don't have seams. I know it wasn't z fighting because I actually moved the parts .01 apart and it was still there. The further away I zoomed out, the bigger the seam became.

So, I cranked up the RimFalloff in KSP/Diffuse, not knowing exactly what it does but thinking it might have an effect (along with some other minor tweaks to part position) and... the seams vanished. So, I'm not positive if it was the RimFalloff or something else I did.

Does anyone know exactly what RimFalloff and Falloff color actually do?

Thanks.

Link to comment
Share on other sites

Huh, I'm curious about this as well, now that you mention it.

I think I know what you're talking about. I see this in seams in my parts, sometimes internally to the parts if it has separate mesh objects. Some of the seams though have been due to not having enough of a "margin" in the texture (that is, drawing widely outside the polygon in the UV map).

One of the things I did in SpaceY to try to make the seams less visible between fuel tanks is to have diagonally intersecting rims. The tanks extend into one another slightly, with perpendicular surfaces so that it doesn't z-fight either.

Link to comment
Share on other sites

Ok, here's exactly what I'm talking about.

Left side, zoomed in, it looks almost seamless. Zoomed out, big, nasty, ugly white lines. Dunno why.

The verticies for the front and back of the center parts are identical x & z down to 6 decimal places. The .cfg only changes the y by -5. X and Z stay 0. I can't get much more precise than that as far as matching parts. So something else is causing these goofy looking lines.

seamless.jpg

Edited by Fengist
Link to comment
Share on other sites

Depending on how you've UV mapped that mesh, it's either a side effect of mipmapping or the edges of your texture tiling. You can check your textures mipmap levels in Unity with the red box in the pic below, and you can try changing the texture wrap to "clamp" (blue box) which will stop your texture tiling when zooming out (which causes the game to display the lower resolution mip level of your texture). If you've deliberately UV mapped things to take advantage of texture tiling that won't help though.

ydc6cpy.jpg

Your texture filetype may not even have mipmapping though, KSP doesn't load them for PNG images, and if you've converted it to DDS (depending on converter) it may not have generated mipmaps.

You need to be mindful of mipmaps when texturing since they can cause exactly what you're seeing. A good way to get around it happening is to keep similar coloured UV islands grouped together, and to always ensure you leave some empty space around each UV island (typically referred to as padding).

This link explains things better than I could.

Edited by hoojiwana
Link to comment
Share on other sites

Thanks Hooji! I was kinda on that track, I just didn't know the technical answer. I use Wings and it has a habit of putting the unwraps right at the edge of the image. I learned to move the unwraps a few pixels away from the edge. What I didn't realize was that where parts join, the image, well in my untechnical language, the edges bleed over. The pics above are from a .png with an alpha transparent background (saved from Unity in .mbm). When I changed the background to black, all of the lines turned black. When I went back to an alpha background set the image to alpha transparent in Unity, the lines became multi-colored. After reading your explanation, I realized what I needed to do. I stretched out the brown texture that represents the 'deck' and... amazing, the lines vanished. I was overlapping the unwrap by 5-10 pixels. Apparently, that's not nearly enough. Oh, I tried the clamp first, didn't do anything.

Now I know to add lots of extra texture where the parts are going to join. Thanks again! And your explanation + links made it perfectly clear.

Link to comment
Share on other sites

Now I know to add lots of extra texture where the parts are going to join. Thanks again! And your explanation + links made it perfectly clear.

Yep, that's what I was getting at with painting outside the lines with wide margins. I think that'll help you a lot here.

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