Author Topic: Create new af decl  (Read 639 times)

0 Members and 1 Guest are viewing this topic.

bitterman

  • Sr. Member
  • ****
  • Posts: 309
  • Karma: +8/-5
  • Doom Newbie
    • View Profile
Create new af decl
« on: November 09, 2017, 07:30:28 AM »
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.
« Last Edit: November 09, 2017, 07:32:09 AM by bitterman »

argoon

  • Sr. Member
  • ****
  • Posts: 275
  • Karma: +21/-81
  • Doom Newbie
    • View Profile
Re: Create new af decl
« Reply #1 on: November 09, 2017, 10:14:20 AM »
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".

Code: [Select]
/*
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

  • Happy Happy Joy Joy
  • Administrator
  • Hero Member
  • *****
  • Posts: 897
  • Karma: +42/-4
  • Semi-Newbie.
    • View Profile
    • EarthQuake
Re: Create new af decl
« Reply #2 on: November 09, 2017, 11:05:04 PM »
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

  • Sr. Member
  • ****
  • Posts: 309
  • Karma: +8/-5
  • Doom Newbie
    • View Profile
Re: Create new af decl
« Reply #3 on: November 10, 2017, 09:01:52 PM »
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.

Code: [Select]

/*
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

  • Happy Happy Joy Joy
  • Administrator
  • Hero Member
  • *****
  • Posts: 897
  • Karma: +42/-4
  • Semi-Newbie.
    • View Profile
    • EarthQuake
Re: Create new af decl
« Reply #4 on: November 11, 2017, 06:06:19 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

  • Happy Happy Joy Joy
  • Administrator
  • Hero Member
  • *****
  • Posts: 897
  • Karma: +42/-4
  • Semi-Newbie.
    • View Profile
    • EarthQuake
Re: Create new af decl
« Reply #5 on: November 12, 2017, 12:13:26 AM »
For body_one, wouldn't you want bone1 to bone2, not origin to bone2?

bitterman

  • Sr. Member
  • ****
  • Posts: 309
  • Karma: +8/-5
  • Doom Newbie
    • View Profile
Re: Create new af decl
« Reply #6 on: November 12, 2017, 09:13:58 AM »
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!
« Last Edit: November 12, 2017, 10:04:44 AM by bitterman »