S
S
s2sk2017-12-09 07:52:57
3D
s2sk, 2017-12-09 07:52:57

How is a single physical-graphical model created?

Hello.
I learned how to work with DirectX C ++, draw 3D models there and all that. Roughly understood how everything works. Now I began to intersect the question - how to attach physics to all this ( I’m not interested in what is already ready, I want to figure out how it works myself)? Driving on cars, animations, collision of objects. And how is the collision of objects loaded into the engine correctly? It turns out that the vertices are loaded in the same way? Well, what if the collision does not match the appearance of the object?
And a little offtopic:
I don’t remember the name of the technology that creates dynamic animations (it is used in GTA4, GTA5 and a couple of other games), the only thing is that “a couple more games”. Why so few games use it? After all, this gives the game realism. Is it really that difficult to implement? And why can't large companies implement their own such technology, but buy it from others?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
E
Evgeny Shatunov, 2017-12-09
@s2sk

And why can't large companies implement their own such technology, but buy it from others?

If the company is cool, it, like a thinking organism, will perfectly understand what it is reasonable to spend time on and what not.
Let's face it, with "a couple more games" you slightly missed, because Morpheme and Euphoria from Natural Motion are not used in a couple of just games. The full list of games is not disclosed and cannot be disclosed for simple reasons of its scale. This is a very common and very powerful tool.
These are architectural questions. The solution very much depends on how you have built a mathematical model of the world. Mat. the model produces a connection in principle of all components of the world among themselves.
To reduce the complexity of operations, the collision mesh is often made more sparse than the mesh of the graphical model. It happens that this does not affect the appearance of the model. Sometimes it has a big effect. In its form, the collision model very often and very much differs from the graphic one.
Often, collision and physics models are represented by different subsystems and work with different data for the same graphical object. This is done in order to calculate physics on simpler models, and calculate more delicate moments after confirming physical contact and using more detailed data about the object.
You should think of the scene as a set of parallel spaces. One space you see. Other - you can only touch. The third space is only felt as a set of forces acting on you. There are many more such spaces, some of them are completely inaccessible to normal representation.
The animation space has nothing to do with the graphics space, but indirectly affects the deformation of the object in the graphics space. The thing is that there can be several animation spaces. Physical space can affect animations, this connection is better to separate into a separate space with its own rules.
All spaces endow the object with their properties due to the work of the mat. world models.
More details can be found in the relevant sources . Need section: "Game engine development".
Some of these books are in Russian translation.

G
Griboks, 2017-12-09
@Griboks

The physics engine has nothing to do with the graphics engine. Two different programs. Even the objects themselves interact through colliders, not through meshes.
Physics is done according to simplified scientific laws (f=am, x=x0+v0t+at^2/2).

A
Alexander Skusnov, 2017-12-09
@AlexSku

1) NVidia has a PhysX
library 2) Matlab (Simulink) has a 3D Animation (3D editor) to which you can bind physics (many examples)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question