Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / dbloopobject() questions-- I need a tutorial....

Author
Message
roujesky
20
Years of Service
User Offline
Joined: 4th Jun 2004
Location:
Posted: 21st Dec 2004 12:09
I own DGSDK and darkmatter 2. I am struggling with dbloopobject and its arguments. How do I use the models from darkmatter in my app? The help shows:

void dbLoopObject ( int iObject, int iStart )
void dbLoopObject ( int iObject, int iStart, int iEnd )

How do I know where iEnd is in a model? Or, if I do not want to start at the very beginning, how do I know the different positions?

Thanx
Stevil
22
Years of Service
User Offline
Joined: 31st Oct 2002
Location: Australia
Posted: 21st Dec 2004 12:28
You need to get a model viewer, a good free one used to be 3D exploration. To be honest I'm not sure if its still free or not, buyt here you can view each frame of an animation. Just go through them all an jot down the the different animations.

I'd also think darkmatter came with a list of these, but I never seen it so I could be wrong.

You Must First Realise Your Limitations Before You Set Your Goals
walaber
21
Years of Service
User Offline
Joined: 22nd Oct 2003
Location: Los Angeles, CA
Posted: 21st Dec 2004 14:16
darkmatter models should have come with a .txt file list of all the animations for each model.

however, the easiest way is to just make a little viewer yourself!

have it display the object frame onscreen, and make it so you can step through the frames by pressing keys on the keyboard.

also if you're using TEXT (not binary) .x files, you can just open them in notepad and find all of the keyframes, down near the bottom in the "animation" section.

Go Go Gadget DBPRO!

Athlon XP 2400+ || DDR-SDRAM 1GB || Nvidia GeForce 4 Ti4200 AGP 8x 128MB
Smithy
19
Years of Service
User Offline
Joined: 8th Dec 2004
Location: Switzerland
Posted: 23rd Dec 2004 00:47 Edited at: 23rd Dec 2004 00:52
Quote: "
walaber:
darkmatter models should have come with a .txt file list of all the animations for each model.
"


I don't own any of the DarkMATTER packages (yet) but I noticed
that the "miko" model that come with the dgSDK samples (used in the "camera" demo) has a >anim.txt<. Unfortunately, therein you will find the keyframes only... but dgSDK commands like dbLoopObject need the "real" frame.

Now, how can you "convert" these keyframes into frames?
(so you can use it with dgSDK without to go trough all the frames)

Or do I miss a point?

DaB


[edit]
btw, I have coded a simple viewer where you can go trough the frames.. along with a cameraclass.
PM me if you would like the code.
(I will post the source to the codebase anyway when the cameraclass is a kind of final)

//Pentium IV 3200E/Prescott; 800Mhz FSB; Hyperthreading; WinXP Pro (!XP2); ATI R9700PRO; 1024MB RAM (2x 512MB "DualChanneled"; VC++; Delphi; ADSL;
Smithy
19
Years of Service
User Offline
Joined: 8th Dec 2004
Location: Switzerland
Posted: 23rd Dec 2004 03:33
"... but dgSDK commands like dbLoopObject need the "real" frame."

I am not sure about that but when I use the numbers provided in the text file.. like 0..59 then it play only a very short sequence of the animation.
I need to play the frames 0..~15000 to get that first animation.

I am a little bit confused now o_O

//Pentium IV 3200E/Prescott; 800Mhz FSB; Hyperthreading; WinXP Pro (!XP2); ATI R9700PRO; 1024MB RAM (2x 512MB "DualChanneled"; VC++; Delphi; ADSL;
roujesky
20
Years of Service
User Offline
Joined: 4th Jun 2004
Location:
Posted: 23rd Dec 2004 11:40
"... but dgSDK commands like dbLoopObject need the "real" frame."


I think you may be on to something. In my code I see the following:

dbLoopObject(2); // appears to work
dbLoopObject(2, 150); //also appears to work
dbLoopObject(2, 150, 650); //does not do anything-- object stands still

