Physics Simulation Forum

 

All times are UTC




Post new topic Reply to topic  [ 7 posts ] 
Author Message
PostPosted: Mon Feb 18, 2013 8:56 am 
Offline

Joined: Sat Aug 18, 2012 2:20 am
Posts: 16
Location: Chennai, India
When I was first introduced to Shaders (in 2008), I felt, wow, thats how real world lights act. Shaders in Rendering, sounds more close to real world light (At least to me).

With this in mind, I was wondering if a Physics shader should be a good idea in future. Developers have to write separate shaders on how the object has to react in the world. For example, we'll have rubber shader, steel shader, rock shader, and sponge shader. As an output these shaders will give the linear velocity, angular velocity and deformed geometry if the object is soft.

Am not sure if physics on GPU is taking this route and am not a expert in this field, am just a game developer and I had this popping in my mind and thought of sharing it here to see how it sounds to others and physics experts.

Edit: Imagine Bullet Physics and other engines will become fixed pipeline engines while the programable pipeline will give the developers complete freedom of writing simple physics engines based on materials.


Top
 Profile  
 
PostPosted: Tue Feb 19, 2013 2:48 am 
Offline

Joined: Tue Sep 01, 2009 4:19 pm
Posts: 20
Shaders are mostly used as a post processing tool. Unless you plan on using it as stability fix or as something that is contained within its own system without affecting other bodies I don't see how it would work. Probably with animations as a kinematic pose changer but i dont know.


Top
 Profile  
 
PostPosted: Tue Feb 19, 2013 4:24 am 
Offline

Joined: Sat Aug 18, 2012 2:20 am
Posts: 16
Location: Chennai, India
If I didn't put my words correct, am trying to guess the future.

1. GPU will soon be redefined as Game Processing Units. They'll take care of both rendering and physics (and AI if I can add).
2. Like Vertex Shader, Geometry shader and Pixel shader, we'll soon have physics shaders (and AI shaders may be).

I am just sharing my dreaming, not predicting or not trying to prove anything.


Top
 Profile  
 
PostPosted: Mon Feb 25, 2013 9:55 pm 
Offline

Joined: Wed May 14, 2008 5:58 am
Posts: 38
The problem with that is that physics is a global phenomenon, so it doesn't lend itself well to massively parallel execution. By contrast, one triangle/pixel renders pretty much the same as another, regardless of what the other elements are doing. There are a few serial elements to rendering, though, but if you notice those aren't the ones set up for shaders.

I could maybe see custom filtering being set up as shader-like programs. Like, for gameplay reasons you want to tweak the normal of a collision between a car and a wall. If physics is happening in a different address space you don't have access to (GPU, SPU, etc.), and the physics engine is continuous, it becomes a tricky problem, and a "physics shader" would be one reasonable approach.


Top
 Profile  
 
PostPosted: Mon Feb 25, 2013 10:23 pm 
Offline

Joined: Sun Jul 03, 2005 4:06 pm
Posts: 807
Location: Bellevue, WA
Quote:
1. GPU will soon be redefined as Game Processing Units. They'll take care of both rendering and physics (and AI if I can add).
2. Like Vertex Shader, Geometry shader and Pixel shader, we'll soon have physics shaders (and AI shaders may be).


Point 1 would mean that the GPU would only use some small percentage of their capacity which could be used by other system, right? In my opinion this is far from true. If I would tell our graphics programmers that I am taking some of their precious shiny pixel time I would get into serious problems :). If you give a graphics programmer more power he will use it. Also graphics and gameplay run often asynchronously.

Saying this, I can imagine that the GPU will be used for more advanced particle effects which are more physics based. I can even imagine basic rigid body effects. Erwin has recently presented some amazing stuff with Bullet here in our office. I could imagine these things to coexist, but I am not seeing one replacing the other.


Top
 Profile  
 
PostPosted: Mon Mar 04, 2013 12:28 pm 
Offline

Joined: Sat Aug 18, 2012 2:20 am
Posts: 16
Location: Chennai, India
Dirk Gregorius wrote:
Point 1 would mean that the GPU would only use some small percentage of their capacity which could be used by other system, right? In my opinion this is far from true. If I would tell our graphics programmers that I am taking some of their precious shiny pixel time I would get into serious problems :). If you give a graphics programmer more power he will use it. Also graphics and gameplay run often asynchronously.

Saying this, I can imagine that the GPU will be used for more advanced particle effects which are more physics based. I can even imagine basic rigid body effects. Erwin has recently presented some amazing stuff with Bullet here in our office. I could imagine these things to coexist, but I am not seeing one replacing the other.


Imagine Physics shaders, something similar to Geometric shaders. You can take advantage of these techniques if the game need more power for a specific purpose. Its just a trade off in using the power for where u need.


Top
 Profile  
 
PostPosted: Wed Mar 06, 2013 4:19 pm 
Offline

Joined: Sun Jul 03, 2005 4:06 pm
Posts: 807
Location: Bellevue, WA
I think that all GPU physics can only be used for visual effects. Imagine you could run all physics in one millisecond (which you cant). It will take three frames until you get the result due to latency. Shared memory might help with this, but you would have to divide the rendering into chunks such that you can interleave physics and graphics. I doubt this will happen. For me all this GPU physics is just a marketing hype by the GPU vendors.

There is really only one important question to answer in this context. Will we get better games with GPU physics? My answer is no. That is why you are not seeing anything in this context.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group