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 / Manually creating an object from scratch in GDK?

Author
Message
WLGfx
16
Years of Service
User Offline
Joined: 1st Nov 2007
Location: NW United Kingdom
Posted: 4th Aug 2011 19:13
From my original thread in the Dark Basic Pro forum I started to create a pseudo random 3d level generator but I abandoned Dark Basic Pro and moved back over to GDK and C++ and re-started the project.

Unfortunately GDK doesn't have Matrix1 Utils which has some great commands to manually put together a 3d object from it's beginning.

I'm at the point where I have the level generation completed:

And I am building it using many triangles.

How do I go about using the data I already have to build an object from scratch? ie. vertices list and faces list, then texturing, etc

The current state of my project is attached for download for anyone who would like a look at the algorithm code that generates a random level.

I would really like some help with this if anyone knows how to do this...

Warning! May contain Nuts!

Attachments

Login to view attachments
JTK
14
Years of Service
User Offline
Joined: 10th Feb 2010
Location:
Posted: 4th Aug 2011 20:18
If you have all of the data, have you considered using the DBO code that comes with GDK? It can be found in the GDK \include\DBO directory.

Just a suggestion,

JTK
WLGfx
16
Years of Service
User Offline
Joined: 1st Nov 2007
Location: NW United Kingdom
Posted: 4th Aug 2011 21:14
Thanks JTK. I've had a look at the 'DBOData.cpp' and the 'DBOData.h' which seems to be what I'll need to use, but without any idea of how to implement it, I'll need some directions.

I've got a feeling that somebody is going to tell me I'm going to have to use DirectX stuff with this method. And it's about time I got my feet wet with that...

Warning! May contain Nuts!
JTK
14
Years of Service
User Offline
Joined: 10th Feb 2010
Location:
Posted: 4th Aug 2011 22:24
Well, here's a link that may interest you:

.DBO Format Document.

Regards,
JTK
WLGfx
16
Years of Service
User Offline
Joined: 1st Nov 2007
Location: NW United Kingdom
Posted: 5th Aug 2011 01:02 Edited at: 5th Aug 2011 01:31
After reading through that and looking at the DBO file in the GDK directory I found that although it will be useful for something soon it wasn't what I was after.

I found this though : http://forum.thegamecreators.com/?m=forum_view&t=164244&b=10 which explains how to make a mesh from a memblock so I'll see what I can do using that as a reference.

EDIT: I'm going to try and set it up without defining the normal data and then once the object is created use the dbSetObjectNormals() to automatically set them up for me.

I'll post the code once I've finished it.

Warning! May contain Nuts!

Login to post a reply

Server time is: 2024-05-18 10:29:51
Your offset time is: 2024-05-18 10:29:51