Skip to main content
GameDev.net gamedev.net
🔒 Locked

Geometry Antialiasing

Started by nooan Apr 26, 2006 at 4:44 AM 0 replies 1.8k views
Original Post
nooan
nooan
Hello everybody, In my project, I model water waves as a sum of trocoids. The water geometry is rendered as a set of grids centered around the viewer, each grid having half the geometrical resolution as the previous one. I have problems with the strong aliasing that appears when the resolution of the grid is not dense enough to represent the waves. This problem obviously aggravates far from the viewer where the grid detail progressively decreases. As a solution, I am filtering the waves in respect of the Nyquist theorem. In particular, I use the following formula (a hack): float scale = 1 - saturate(spacing*max(kx,ky)/PI) where spacing is the spacing between the grid vertices, kx and ky are the trocoids wave numbers. This scale then multiplies the trocoid amplitude: amplitude *= scale Ideally, this formula should bring scale to 0 whenever the spacing becomes larger than half the minimum wavelength. Well, I am not entirely satisfied with the results obtained when using the above formula. First, I am not 100% sure how the Nyquist theorem extends to a 2D surface and thus what the correct filtering should be (I used max(kx,ky), that might be wrong). Second, I am not entirely sure whether the spectrum of trocoids is the same as that of pure sinusoids or not (although I assume they're pretty similar) so the cutoff frequency might have to be adjusted. From my understanding also, the aliasing should be view independent as long as the geometry does not alias to the same pixels. Instead I get worse results when the waves are parallel to the view direction. Could anyone suggest me the correct way of filtering the waves? Thanks a lot! Stefano Lanza
Stefano LanzaTyphoon Engine

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.