Jump to content
The Dark Mod Forums

Physics Concern


Recommended Posts

In thief 1/2 when you run and jump into a square window on a wall, you sort of sit there ducked. You can't crouch or lean into or enter the building - you can only jump off. The window is clearly large enough to enter - in real life. Are such artefacts absent in darkmod? And I'll presume here that I can recode the physics part of the distribution to include some of my engineering knowledge and release my missions with "upgraded" physics...

Link to comment
Share on other sites

In thief 1/2 when you run and jump into a square window on a wall, you sort of sit there ducked. You can't crouch or lean into or enter the building - you can only jump off. The window is clearly large enough to enter - in real life. Are such artefacts absent in darkmod?

 

We're not really far enough along to say what types of problems we'll run into in that regard but since Dark Mod is in a different game engine, it probably won't be a problem.

 

And I'll presume here that I can recode the physics part of the distribution to include some of my engineering knowledge and release my missions with "upgraded" physics...

 

Yes, I believe iD supplies the physics code with the SDK. You should then be able to upgrade the physics.

Link to comment
Share on other sites

The physics engine is fully contained in the SDK, which means you can exchange it with any other engine. Of course you must keep in mind compatibillity, so this is not a small task. Since the code is not clearly seperated, because it is not an API, it will be a lot of work. There is a commercial-free physics engine (I think Nova or something I would have to look it up) where they said they already included their engine into Doom 3, so it definitely can be done. The question is wether it is worth it because from what we have seen so far the original engine looks not so bad.

You shouldn't compare it with the things you see in Doom 3 the game, because it sucked. But there are clearely some problems in this egnine. There is an example of bricks stacked up and when you kick out one of the lower ones, the upper ones fall down one after another. This is not really important though unless you plan to build a stacking map. :) MOst of the time it looks ok though. If you enhance the physics, we would certainly be happy if you would share the code though.

Gerhard

Link to comment
Share on other sites

It seems like this problem is inherent to how the physics system considers the player as a sliding box. If I understand you right, you're talking about what happens when the box is sliding along a ledge and hits something that sticks out, and you want to take into account the fact that a human can bend around stuff like that.

 

So you're going to have to catch that situation somehow and then deviate from the "player is box" model (or just move the view camera around appropriately to fake it). That seems hard to do reliably without some sort of wall climbing mode.

 

Anyway, like Spar said, the physics is mostly in the SDK, so yeah you can customize it. Good luck. :)

Link to comment
Share on other sites

This is not really important though unless you plan to build a stacking map. :)

Yes, stacking crates is a very integral part of the thief experience.

 

 

MOst of the time it looks ok though. If you enhance the physics, we would certainly be happy if you would share the code though.

Sharing of resources for mission is without question... First of course there must come a time when I have a few weeks free.

Link to comment
Share on other sites

Do you mean to say that a mission without stacked crates wouldn't be part of the Thief experience? I'm sure I could manage to make a decent map without stacked crates with perfect physics... Crates are such a cliche in FPS games...

Link to comment
Share on other sites

I think it was Domarius who posted this first, but a repost seems appropriate:

 

The Crate Review System

http://www.oldmanmurray.com/features/39.html

 

On a more serious note, I can think of two ways to do what you're trying to do. First of all, you'd have to detect if the player is moving forward and hits something in front of them. This is pretty easy and D3 already does this for a lot of things, although using the "box" model of the player.

 

Here's one possible idea: use lean to get around stuff, either automatically or manually.

 

Auto:

-Check if the player would still collide with something in front of them if they were leaned to either the left or the right.

 

-If this would result in passage foward, automatically lean the player in that direction and continue the forward motion of the feet, but lean the body away from the obstruction.

 

Manual: Same thing but the player leans themselves instead of having it done automatically.

 

Possible Implementation

The current implementation of leaning does bend the player model at the waist, and it looks exactly right in 3rd person debug mode. However, D3 uses a Z axis aligned bounding box for movement collision tests. This box doesn't change in a helpful manner when a lean occurs (it's the smallest box that encloses the player and is always oriented to Z, so if their feet don't move, all the box will do is stretch in the direction of the lean, it won't move away from the side opposite the lean).

 

To make what you want work, you would need to incorporate leaning into the movement collision test. Two ways of doing this come to mind:

 

1. It's possible to force a per-poly collision test with the player model. D3 does this when projectiles, like arrows, are shot at AI and the player. As-is though, this is not done for moving into things, that's still sliding box.

 

So option #1 would be to force per-poly collision after the simplified box bumps something in front of it and the player is still trying to go forward. The lean functionality we have already tilts the player model at the waist, so a per-poly collision with the player model would let the player pass by the obstruction if leaning away from the object would in fact clear it.

 

This option seems like it could be rather expensive though.

 

