PVRTC cubemap seams

This topic contains 3 replies, has 2 voices, and was last updated by  Tobias Hector 4 years ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #31553

    tarka
    Member

    When compressing seamless textures for a cubemap, I get seam artifacts on the edges of some of the faces. I understand that this is introduced by the compression algorithm, but is there any relatively simple way to work around this? For a normal texture I would just leave space around the edge of the texture, but how does this work with a cube map?

    #38240

    Hi Tarka,

    There’s unfortunately no “easy” fix for this. As you’ve said you can leave a space around the edge of the texture, but it’s hard to make your UVs “jump the gap” when you’re sampling as a cubemap. However, that’s exactly what you have to do.

    What I’d suggest for this is that if you’re rendering to the inside of a skybox, make the skybox render as separate planes, and have a little bit of overlap in the planes, so that the “space” is rendered outside of the viewable area. This is usually easier and more performant than shader logic to do the gap jump, and also more useful than sampling the faces as separate textures, which is the other main workaround.

    Hope that makes sense?

    Thanks,
    Tobias

    #38241

    tarka
    Member

    Thanks Tobias, I feared as much.

    I sorted this out in the end by insetting each cube face by 4 px and copying the relevant parts of the neighbouring face textures into the border before compressing, then insetting the texture coordinates for the faces. Definitely not an easy solution, but it works well, and I get the added bonus of seamless cubemap filtering of a sort.

    On a somewhat related note, are you taking feature suggestions for PVRTextTool? This for one would be a great feature to add.

    #38242

    Hi Tarka,

    Glad you’ve got it working already! That was an impressive turnaround to be honest 🙂

    Yep I’m always taking suggestions – this happens to be an outstanding feature request I’ve had for a while anyway, but with limited interest. I’ll note that another person wanted it and raise the priority on it.

    Thanks,
    Tobias

Viewing 4 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic.