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 / noob 3d model question

Author
Message
secrkp7
18
Years of Service
User Offline
Joined: 3rd Sep 2006
Location:
Posted: 3rd Sep 2006 10:16
hi , i jus started with DB and i wanted to know, if i were to make my own 3d models with something such as maya 7, how would i use that 3d model in my game? would i like save it, then open it and it will be source code taht i can put in my game or something? lol plz help me out here!
Nebin
18
Years of Service
User Offline
Joined: 20th Mar 2006
Location: At my computer?
Posted: 3rd Sep 2006 15:40
You would save the object as a .X or .3DS file then use the Load Object command with that filename. Then you can use it as yuo would any other 3D object.


A picture is worth a thousand words...in basic
Terrorist Zero
18
Years of Service
User Offline
Joined: 29th Aug 2006
Location: Teh YouKai
Posted: 3rd Sep 2006 15:58
Hehe, I have Maya 7 too, and unless you know what to do, I admit it's a bit farfetched.
Right, first of all you're going to need to download the DirectX SDK, and inside you'll find all the relevant mel scripts and such to be able to export as a .X file. However there are limitations, as the exporter is, to be honest, quite crap. You won't really be able to do animations, and in my experience the textures don't align correctly on the model.
You can check out the thread relating to Maya > DirectX Models here, courtesy of GameDev.net http://www.gamedev.net/community/forums/topic.asp?topic_id=383794

The alternative is to download a free modelling program like Blender or Milkshape 3D, export from maya as an OBJ file, import into the new program, then export as .X or whatever other format you want basically.

Maya isn't too well known for its exporting

Hope this helps secrkp7!!!!!

www.tornupgaming.com
The home of free games and game projects.
demons breath
21
Years of Service
User Offline
Joined: 4th Oct 2003
Location: Surrey, UK
Posted: 3rd Sep 2006 16:46
first off, when you are asking questions, try and type properly and don't use abbreviations like "lol" and "plz"...




load object "[your filename]",[object number]

for example:



you need to include the path for where your object is saved, either in relation to your program or in your computer (you are better off putting it in a media folder inside the folder where your program is), and the extension on the end. Then to delete the object at the end of the program, you just use



DarkBASIC doesn't automatically load textures (I don't think), so you will need to export your texture into a bitmap file. Then you use this code.



basically, how that code works is:

load bitmap: this loads a bitmap file. again, make sure that you include the extension on the end (must be .bmp with load bitmap)

get image: this converts the current bitmap (in this case bitmap 1 because you've just loaded it) into an image that darkbasic can use. The 1 means that this is image 1 (every image needs a number so that darkBASIC can access it). The next four numbers are coordinates. Assuming that your bitmap is 256x256 pixels and you want to include all of it you need 0 for the first two to make it start getting the image at the top left and 256 at the bottom right. The first and third are x coordinates, and the second and fourth are y coordinates.

delete bitmap: this deletes the bitmap... you should do this whenever you are finished using a bitmap but its not absolutely necessary

texture object: this applies the texture to the object. The first number is the object number, the second is the image number (in my example, both one)

I'm tired so I'm not going to explain any more at the moment but if you need more help just let me know.

I think I was fairly thorough but if anything needs clarifying just reply to this post, and I'm sorry if you think I sound patronising explaining every command I just don't know how much you know

http://jamesmason01.googlepages.com/index.htm
Terrorist Zero
18
Years of Service
User Offline
Joined: 29th Aug 2006
Location: Teh YouKai
Posted: 3rd Sep 2006 18:17
As long as you have the required texture(s) in the exact same folder as the .X file, then DB automatically loads them onto the model. Similarly, if you don't have them, it wont, and I haven't yet found a way to load a texture onto a .X model using DB, it just wont work, you'll either get the textures you used in Maya and exported to the same folder (Maya exports all the textures with the X file so don't worry), or you'll just get a default gray object.

www.tornupgaming.com
The home of free games and game projects.
jinzai
18
Years of Service
User Offline
Joined: 19th Aug 2006
Location: USA
Posted: 6th Sep 2006 05:57
MilkShape is not free. It only exports one frame in the evaluation version, that is why you can't do animations with it.

Honestly, you think Maya would do a better job, considering how much you paid for it

Login to post a reply

Server time is: 2024-11-27 07:40:16
Your offset time is: 2024-11-27 07:40:16