Jump to content
  • Advertisement
Sign in to follow this  
sciquaker

subdivision surface rendering through pipeline?

This topic is 4010 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi everybody, I'm a graduate sutdent in China. My research topic is accelerating subdivision surface rendering quality and speed by multi-core CPU and GPU shaders(with textures).But I'm not quite clear about the whole detailed procedures have been taken during rendering? Does it has any difference compared with built-in primitives? I plan to implement my results on opengl for game developments. Thanks for your answers :)

Share this post


Link to post
Share on other sites
Advertisement
Basically you just have to iteratively subdivide each mesh some finite number of times before rendering. You'd have to do the subdivision on the CPU...then you just render as normal. I can't think how any shaders would be useful...

Share this post


Link to post
Share on other sites
Thanks for your answer!

The calculation of subdivision is topology locally, so it will be faster when compute it by fragment shaders(mesh stored in texture, and multiple faces can be computed at the same time).

Share this post


Link to post
Share on other sites
Ok theoretically I see that if you pass the mesh in as a 3D texture or something you could compute the subdivision locally, but...first of all you cannot change the profile of the object. Normally when you do subdiv surface and start with a cube, you end up with a sphere, so changing the profile is important. Also, although it is "local", that region of locality is going to grow with each subdivision...and its local based on neighboring VERTICES not pixels, so your region of influence could be hundreds of pixels

Share this post


Link to post
Share on other sites
Quote:
Original post by sciquaker
My research topic is accelerating subdivision surface rendering quality and speed by multi-core CPU and GPU shaders(with textures).But I'm not quite clear about the whole detailed procedures have been taken during rendering?

Keep in mind that you cannot create new faces or modify topology directly on the GPU unless you use geometry shaders (GS). These are usually the best option for things like parametric surfaces, as they allow on the fly topology access, and do not require multiple passes. However, they're only available on SM4 cards, and they're still quite slow right now.

If GS are no option, then it gets tricky. You won't be able to do it completely without CPU intervention, but you can try to minimize it as far as possible. Look into render-to-vertex-array functionality (which allows you to render into vertex data streams without going over the CPU) or vertex texture access.

Quote:
Original post by sciquaker
Does it has any difference compared with built-in primitives?

Of course, especially the version without GS is completely different from rendering 'standard' primitives.

Share this post


Link to post
Share on other sites
Subdivision is used to get smooth surface from a coarest mesh with less faces than other smooth surface representation methods.Even this,a practical coarest mesh may also has thousands of faces or even more.The subdivision operations on it make it become smooth, and the change of the whole model profile is not as that tremendous as on a single cube. With less storage requirement but also getting smooth surface is just what we want in game, right?

For a single vertex, the corresponding vertices for once evaluation is its 2-ring vertices, that is the locality.When evaluating, we only concern the 2-ring to get new vertex not the topology between them.So the number of neighboring vertices is not that large (it's constant with regard to the valence of the contral vertex).

The question is the evaluation is not fast enough.This is an active research topic now, and there are many papers on it,some on CPU while some on GPU.That is what I'm working on...

Share this post


Link to post
Share on other sites
Quote:
Original post by Yann L
You won't be able to do it completely without CPU intervention, but you can try to minimize it as far as possible. Look into render-to-vertex-array functionality (which allows you to render into vertex data streams without going over the CPU) or vertex texture access.

Of course, especially the version without GS is completely different from rendering 'standard' primitives.


Thanks for your advice!
I also think GS described in shader model 4.0 might be quite useful for my topic. The data transfer costs are the bottleneck that I must pay attention to. There is no paper using GS on this topic I've found till now.Maybe it's a good chance for me :)

Share this post


Link to post
Share on other sites
Quote:
Original post by sciquaker
With less storage requirement but also getting smooth surface is just what we want in game, right?


But you can already make a blocky object look smooth on the inside by using a normal map

Share this post


Link to post
Share on other sites
There is a chapter in GPU Gems 2 which describes one method of using the GPU to do subdivision of catmull-clark surfaces with displacement mapping and adaptive tessellation, you can downlaod the program and souce here. This method does not work correctly with n-gons, another paper which apparently does not have this limitation is A realtime GPU subdivision kernel but there seems to be no program or source code available.

Some sub-d schemes do not require modifications larger then the 1-ring like catmull-clark, which scheme are you looking at?

Share this post


Link to post
Share on other sites
Quote:
Original post by snk_kid
Some sub-d schemes do not require modifications larger then the 1-ring like catmull-clark, which scheme are you looking at?


I have read these two papers too. :)
I'm working on C-C subdivision right now. A central vertex with its "2-ring" was a path used in "A Realtime GPU Subdivision Kernel". I'm sorry for not giving a explicit description of that applied issue.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!