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 / Extracting Objects Vertices

Author
Message
Sedit
1
Years of Service
User Offline
Joined: 3rd Sep 2017
Location: Ghetto of NJ
Posted: 17th Dec 2018 02:43
I need to figure out how to extract the Objects Indices or Vertices in DarkBasic.

I am working with DarkGDK compiled to run on Visual Studios 2017, I am running 2015 and its working fine however I need to Incorporated physics and have run into some serious issues idk If I can fix in which I keep getting an undefined reference to

exception::exception(char * const &);

Which seems to be some issues with legacy C++ being used with new stuff as they removed the Reference and turned the function signature into exception::exception(char * const)

Anyway, I have some physics libraries that I wrote, if I could extract the mesh data so I can pass that to collision algorithms beit my library or another I might be able to pass that to physics creation system.

Its for a gamejam that is one week long, I have lost a day and have till next Saturday. I am prob boned but hoping for the best.
Sphere sphere = new Sphere(0.5f);
InsanelyRedundantJava insanelyredundantjava = new InsanelyRedundantJava(Redundancy1, Redundancy2);
Sedit
1
Years of Service
User Offline
Joined: 3rd Sep 2017
Location: Ghetto of NJ
Posted: 17th Dec 2018 08:29 Edited at: 17th Dec 2018 08:36
This is prob what I am looking for...
dbMakeMemblockFromMesh ();

Does anyone know what sort of information is contained in the most basic of Mesh? Are these all Vertices or are they Indexed?



[EDIT] Come to think of it, I remember doing so work in the past on Primitive mesh and moving the polygons around only to find the entire poly moves with zero connections to the next meaning that the Mesh are all Vertices, all forming Polygons, and non Indexed...
Damn.... Thats kind of crazy, no wonder why it tends to run slow, Darkbasic could have gotten a massive performance boost by Indexing their objects Instead each mesh prob has many times more vertices than it really needs.
Sphere sphere = new Sphere(0.5f);
InsanelyRedundantJava insanelyredundantjava = new InsanelyRedundantJava(Redundancy1, Redundancy2);
Hotline
10
Years of Service
User Offline
Joined: 22nd Aug 2008
Location:
Posted: 17th Dec 2018 12:07 Edited at: 17th Dec 2018 12:15
Read the make memblock from mesh help for more details.Everything is there what you need.
Also you could try the vertexdata commands. Note :these commands return vertex positions in model space so you need to transform them to world space.
[href=forum.thegamecreators.com/?m=forum_view&t=191567&b=5]Spark Particle engine[/href]
[href=forum.thegamecreators.com/?m=forum_view&t=199163&b=5]Transform gizmo plugin[/href]
Bored of the Rings
14
Years of Service
User Offline
Joined: 25th Feb 2005
Location: Middle Earth
Posted: 17th Dec 2018 15:20 Edited at: 18th Dec 2018 05:58
a couple of example functions (will need to modified for your project), there are also other ways if using DBO by reading in the embedded DWORD codes:



Professional Programmer, languages: SAS, C++, SQL, PL-SQL, DBPro, Purebasic, JavaScript, others
Sedit
1
Years of Service
User Offline
Joined: 3rd Sep 2017
Location: Ghetto of NJ
Posted: 17th Dec 2018 17:43
Ty everyone its very helpful,
Hotline, I would expect the physics engine to place the object into world coords one the physics object is created, I just need a mesh for it to create a collider from. the collider should be translated into world space I would think.
Sphere sphere = new Sphere(0.5f);
InsanelyRedundantJava insanelyredundantjava = new InsanelyRedundantJava(Redundancy1, Redundancy2);
Mage
12
Years of Service
User Offline
Joined: 3rd Feb 2007
Location: Canada
Posted: 19th Dec 2018 01:43 Edited at: 19th Dec 2018 01:45
In the future I could provide code that pulls all the mesh data straight from the DBO but it's a bit under cooked at the moment. Code would need to be re-purposed and cleaned up. Ideally a few months away from something like that.
I have a working code piece that will basically convert everything except animations from DBO to Memory to MS3D. Animation has some complicated angle math hurdles. Probably would fail on some of the more eccentric kinds of DBO models. I think Bored mentioned multi-mesh code blocks and multi-textured models. I am not working on this at the moment since I am working on the conversion the other way. So I'm not ready to offer help in this case.

