News:

One Minute Game Review by The Happy Friar: https://ugetube.com/@OneMinteGameReviews
Also on Rumble: https://rumble.com/c/c-1115371

idTech 4 (aka Doom 3 tech) Discord Server! https://discord.gg/9wtCGHa

Main Menu

Quake 4 red big spider setup

Started by motorsep, April 30, 2015, 11:16:42 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

motorsep

If anyone modded Quake 4, do you know by chance how big red spider is setup ?

I recall player in Quake 4 can collide with individual legs of the spider robot.

It's not possible in Doom 3, as player can not collide with AF bodies on AI, only on ragdolls. So I am trying to deduct what is the difference between Quake 4 and Doom 3 when it comes to player collisions and AI.

Thanks.

solarsplace

Hi

I don't know how the Q4 Spider is set up, but I might be able to give you some ideas on how you could do it.

BTW there is no articulated figure on a living AI to collide with. Although it is pre-loaded it is only spawned when the IA is killed.

Also it is quite easy to change the 'contents flags' of anything in game (via code) to make it behave as you wish.

The player VS AI collisions are typically handled via a bounding box around each AI. It is the projectile collision testing that is typically per-poly unless you disable it with 'use_combat_bbox' see the Guardian.

Idea: What you could try is disabling the clip model ( 'noclipmodel' ) on the AI entity and binding individual pre-sized clip models to the various leg bones of the AI? that sounds like it would work, but I have not tried it. Actually you might be able to bind non-moving solid func_movers to the bones, that way it should push the player out of the way if it was say some huge monster leg walking?

Hope some of that may of been some help.

The Happy Friar

Is the spider that huge robot thing?

In D3 you can.  By default AI & player can't move through bounding boxes to keep collisions simple.  The large monsters (cyber) have a key/value to tell the engine to do per-poly for AI/player collision vs bounding box.  That's how I made it so you can run under my rock monster years ago.

The key/value is "big_monster"/"1"

Solarplace is right, AF only deals with ragdoll situations.

BielBdeLuna

in d3 you can collide with elements with AF models (you can collide with the clawed grapple crane element, which it's not AI but it's AF I think) the idea is that the C++ code activates the ragdoll when the AI dies, maybe you could make so the c++ code activates parts of the AF before the character dies, or even have a different AF for a living character, which in your case could be, have a clipping shell around the body, and then have some clipping shells around the legs and the midle parts of the leg either no-clipping, or have little clipping shells.

somewhat the inverse how the car in the sdk work, it has no-clipping with the player but clips with the environment, the legs should have the inverse. and maybe even be able to squish the player if they land on him, that's some work in the physics folder of the c++ source. but if the player touches the legs once they are planted on ground the player should get pain, and the legs should push the player away with stronger force than the player's own

I don't know how to animate the legs of such creature( because of the changing of topology complexity he could be in) and in order to avoid clipping through the wall legs, and physics errors derived form it, I bet you would need a set of AI scripting just for the legs and navigation really specific for it. obviously for such creature frame animation is very out of the way due physics collisions and the possibility the terrain isn't flat.

motorsep

Thanks for the input guys.

I am gonna have to install Quake 4 to check spider's def. I have a feeling it uses per-poly collisions like THF said. The way attachments work in stock D3 is that they only change their origin based on parent's origin. So if the leg's joint rotates at steep angle, collision attachment (fund_mover as solarplace noted) would not rotate. I believe we fixed that issue already, but I think we'd have to enhance entity def by adding spawnargs for such collision bodies (to specified what collision body def would be attached to what bone). So if Quake4 had the same issue with attachments, I don't think it would have this solution. We'll see after inspecting def for spider robot.

I wonder if AF bodies can rotate with joints they are attached to. AF has a parameter, mod, and the values for it are position, orientation and both. So if that's the case, maybe we can make player collide with AF when AI is alive.

Or maybe instead of doing per poly collisions with render model, we can make it collide with clip model (lower poly copy of the render mesh with collision material, like in ASE/LWO models).

Either way I think each of the options requires C++ code modification to a certain degree.

motorsep

#5
Quote from: The Happy Friar on May 01, 2015, 07:26:18 AM
In D3 you can.  By default AI & player can't move through bounding boxes to keep collisions simple.  The large monsters (cyber) have a key/value to tell the engine to do per-poly for AI/player collision vs bounding box.  That's how I made it so you can run under my rock monster years ago.

The key/value is "big_monster"/"1"

Well, that doesn't work. Here is what Doom 3 comment says: "big_monster"               "1"      // makes his bounding box non-solid to other monsters

I tried it and collisions are gone completely with that.

Also I looked into Quake 4 and it's a mess. Although it looks like they have collision bodies aligned to joints.

EDIT: Problem solved (at least for current purpose): "af_push_moveables"            "1"

The Happy Friar

I was under the impression that's so the AI can "kick" physics objects out of the way vs walk around them.  I'll have to check and see.

BielBdeLuna


The Happy Friar


BielBdeLuna

#9
they can push moveables out of the way: in monster_base::check_blocked() they use a function called "kickObstacles"

defined as:

// kicks any obstacle in the character's path.  pass in $null_entity if you don't have a specific entity to kick.
scriptEvent void kickObstacles( entity kickEnt, float force );


and there's also:

// gets the obstacle in the character's path
scriptEvent entity getObstacle();


all of this in doom_events.script