2. Modify the player collision model so that instead of a box, it's an articulated figure (AF), say two cubes that are allowed to clip eachother, connected by a joint at the waist that bends appropriately when the player leans. This model could be swapped in only when lean is active. Personally I prefer this option over #1 (forcing a per-poly movement collision test).

Link to comment
Share on other sites

Yes, stacking crates is a very integral part of the thief experience.

Sharing of resources for mission is without question... First of course there must come a time when I have a few weeks free.

 

Apparently you didn't read what I wrote. I said that the physical correct falling is NOT an integral part of the game, because it doesn't matter wether the topmost crate falls at the same time as the first one, as long as it falls at all.

Gerhard

Link to comment
Share on other sites

Do you mean to say that a mission without stacked crates wouldn't be part of the Thief experience? I'm sure I could manage to make a decent map without stacked crates with perfect physics... Crates are such a cliche in FPS games...

 

You shouldn't read every second sentence. I said that the crates will not fall physically correct if they are stacked up, AND THIS IS WHAT IS NOT IMPORTANT TO THE GAMEPLAY.

Gerhard

Link to comment
Share on other sites

Sounds okay to me.

 

The bounding box shouldn't be a problem unless there is Tclassic style wierdness. I.e. you cannot get though those small basement entrance windows (Think 1st bank and trust) if you catch it on the upswing of Garret's movement. Odd. Just make it simple and it should work with specific sizes of gaps fine. Tclassic was just a bit odd with this.

Link to comment
Share on other sites

sparhawk, don't be too snappy. We all understood what you said about the physics regarding crates. What I meant when I said that stacking crates is very important in thief was humour in reply to "unless you are planning to build a stacking level". It's just that the crates were ever-present in most levels before and some people have gotten very adept at it.

Link to comment
Share on other sites

@bob: I meant in the D3 engine in my response. I think I know what you're talking about in the Dark engine, it seems like the bob due to footsteps actually effected collision physics sometimes. I was saying that in D3 this is not the case, unless we specifically code it that way.

Link to comment
Share on other sites

If you stack several objects and you remove the bottom, all of them should immediatly start to fall. They don't they are falling one after another, as if the pull of gravity is propagated upwards. There is even a testmap in the regular D3 install that you can try to see this in action.

Gerhard

Link to comment
Share on other sites

Yeah, that problem has to do with how objects are activated/deactivated. You could force everything to be active all the time, and have a fine working FDTD mechanics system, but the performance would suck, so D3 deactivates things in certain situations. Some of the situations are ones in which they really should be active. :)

 

It may be possible to fix those with a little effort.

Link to comment
Share on other sites

I think everything should be active at all times, and scenarios should exploit that feature. Furthermore, Since gamers already shell out $300 for a decent video card to run D3 and stuff, they could just buy an additional physics card. Can't remember the name of the company at the moment...

 

Another thing that I've been thinking about for the last few months. What is the measurement system? The dromed units were ok for making imaginary missions but will it be possible to use metres, feet, radians, degrees, etc? The plan: go around {victoria college, trinity college, the protestant church on bloor and university, etc...} with a measuring tape and a photo camera recording all dimensions and textures, and then re-create that exactly in DM. Or, go around {same set} with a mini-sonar sensor and a digital camera connected to a pda or a laptop with appropriate software and very quickly copy the building into DM and then file off some corners, stretch somethings, and otherwise optimize the polygons. Without having normal measurement dimensions in dromed it was rather hard to re-create houses. Since the sound propagation was shortened in distance to compensate for the wide-angle rendering view I suppose that everything is natively in metres and this question is redundant.

Edited by Order of the Hammer Bureaucrat
Link to comment
Share on other sites

Hammer, it is ageia or some such thing, just search for physics car dyou will find it.

 

AND IT WILL NOT WORK.

 

Yes that is correct, it is in the wonderful position of catch-22. It will only work with novedex physics engine, and that is not what is in HL2, or what is in D3 since D3 has their own physics engine.

 

Someone would have to recode the entire physics engine to make it work.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recent Status Updates

    • Petike the Taffer

      I've finally managed to log in to The Dark Mod Wiki. I'm back in the saddle and before the holidays start in full, I'll be adding a few new FM articles and doing other updates. Written in Stone is already done.
      · 1 reply
    • nbohr1more

      TDM 15th Anniversary Contest is now active! Please declare your participation: https://forums.thedarkmod.com/index.php?/topic/22413-the-dark-mod-15th-anniversary-contest-entry-thread/
       
      · 0 replies
    • JackFarmer

      @TheUnbeholden
      You cannot receive PMs. Could you please be so kind and check your mailbox if it is full (or maybe you switched off the function)?
      · 1 reply
    • OrbWeaver

      I like the new frob highlight but it would nice if it was less "flickery" while moving over objects (especially barred metal doors).
      · 4 replies
    • nbohr1more

      Please vote in the 15th Anniversary Contest Theme Poll
       
      · 0 replies
×
×
  • Create New...