Mage's Modular Code - Get awesome UI controls and powerful Bitmap Fonts!
Screen Device Recovery - Stop your apps from crashing when minimized/tabbed/screen locked.
CPU Friendly Frame Limiter - Make your app generate less computer heat + noise, and use less battery life!
Sedit
1
Years of Service
User Offline
Joined: 3rd Sep 2017
Location: Ghetto of NJ
Posted: 19th Dec 2018 03:37
Thats not problem Mage thanks anyway. I found some information about the DBO format that if I ever need to go that route it shouldn't be much of a problem to be honest. While I am not well versed in 3D animation formats I would think that conversion of any movements stated in the animation file over to quaternions or matrices should make the process relatively easy if the limbs are laid out in a linked list, I am working in C++ so such structures shouldn't be to much issue. Have always figured making each component have a possible child or multiple children each with their own translation matrix one can walk the hierarchy manipulating the model that way.

To be totally honest, I got a little side tracked from this project anyway and instead have been talking to Lee about working on some bug repairs for the GameGuru project and I am honestly much more interested in working on that then the failed Gamejam project I was doing.

Sphere sphere = new Sphere(0.5f);
InsanelyRedundantJava insanelyredundantjava = new InsanelyRedundantJava(Redundancy1, Redundancy2);
Bored of the Rings
14
Years of Service
User Offline
Joined: 25th Feb 2005
Location: Middle Earth
Posted: 19th Dec 2018 05:57
@Sedit-yes, the GameGuru engine is bugged to high hilt and is a mess. I stopped using it yonks ago, it went weird, more about looks than actual gameplay. Anyway, I wish you luck with fixing GameGuru bugs, there are tons. I have also compiled the open source in VS2017 and have done some updates to the code, but I no longer have the desire to do anything with that engine.
Professional Programmer, languages: SAS, C++, SQL, PL-SQL, DBPro, Purebasic, JavaScript, others
Mage
12
Years of Service
User Offline
Joined: 3rd Feb 2007
Location: Canada
Posted: 19th Dec 2018 13:37 Edited at: 19th Dec 2018 14:24
Sedit wrote: "Thats not problem Mage thanks anyway. I found some information about the DBO format that if I ever need to go that route it shouldn't be much of a problem to be honest. While I am not well versed in 3D animation formats I would think that conversion of any movements stated in the animation file over to quaternions or matrices should make the process relatively easy if the limbs are laid out in a linked list, I am working in C++ so such structures shouldn't be to much issue. Have always figured making each component have a possible child or multiple children each with their own translation matrix one can walk the hierarchy manipulating the model that way."


Actually in your case you’d not need any higher order math conversions so that would eliminate the most difficult part of the process.

Mage's Modular Code - Get awesome UI controls and powerful Bitmap Fonts!
Screen Device Recovery - Stop your apps from crashing when minimized/tabbed/screen locked.
CPU Friendly Frame Limiter - Make your app generate less computer heat + noise, and use less battery life!
Sedit
1
Years of Service
User Offline
Joined: 3rd Sep 2017
Location: Ghetto of NJ
Posted: 19th Dec 2018 17:40
(Actually in your case you’d not need any higher order math conversions so that would eliminate the most difficult part of the process.)
I like the sound of that, im lazy


Quote: "@Sedit-yes, the GameGuru engine is bugged to high hilt and is a mess. I stopped using it yonks ago, it went weird, more about looks than actual gameplay. Anyway, I wish you luck with fixing GameGuru bugs, there are tons. I have also compiled the open source in VS2017 and have done some updates to the code, but I no longer have the desire to do anything with that engine."


I downloaded and compiled it as well a couple days ago, all went well just had to make a couple minor adjustments such as creating an F: drive for the output and renaming the folders the directX texture library is in but other than that it went fine. Problems came after when I realized the laptop I do all my coding on is not fully DirectX 11 compatible so I will prob have to go through the whole process again on my desktop.
Sphere sphere = new Sphere(0.5f);
InsanelyRedundantJava insanelyredundantjava = new InsanelyRedundantJava(Redundancy1, Redundancy2);

Login to post a reply

Server time is: 2019-03-19 16:40:58
Your offset time is: 2019-03-19 16:40:58