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.

DarkBASIC Professional Discussion / Ok, so this is how 3D model animation works in DBPro?

Author
Message
evil french guy
17
Years of Service
User Offline
Joined: 27th Sep 2008
Location:
Posted: 27th Jul 2012 17:24
I'm a programmer, never worked with 3D models before (just 2D sprites in Java).

From what I'm understanding, in Milkshape you put together and rig your model, then put all your different animations on the 1 timeline. Then in DB, you simply say what frames you want it to loop through. Is that right? Is that just how 3D models are controlled in most APIs?
Juggernaut
14
Years of Service
User Offline
Joined: 12th Mar 2012
Location:
Posted: 27th Jul 2012 20:27
Well in case of Dark Basic Pro - un-fortunately it is that much simple.

If you wan't to taste a more harder path - you may go with DirectX and C++.

Apart from playing frames, you can manually move the bones using code from DB Pro.
evil french guy
17
Years of Service
User Offline
Joined: 27th Sep 2008
Location:
Posted: 27th Jul 2012 20:38
Wow, so you could actually do custom ragdolls with that, couldn't you?
Juggernaut
14
Years of Service
User Offline
Joined: 12th Mar 2012
Location:
Posted: 28th Jul 2012 00:02
By the way - are you really "French" and "Evil" ?
evil french guy
17
Years of Service
User Offline
Joined: 27th Sep 2008
Location:
Posted: 28th Jul 2012 00:53
Why, yes Iam.

I'm actually a villainous game programmer. Not a single good bone in my body.
Juggernaut
14
Years of Service
User Offline
Joined: 12th Mar 2012
Location:
Posted: 28th Jul 2012 16:53
O my Goodness ...! No wonder why you have decided to join the "Dark" side ....

Yes you can do ragdolls with bones and integrated physics (ODE) but I think it will be very tedious. I have no experience in it. Hope some veterans will drop by and write a few lines about how to do it.
evil french guy
17
Years of Service
User Offline
Joined: 27th Sep 2008
Location:
Posted: 28th Jul 2012 17:26
The allure of a "Dark" programming language was too good to refuse. I just assumed I could harness its power and rule the world.

I have another question. How is collision handled here? Does an imported level automatically keep the player from walking through walls? What if I want to check for a collision between object 9 and object 97?
Dar13
18
Years of Service
User Offline
Joined: 12th May 2008
Location: Microsoft VisualStudio 2010 Professional
Posted: 29th Jul 2012 02:47
Quote: "How is collision handled here? Does an imported level automatically keep the player from walking through walls? What if I want to check for a collision between object 9 and object 97?"

Collision is implemented by the programmer. The main libraries implement some basic collision functions, but they are slower than some plugins created by some forum members(Sparky's is the most popular one).

A simple check for collision looks like this:
if object collision(9,97) = 1
//do stuff
endif

evil french guy
17
Years of Service
User Offline
Joined: 27th Sep 2008
Location:
Posted: 29th Jul 2012 03:04
Thanks for the reply.

So, do imported levels get treated as 1 giant, static bounding box for collision? What I mean is, will it detect a collision between my player and my world if I'm anywhere inside my level even if I'm not touching any walls?
Dar13
18
Years of Service
User Offline
Joined: 12th May 2008
Location: Microsoft VisualStudio 2010 Professional
Posted: 29th Jul 2012 18:37
No. I believe the default collision defaults to polygon collision checking(that's part of why it's so much slower than Sparky's). I haven't used the basic collisions in a while though so you'll have to test it out.

Login to post a reply

Server time is: 2026-07-07 12:26:04
Your offset time is: 2026-07-07 12:26:04