Archived

This topic is now archived and is closed to further replies.

vember

new water rendering demo

Recommended Posts

I thought some people here might be interested in having a look at this: It''s a water demo using a novel tessellation technique I call ''projected grid''. The basic concept is to project a regular grid into a world-space plane using the inverse camera transform. The working solution is more complex than that though..

Share this post


Link to post
Share on other sites
Nice, I didn''t like preset 6 at first, but if you zoom out, it looks really nice, especially the cubemap reflections. Can you give out more detail on how you acheive this effect? That PDF would be nice, but just a general overview of the technique would suffice. Have you submitted this to any of the conferences? GDC/SigGraph/etc.

Share this post


Link to post
Share on other sites
thanks for the feedback.. I like preset #6 as well..

ngill:
I don''t know exactly what particular effect you''re wondering about, but I assume you are referring to how the surface detail varies with the distance.. Well, thats a property of the projected grid, since it seamlessly scale the tessellation with the distance.

Anyway, I''ve uploaded the PDF now. I''ve been asked to do a proper article about the projected grid tessellation with the assistance of the cg. dept at the university so I''m considering doing just that. This would be published (through siggraph iirc) so we want a shorter, more focused and better researched paper.

Share this post


Link to post
Share on other sites
The Xbox XDK (XBox Developers Kit) comes with a demo that does water this way as well

It uses a grid of screen space polygons that take up the lower half of the screen and uses a vertex shader to project them onto the water plane. (well, vice versa, it projects the water plane texture coordinate to them)

It does look very nice.

I wonder if someone could write a heightmap/ray collision in a vertex shader aand do terrain this way...constant screen space size poly''s would be great.



Waramp.

"Before you insult a man, walk a mile in his shoes.
That way, when you do insult him, you''ll be a mile away, and you''ll have his shoes."

Share this post


Link to post
Share on other sites
"The Xbox XDK (XBox Developers Kit) comes with a demo that does water this way as well"

Is there anyway to get a look at this without being a registered xbox developer? Knowing about related work is a good thing to avoid nasty suprises.

"I wonder if someone could write a heightmap/ray collision in a vertex shader aand do terrain this way...constant screen space size poly''s would be great."

Well, it''s not heightmap/ray-collision but I''m doing heightmap displacement per-vertex. But not on the vertexshader since it doesn''t support texture reads (so it''s done on the CPU instead). I''m actually doing the exact same thing on the pixelshader as well, but only for the normals since we can''t render to vertex-buffers. Having per-vertex displacement means that you''ll need a large guard area (depeding on maximum allowed displacement) since you''ll have to make sure that the entire displaced grid is visible, and not only the original plane.

You could try setting the following parameters to get something similar to landscape rendering (albeit with a water shader):

Noise strength: 280
Noise falloff: 0.45
Noise scale: 0.05
Smooth heightmap: true
Pause animation: true
Projector elevation: 1

This works nice when you''re at high altitudes but the detail get lower the closer to the surface you move. There''s also a swimming artifact that could be dealt with by better filtering. It''s not noticable when animated but if you pause the animation it certainly is.

Anyway, I''m sceptical about ray/heightmap collision since that would make the rendered geometry quantitized to the screen-space grid. So by doing the ray/plane collision instead followed by displacement you avoid this quantitizing (in the direction of displacement at least) but you have to pay for it by rendering a guard area around the plane intersection. I wouldn''t mind combining the benifits of these two methods though!

Share this post


Link to post
Share on other sites
"Is there anyway to get a look at this without being a registered xbox developer? Knowing about related work is a good thing to avoid nasty suprises. "

Alas, I think not. I will ask tho.

Share this post


Link to post
Share on other sites
Looks very good... of course I''m an anal kind of guy so I''ve got two (very minor) complaints. First of all, this would look a bit better if the light reflected and refracted based on the incident angle (i.e. Fresnel coefficients). Secondly, if there''s any way you can attenuate the geometry under the water based on distance, it would also help the realism. Sitting at a 3 degree angle to the water and looking at an island from half a mile away just doesn''t feel right

Share this post


Link to post
Share on other sites
(and your reflections are broken, the most obvious one being the sun''s reflection, but apart from that and what ApochPiQ said, great work, very nice results )

Share this post


Link to post
Share on other sites
Is there any chance a fullscreen build could be set up? I'm wondering what the framerate is like when rendering full-screen, vsync off...

[Edit: whoops, I just realised the source is in the zip. I'll build it myself and report my results.]

[Edit: OK, it seems there's very little difference between performance in Windowed and Fullscreen modes (aside from the extra part of the screen it has to fill). At least 30fps on all presets.]

[edited by - Superpig on March 19, 2004 6:27:29 AM]

Share this post


Link to post
Share on other sites
Nice demo. Looks good on my GF4, except in some cases where water meets land. Can''t wait for PDF.

You should never let your fears become the boundaries of your dreams.

Share this post


Link to post
Share on other sites
Thanks for all the feedback. I''ve fixed a couple of issues and uploaded a new version:

The normalmaps didn''t match the geometry in the R300 implementation. This is now fixed. I''m curious why I havenät bothered to look into this before, as I know it didn''t look entirely correct.. I''ve also changed the gamma of the fresnel lookup texture to be linear. The fresnel effect looks more pronounced this way.. (higly scientific, I know )

The rest of the changes are mostly minor ones, some preset tweaking etc..

cheers,
-claes

Share this post


Link to post
Share on other sites
quote:
Original post by superpig
quote:
Original post by _DarkWIng_
Can''t wait for PDF.
It''s on the page he linked to, at the bottom.

Oh. It''s up already. When I looked before it was just something like: "PDF: comming soon"


You should never let your fears become the boundaries of your dreams.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
The presentation was sweet too.

Congrats to a nice Master thesis.

/Bertil Åkesson e99

(Rats, It seems like have misplaced my login name and password)

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Nice work. But not new. See for example:

http://w3imagis.imag.fr/Publications/2002/HNC02/index.fr.html

Share this post


Link to post
Share on other sites
Very Nice inded! Runs like a charm on my gf3 ti500 and honestly, I didn''t think that anything made today that looks this good would do that, it''s all about pixelshaders now. :-)
Nice going!

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
The new version of the demo runs at half the fps on my gf4ti4400 compared to the old demo. From ~40 fps to ~18 fps and I can''t see any difference. What has been changed?

Share this post


Link to post
Share on other sites