Sign in to follow this  
Kexikus

Skybox UVW maps

Recommended Posts

As you might know, I had an issue with my first skybox mod where the edges of the textures would be cut off. Back then I though that this was a model issue, i.e. that the edges of the skybox cube don't line up perfectly. Upon further investigation for version 2, I learned that the model itself has no such issue but it's the UVW map that's causing all of that. You can see an example below. I created a 2048x2048 texture with a 1px black checkerboard pattern and a red 4px checkerboard pattern to represent the pixels of a vanilla 512x512 texture. As you can see, one pixel is outside of the UVW bounds and thus not visible ingame which results in an ugly seam that I'd rather get rid of. There are other examples where more than one pixel is missing, but that doesn't really matter.

 

EXvT6aG.jpg

 

I figured that this would be easy to fix, so I just scaled the UVW map up until it fit the texture. And that did work in some cases. In other cases I ended up with a black seam between the textures, similar to the black line sometimes seen with face textures. You can see that issue in this screenshot where the two textures for the backdrop meet. I tried the mipmap fix but that did nothing.

 

Any other ideas on how I could fix this?

Share this post


Link to post
Share on other sites

I had not but I have now...

 

setAkidh.png

 

I would not call that an improvement^^

 

I also tried GLOverride but that didn't change anything. Guess I'll have to investigate further. Maybe that one is actually a UVW error.

Share this post


Link to post
Share on other sites

It's manm26ad with an edited skybox/backdrop model.

 

What you see in that picture above is the hangar ring backdrop texture being screwed up when using clamp 1.

There are no changes to the skybox cube itself in that picture though.

Share this post


Link to post
Share on other sites

Have you tried going the opposite route? For example, scaling your image down to 2046x2046 on a 2048x2048 canvas, then using padding to fill in the dead pixels? I believe xNormal has a plugin that will do the padding.

Share this post


Link to post
Share on other sites

Seems like I have to go with that workaround.

 

I played around with some more txi parameters, including a mix of the following:

mipmap 0
downsamplemax 0

clamp 0

envmap CM_Bright

I also tried clamp 1 (and -1^^) as well as the GLOverride. None of that made any improvement compared to having no txi at all. Only clamp 1 (and -1) made things worse.

Share this post


Link to post
Share on other sites

The value for Clamp should be the maximum pixel width bleed I believe, so -1 is presumably not a valid number. I'm unsure about 0, but it seems like your test would indicate that is also invalid.

Share this post


Link to post
Share on other sites

The value for Clamp should be the maximum pixel width bleed I believe, so -1 is presumably not a valid number. I'm unsure about 0, but it seems like your test would indicate that is also invalid.

 

I don't know about -1 actually. 0 seems to be invalid as it just does nothing, but -1 does the same as 1 so I'd guess that the minus sign is just ignored or something as an invalid value would just do nothing.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

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.

Sign in to follow this