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

Create new af decl

Started by bitterman, November 09, 2017, 07:30:28 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

bitterman

Is it a bug when game is crashes after try to create new af decl via "New" button in EditAFs?

How to create new af decl by other way?

Thanks.

argoon

I don't know if his a bug or why it crash's, but about doing af any other way, what you can do is, instead of clicking "New" af file, just open a existent generic af file, like the one below and change it to reflect your new af, in that way you don't need to ever click "New".


/*
File generated by the Articulated Figure Editor
Do not edit this file but launch the game and type 'editAFs' on the console.
*/

articulatedFigure default {

settings {
model ""
skin ""
friction 0.0099999998, 0.0099999998, 0.8000000119, 0.5
suspendSpeed 20, 30, 40, 60
noMoveTime 1
noMoveTranslation 10
noMoveRotation 10
maxMoveTime -1
totalMass -1
contents corpse
clipMask solid, corpse
selfCollision 1
}

body "body" {
joint "origin"
mod orientation
model box( ( -10, -10, -10 ), ( 10, 10, 10 ) )
origin ( 0, 0, 0 )
density 0.200000003
friction 0.0099999998, 0.0099999998, 0.8000000119
contents corpse
clipMask solid, corpse
selfCollision 1
containedJoints "*origin"
}

}

The Happy Friar

The af editor is full of crashing bugs.  I never had it crash when I selected new, but it crashes at seemingly random things.

bitterman

Thanks guys.

I created custom af decl but get a strange problem. Look at pics below please.

It's a primitime md5 model with few bones (origin, Bone1, Bone2, end) and primitive af decl with only two bodies.

Problem is: when I touched "bone_one" body (via 'drag entity' checkbox or g_dragEntity) it indicated "bone_one". When I touches "bone_two" body it also indicated "bone_one" and seems like drag point is pined to origin (not to choosed bone).

For vanilla af decls and models (e.g. env_gib_leftarm) bodies indicate and drag poins works right.



/*
Generated by the Articulated Figure Editor.
Do not edit directly but launch the game and type 'editAFs' on the console.
*/

articulatedFigure af_rect {

settings {
model "model_rect"
skin ""
friction 0.0099999998, 0.0099999998, 0.8000000119, 0.5
suspendSpeed 20, 30, 40, 60
noMoveTime 1
noMoveTranslation 10
noMoveRotation 10
minMoveTime -1
maxMoveTime -1
totalMass 80
contents corpse
clipMask solid, corpse
selfCollision 1
}

body "body_one" {
joint "origin"
mod orientation
model bone( joint( "origin" ), joint( "Bone2" ), 4 )
origin bonecenter( "origin", "Bone2" )
density 0.200000003
friction 0.0099999998, 0.0099999998, 0.8000000119
contents corpse
clipMask solid, corpse
selfCollision 1
containedJoints "*origin -*Bone2"
}

body "body_two" {
joint "Bone2"
mod orientation
model bone( joint( "Bone2" ), joint( "end" ), 5 )
origin bonecenter( "Bone2", "end" )
density 0.200000003
friction 0.0099999998, 0.0099999998, 0.8000000119
contents corpse
clipMask solid, corpse
selfCollision 1
containedJoints "*Bone2"
}

hinge "constr" {
body1 "body_one"
body2 "body_two"
anchor ( 0, 0, 16 )
axis bonedir( "Bone1", "Bone2" )
friction 0.5
limit 45, 0, 0
}

}


The Happy Friar

Quote from: bitterman on November 10, 2017, 09:01:52 PM
Problem is: when I touched "bone_one" body (via 'drag entity' checkbox or g_dragEntity) it indicated "bone_one". When I touches "bone_two" body it also indicated "bone_one" and seems like drag point is pined to origin (not to choosed bone).

You say "bone_one"  but you outlined "body_one" in the pictures.  Did you mean "body_one"?

The Happy Friar

For body_one, wouldn't you want bone1 to bone2, not origin to bone2?

bitterman

#6
Yes, my fault. It must be writed as "body_one".

Looks like it's a floating bug or some mess with vertex groups when exporting. I reassembled same model based on vanilla model and bug is gone.

And perhaps there bug occured when we create new af decl by substitution method as described argoon.

About bones which contained body: as I see the body started from one bone (origin) to second (Bone2). If not then red octahedron looks like dot. But Bone2 is excluded from containedJoints for this body and includeg for next body.

It's quite not clear how the bones is drawing in Blender and D3 engine and how it corresponds to joint (in D3 term). It seems like that the tricolor coordinate system in D3 corresponds to the root of the bone in Blender. Then body_one is stretched from root of origin to root of Bone2 (which in same time is the tip of Bone1).

https://docs.blender.org/manual/en/dev/rigging/armatures/bones/structure.html

Thanks for attention, THF!