Archived

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

shaft

real tim spline and patch rendering?

Recommended Posts

just curious, has anyone done any real time patch based rendering? Patches are great, and I think most cards have hardware support for them. just wondering if anyone has had any experience, good or bad, with this technique? I mean how much slower can it be to tesselate a patch, than it is to deal directly with triangles. Patches have speed ups when you consider bones, and deformation factors (you only have control points, not triangles to deform). When I get back to america I will time test things for myself, but I thought I would ask if anyone has had any good results with this.

Share this post


Link to post
Share on other sites
I haven''t used them myself, but as far as I know only few cards support them. My Laptop''s GeForce4 Go 440 doesn''t support them, for example, and that''s pretty recent. (it''s basically very much like a GeForce2, but a bit faster) I''m suspecting that once again only GF3/4 and Radeon 8500 support it, and probably the Parhelia. Anyway, that might be the reason why they aren''t really popular yet. I suggest checking out nVidia developer docs as well as the various SDKs (DX, ATI Radeon, nVidia) for more information on them.

- hillip@xenoage.de''>JQ
Full Speed Games. Period.

Share this post


Link to post
Share on other sites
That's right, spline surfaces are hardware accelerated from GF3 on. I have done some experimental stuff using them, but it never really went further than that. They are quite efficient, but too restricted IMO. I'll wait for general availibility of hardware displacement mapping instead (such as on the Matrox Parhelia). Until then, I use normal trimesh geometry I tesselate myself. But depending on your specific application, hardware spline surfaces could prove useful.

quote:

I mean how much slower can it be to tesselate a patch, than it is to deal directly with triangles. Patches have speed ups when you consider bones, and deformation factors (you only have control points, not triangles to deform).


But you can do bone deformation of vertices on the GPU using vertex shaders, that's pretty efficient. However, you can't do that with spline surfaces (the control points are not processed by the vertex pipeline). So you'll end up doing your deformation computations on the CPU.

/ Yann

[edited by - Yann L on August 12, 2002 1:44:36 PM]

Share this post


Link to post
Share on other sites
I admit to knowing extremely little about vertex shaders, but I understand that the 2.0 standard will allow flow modifiers like goto statements and loops. Given that the spline calculations are fairly simple, would it still be impossible to calculate the spline values with the graphics hardware?

Share this post


Link to post
Share on other sites
quote:
Original post by Mordoch Bob
I admit to knowing extremely little about vertex shaders, but I understand that the 2.0 standard will allow flow modifiers like goto statements and loops. Given that the spline calculations are fairly simple, would it still be impossible to calculate the spline values with the graphics hardware?


You can''t create vertices in a vertex shader, they have to be created somewhere else. Either you already have a mesh (and that would defeat the purpose of the patch rendering), or you have your hardware creating it for you, using the onboard hardware tesselators. That''s what the GF3+ does. But since the tesselator''s position in the pipeline is before the vertex shader module, you can''t process the input to the tesselator (the control points) through a vertex program.

Although you can process it''s output (the final tesselated patch), so you could create your own spline tesselator using a complex VP and a planar tesselator. That would even work on GF3+ without loop statements, but the performance won''t be very good.

/ Yann

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
If you don''t have a geforce3/4 (decent 4, NVidia cheated the world with their naming scam) or want your code to run on a wider range of computers, then you''ll have to do it in software. Many think that doing curved surfaces is far too expensive but that is not intirely true, it can be done quite efficiently and it was done in Quake III (but I don''t know what kind of curved surfaces they used, so I''m not going to reference them). The calculations for every point cost a bit, but if you don''t create too many points every frame then your safe... But coding a decent tesselation algorithm can be daunting...

Share this post


Link to post
Share on other sites
Hmmm... Thanks for the input. I think I need to write a list of pros and cons of vertex shaders vs. patches. Compare what I can create quickly, and still have some "cool" effects.

I''m not really doing anything that graphically intesive, but if you aren''t learning something new, then you are wasting your own time .

Thanks again.
-Shaft (He''s a bad motha... Shut yo mouth)

Share this post


Link to post
Share on other sites