Jump to content

Mipmap control


Recommended Posts

Hi, was just wondering if anyone here had some info about .tga mipmaps.

They pretty much work as intended, but at longer view distances and smaller mipmap levels, the UV seams (or something) start showing around the tops and bottoms of my parts, ruining the seamlessness I'm working towards. Call me pedantic but nothing I've tried has remedied them; be it external GPU anti-aliasing overrides, giving the suspect UV's a ton of space to average reduced pixels onto, sewing the UVs at the termination of the structures edge so the seam is on the inside of the part, and ensuring every UV face has at least some texture space. The pic (at 100% zoom) shows what I mean, with its texture map and the relevant UV outlines overlaid on top.

fYXlFNo.png

I don't understand why I'm still seeing a white line - no UV on any externally visible quarter of the map is anywhere near where the mipmap could grab erroneous colour from. And if its mesh being AA'd incorrectly, why doesn't it do it on other parts? I've never seen it happen on anything else.

Anyone have any ideas? Is there some import\export setting in Unity I've overlooked? This hasn't suddenly happened; but I figured before I release my next update, I should try fix whatever is causing problems that will translate onto 90% of my work.

Link to comment
Share on other sites

the seams are appearing between pieces of mesh right? no along all UV seams. you sometimes get z-fighting between adjacent thin pieces of mesh when zoomed out farway. it's dependent on Near Clip setting on Unity camera, I don't know why, all I know is it happens in Unity. probably not much you can do about it.

Link to comment
Share on other sites

the seams are appearing between pieces of mesh right? no along all UV seams. you sometimes get z-fighting between adjacent thin pieces of mesh when zoomed out farway. it's dependent on Near Clip setting on Unity camera, I don't know why, all I know is it happens in Unity. probably not much you can do about it.

Yeah its between pieces of mesh - the top and bottom of stacked wedges. The bottom right image in the above pic has an individual piece highlighted so you have an idea where they meet. They're physically not touching at all (and if they are, its very borderline, you get no shimmering at all when you zoom in) so z-fighting shouldn't be happening at those distances.

But as you say it could be a Unity limitation and totally out of my control, I just figured that because mipmaps generate the further you get from the camera, that they were responsible.

Scratch that, it is the camera clip settings - i just noticed the objects and shadows around the launch pad flicker in and out of existence based on how far you are from them. Specifically the shadows around the ramps that run over the pipes to the coolant tanks. Happens around the KSC buildings too with their cast shadows. Parts with other things within them shimmer their contents the further away you get (like an orange tank covered in metal plating, zoom out and the orange shows through). Never really noticed it before.

So what would be happening? Is Unity shrinking\reducing the complexity of meshes based on the distance from the camera? They must still be partially rendered, so they cant have been totally clipped away to nothing. Could it be culling face normals or something?

Edited by Daishi
Link to comment
Share on other sites

Presumably it's the transformation to screen space and it loses precision?

I wouldn't be surprised, considering Unity is rendering the entire solar systems assets in tandem, one way or another. Knee deep in modding at Kerbal scale I forget that sometimes :P

With all your experience modding and upsizing planets and whathaveyou, can you see any way around the limitations of rendering accurately? Even if the current clip\whatever scale thing is increased again by half a step, it should really help.

Link to comment
Share on other sites

this is just purely from working with cameras and scenes inside of Unity, adjusting the Near Clipping plane to higher setting, between 1~3 (default is 0.3), as camera is further away from objects generally fixes the flickering problem where mesh objects intersect. it also fixes the stepped artifacts along the shadow edge from Directional Lights.

I don't know if all of this translates to KSP, but maybe a place to start.

Link to comment
Share on other sites

this is just purely from working with cameras and scenes inside of Unity, adjusting the Near Clipping plane to higher setting, between 1~3 (default is 0.3), as camera is further away from objects generally fixes the flickering problem where mesh objects intersect. it also fixes the stepped artifacts along the shadow edge from Directional Lights.

I don't know if all of this translates to KSP, but maybe a place to start.

Thanks! Full blown Unity is a bit beyond me at this stage, but I might learn one day. This will come in handy :)

You can try using RSS with just the plugin, no CFG. Hit ALT+G during flight and mess with the clip distances.

+1. Will give it a go

Link to comment
Share on other sites

Doesn't look like any tweak makes a difference. I suspect what I'm seeing is the interior structural mesh bleeding through the black corrugation, not the two wedges clipping on the vertical like I thought. I'll remove the internals and see if that makes a difference.

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