the text file that came with my DarkMatter animation states:
000 : Stance
000 - 080 : Idle Posture
080 - 150 : Fidget Animation
150 - 200 : Attack (170 Impact)
200 - 250 : Hurt (220 Impact)
250 - 300 : Block/Dodge (270 Impact)
300 - 350 : Stagger
350 - 400 : Collapse/Die (370 Impact)
450 - 500 : Get Up
450 - 550 : Walk
: 450-470 - Position To Loop
: 470-530 - Looping Walk
: 530-550 - Return To Stance
550 - 650 : Run
: 550-570 - Position To Loop
: 570-630 - Looping Run
: 630-650 - Return To Stance
Cellbloc Studios
20
Years of Service
User Offline
Joined: 15th Mar 2004
Location: Atlanta, GA
Posted: 23rd Dec 2004 11:46 Edited at: 23rd Dec 2004 11:51
Try dbLoopObject(2, 550,650);

P.S.
Which actor are you trying to use?

-This...is my boomstick!
Smithy
19
Years of Service
User Offline
Joined: 8th Dec 2004
Location: Switzerland
Posted: 23rd Dec 2004 14:36 Edited at: 23rd Dec 2004 14:54
I just found this in another thread (about the Dungeon demo).
In the Dungeon Demo, they use something like this:
dbLoopObject ( baddie [ iLoop ].obj , 0 , 80*160 )
So it seems that you have to use a multiplier for some models.

When I am back at home, I will try to multiply the values from the text file.
Hopefully this will do it with the "Miko" model.

(*notes* "add public memberfunction "set/get_fAniMultiply" to the XModel-class")

//Pentium IV 3200E/Prescott; 800Mhz FSB; Hyperthreading; WinXP Pro (!XP2); ATI R9700PRO; 1024MB RAM (2x 512MB "DualChanneled"; VC++; Delphi; ADSL;
roujesky
20
Years of Service
User Offline
Joined: 4th Jun 2004
Location:
Posted: 23rd Dec 2004 23:26
I am using Female Crew.X from DarkMatter 2. I tried your suggestion of trying
dbLoopObject(2, 550, 650);
This did not move the object at all.

Smithy is on to something with his multiplier theory. Modifying my code to:
dbLoopObject(2, 550, 650*80);
caused my object to move, but not the expected running. Looks more like the impact...

Is there any documentation about this anywhere? I bought the book and there does not appear to be anything about this in it either....


I
Cellbloc Studios
20
Years of Service
User Offline
Joined: 15th Mar 2004
Location: Atlanta, GA
Posted: 24th Dec 2004 03:35 Edited at: 24th Dec 2004 03:36
What blows me away, is that I am currently using DGSDK and I have at least 3 animated models moving around right now in my own project. And for the life of me, I am not sure what your problem is (it's not an insult to you, I believe you, but I just don't get what's wrong).

I don't have "DarkMatter 2" but I do have the actors they use (http://www.geo-metricks.com) and I will try with the same actor to help you find your issue.

Hopefully we can solve this problem which has been plaguing you for awhile now.

P.S.
Post the code you are using por favor.

-This...is my boomstick!
roujesky
20
Years of Service
User Offline
Joined: 4th Jun 2004
Location:
Posted: 24th Dec 2004 05:45
Attached is my code.
thanx for the effort. I am convinced that the problem is mine.
roujesky
20
Years of Service
User Offline
Joined: 4th Jun 2004
Location:
Posted: 24th Dec 2004 06:33
Well, I was struggling with how to get an example of my problem. I cannot/will not post one of the DarkMatter object as that will violate my license (and common sense). Instead, I am using the example model (miko) that came with the DGSDK. For my example, I want miko 'Running Slash With Blade (Arc). Only that. Looking at the txt file Anims.txt as (excerpt)follows:

Anims
.
.
214 - 224 : Running Slash With Blade (Arc)
.
.

So my dbLoopObject() call looks like:

dbLoopObject(2,214,244);

When I do this, I get no movement....
Code for this is follows... If you run this app and you see miko run, I am going to do what my mother always wanted and get out of computer business and join a seminary!
roujesky
20
Years of Service
User Offline
Joined: 4th Jun 2004
Location:
Posted: 30th Dec 2004 03:35
I am still confused by what is going on here. Does anyone have any insight as to how to animate a .x object correctly based on the text file supplied with the object?

thanx

Login to post a reply

Server time is: 2024-11-22 14:08:13
Your offset time is: 2024-11-22 14:08:13