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 / Find Vertext in Model, then transform to 3d world space position - How? You know?

Author
Message
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 9th Nov 2011 00:39
Hello folks,

Been awhile.. I'm messing with DarkGDK again and I have that Character Pro Shop thing - it can make animated models.. EXCEPT
there are not any LIMBS! it's all animated mesh.

Problem? I can make the GUN look decent in the hands - cuz the guy is always breathing (lol) ...

Does anyone know how to grab a vertex in a model and find where it is in 3d Space? Take into account that the vert tecgnically moves during animation - I'm trying to grab on to that.

I figure I figure out the vertex I specifically need with a tool to iterate through the model with a "cursor" of some sort.

Thank you (B^)>

Hawkblood
14
Years of Service
User Offline
Joined: 5th Dec 2009
Location:
Posted: 9th Nov 2011 04:37
You can make a dummy object that is attached to the main mesh but is invisible in your game. This object will be considered a limb to DGDK. Do a check for limbs and set that limb's transparency to 100% and you can glue your sword/gun to that and it will move with your skinned mesh.

The fastest code is the code never written.
WLGfx
16
Years of Service
User Offline
Joined: 1st Nov 2007
Location: NW United Kingdom
Posted: 9th Nov 2011 10:43
I do know that in DBPro you can lock the vertex data and then read and write the vertices and indices. So yes, as long as you know which vertex you are reading then you can get it's coordinates, normals, etc info from the model. Plus, these vertex manipulation functions are standard to DBPro...

Mental arithmetic? Me? (That's for computers) I can't subtract a fart from a plate of beans!
Warning! May contain Nuts!
Hawkblood
14
Years of Service
User Offline
Joined: 5th Dec 2009
Location:
Posted: 9th Nov 2011 18:27
Locking vertex data takes the mesh out of the processing pipeline. This will slow down the game if you are going to do it each frame.

The fastest code is the code never written.
WLGfx
16
Years of Service
User Offline
Joined: 1st Nov 2007
Location: NW United Kingdom
Posted: 9th Nov 2011 20:48
The standard lock vertex function call copies all the data to a separate buffer first and then copies it all back when it's unlocked. By not using a buffer you should shave some time used off your running time.

Mental arithmetic? Me? (That's for computers) I can't subtract a fart from a plate of beans!
Warning! May contain Nuts!
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 10th Nov 2011 18:04
Wow - thankx for the responses - this is a pickle (didn't get emails Or I would have responded sooner - I musta shut them off even though I checked "send me replies via email )

Ok.. The whole vertex lock thing each loop I appreciate (which would stink - There goes old character shop pro out the door - no limbs!) Real bummer - fortunately a buddy of mine is making a "proxy" with all the animations I am looking for, limbed so this problem hopefully goes away

(MAN we have issues trying to convert models with animation to DirectX format - is there any exporter that is DECENT?)

Blender one - not reliable to date - fingers crossed for update.

Also, the vertex locking and getting the VERTEX x,y,z is not the X,Y,Z of world space - its the relative offset from the 0,0,0 position set within the model (generally by the the modelling software or whatever was used to make a mesh)

So - thank you for the input - and I'm glad you two validated my lines of though: Lock, vertex hunt (calc world space location - thread question bit), then place Gun or something there each iteration - workable but speed impact VERY likely - add multiple models with same issue - AAHHHHH

Thank you for your responses - Hopefully my modelling guru buddy can come to the rescue - (again converting 3ds models and animations to DirectX format for DBPRO has been another thorn)

Hawkblood
14
Years of Service
User Offline
Joined: 5th Dec 2009
Location:
Posted: 10th Nov 2011 23:00
DGDK can load .3DS files to include animations. If you like, you can convert it to .DBO when you save it using dbSaveObject(..). This is usually smaller than .3DS.

The only exporter I use is PandaSoft for 3dsMax.

The fastest code is the code never written.
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 10th Nov 2011 23:19
suwww---wheeetttttt !!!!

How that escaped me - THANK YOU! Simply didn't know!

Login to post a reply

Server time is: 2024-10-02 21:39:42
Your offset time is: 2024-10-02 21:39:42