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.

Newcomers DBPro Corner / 3D Basics?

Author
Message
j enigk
20
Years of Service
User Offline
Joined: 6th Mar 2004
Location: Boston
Posted: 3rd Mar 2008 07:25
So, I'm not completely new to DB, I've been playing around with it off and on for a long time. I went through the Beginner's Guide, and I really enjoyed it, it presented everything very well, and applied it every step of the way. Until it got to 3D, unfortunately, where it fell off. I understand that it's a beginner's guide, so now I need an intermediate, and it doesn't seem to exist..

So my question is: Does anyone have a tutorial for basic 3D programming? I'm having trouble loading 3D objects (.3DS and even .X), and getting them to play animations. Any tutorial that has those things would be incredibly helpful. Thanks.
Paul08
16
Years of Service
User Offline
Joined: 20th Feb 2008
Location: Oxford, UK
Posted: 3rd Mar 2008 12:58
Hey,
Why dont you put a little code snippit on here to show us what your trying at the moment, then maybe someone can give you some advice on what you already have?

I've found (with my couple of weeks of experience with db):
dont read too far into a command, it does what i says on the tin in most cases.

So if you have a .x file with animation data in it:


that works for me - you might want to have a play

Paul
j enigk
20
Years of Service
User Offline
Joined: 6th Mar 2004
Location: Boston
Posted: 3rd Mar 2008 17:38
Okay, so I downloaded a tutorial with a .x model, and it worked perfectly. And I noticed that when I opened it up with notepad, it looked very different from my exported models. I don't know if that has anything to do with it, but either way, my models aren't working but this one does. I suppose it's off to the 3D chat with me.

But while I'm here, I may as well go with what I have so far. With the jeep model (the only one that works), I wanted to make it so when I held a button, the animation played, and it moved - as you would do for a character walking, my first goal in this. Here is what I have so far.



I tried it outside the loop at first, but it didn't do anything. Now it only moves the first time, and the animation doesn't stop when you lift the key. I figure it's a basic concept, but if you need me to upload the model, I can. Thanks.
TDK
Retired Moderator
22
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 3rd Mar 2008 19:50 Edited at: 3rd Mar 2008 19:50
Quote: "my models aren't working but this one does"


In what way are they not working? Error messages? Just can't see the loaded model? - in which case they may just need scaling.

Quote: "And I noticed that when I opened it up with notepad, it looked very different from my exported models."


.X files can be saved in ASCII format as well as BIN files and can look a lot different.



Loop Object starts the animation. I suggest adding an Else and Stop Object.

TDK_Man

DB PROgrammer
17
Years of Service
User Offline
Joined: 9th Feb 2007
Location: Nowhere But Everywhere
Posted: 3rd Mar 2008 22:10
Quote: "my models aren't working but this one does"


What program are you using to make them?


I'm Pro grammer.
j enigk
20
Years of Service
User Offline
Joined: 6th Mar 2004
Location: Boston
Posted: 4th Mar 2008 06:42
TDK:

Thanks, I hadn't thought about scaling. They are not showing up at all. I'll also add the else and stop functions, thanks.

DB P:

A friend made them in 3D Max. I found a plugin that will export them to .X, but it's a 3rd party plugin, so I wasn't expecting perfection really. I also tried exporting a simple box from blender, and have not had luck with that yet either. Though, as TDK said, it might be the scaling, so I'll be checking that next.
Paul08
16
Years of Service
User Offline
Joined: 20th Feb 2008
Location: Oxford, UK
Posted: 4th Mar 2008 19:34
another thing i do is setup some if statements to move the camera about so i can find my objects - im not clever enough to just know what coordinates will appear where.

just a side note, theres an application i found that converts .3ds files to .dbo files (darkbasic objects (dbo) load rapidly which is good)

let us know how you get on

Paul
j enigk
20
Years of Service
User Offline
Joined: 6th Mar 2004
Location: Boston
Posted: 5th Mar 2008 04:12
Quote: "theres an application i found that converts .3ds files to .dbo files"


That sounds wonderful, I assume someone has posted in the 3D thread somewhere? Definitely interested in that.
Paul08
16
Years of Service
User Offline
Joined: 20th Feb 2008
Location: Oxford, UK
Posted: 5th Mar 2008 19:20
errmmm was going to find it for you but instead i've attached it...

directions for use:
drag your .3ds file onto the icon for this exe.

wait (be patient)

a .dbo file with the same name as the input will spawn in the same directory as the exe file - like i said be patient as the app loads in the background and can take a while.

Paul

Attachments

Login to view attachments

Login to post a reply

Server time is: 2024-11-25 07:50:59
Your offset time is: 2024-11-25 07:50:59