Jump to content

  • Log In with Google      Sign In   
  • Create Account


#ActualHodgman

Posted 28 February 2013 - 10:00 PM

Ah yes, you're right. I was only thinking about the case where you rasterize and then sample at the same resolution -- like the above image where the triangle outlines are being drawn by Softimage over the top of the texture, I'd expect those to match up, because if the triangle covers a pixel centre, then there will be data in that pixel, so the nearest-neighbour sampling should be able to find a correct value.

 

You're right that when the texture sampling rate is different, like in the 3D view, it's possible for the nearest neighbour sampling to be snapped into texels that weren't rendered to originally.

 

I used some texture-space rendering like this in my last game at runtime, and covered up these 'seams' with a simple dilation/gutter pass after rendering. To implement it, I cleared the texture's alpha channel to black before rendering, and made sure that I set it to white during rendering, so that the dilation filter could tell which pixels were valid (and not to be changed), and which were empty (and needed to be filled).

Also, I'm pretty sure that softimage lets you specify how many pixel's spacing you'd like it to leave between 'islands' of polygons in UV space, so that you've got enough room to construct this 'gutter' wink.png


#1Hodgman

Posted 28 February 2013 - 09:58 PM

Ah yes, you're right. I was only thinking about the case where you rasterize and then sample at the same resolution -- like the above image where the triangle outlines are being drawn by Softimage over the top of the texture, I'd expect those to match up, because if the triangle covers a pixel centre, then there will be data in that pixel, so the nearest-neighbour sampling should be able to find a correct value.

 

You're right that when the texture sampling rate is different, like in the 3D view, it's possible for the nearest neighbour sampling to be snapped into texels that weren't rendered to originally.

 

I used some texture-space rendering like this in my last game at runtime, and covered up these 'seams' with a simple dilation/gutter pass after rendering. To implement it, I cleared the texture's alpha channel to black before rendering, and made sure that I set it to white during rendering, so that the dilation filter could tell which pixels were valid (and not to be changed), and which were empty (and needed to be filled).


PARTNERS