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 / DGK C++: How to make a .X object for collision 3d World Studio

Author
Message
Timidon
18
Years of Service
User Offline
Joined: 26th Jun 2005
Location: Bakersfield, Ca. USA.
Posted: 22nd Mar 2012 19:39
I have not done much work with world editors. So this is a newby question.

What I can do:

I am using the 3d World Studio to build the background which I want my models to walk on, in. I can build the set and export it to a .X object so that I can have the DGK load that in as a large model.

What I want to do:

I want to convert this .X model into the terrain to walk on. This might fall on to object collision. Just looking for where the tutorial is for that.

Just been searching for a hour or so pouring over the web. Just looking for pointers or clerifications that might help.

There are many answers but just one question" ~ Jerilith the Mad
MrValentine
AGK Backer
13
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 22nd Mar 2012 20:13
Mesh Collision?

Timidon
18
Years of Service
User Offline
Joined: 26th Jun 2005
Location: Bakersfield, Ca. USA.
Posted: 22nd Mar 2012 20:25 Edited at: 22nd Mar 2012 20:48
That might be what I am looking for. I have not toyed around with mesh collisions.

Maybe the command is

(this comes off the World demo out of the samples pack).

dbLoadBSP ( "ikzdm1.pk3", "ikzdm1.bsp" );

can I go

dbLoadBSP ("","filename.x"); will that work?

I am trying to build a level with the tools I can get ahold of.

Use the World Studio tp build the places where the player walks, import that into the game, then add extra placeables that the player interacts with and custom effects.

part of this maybe a World 3d Studio question as well.

There are many answers but just one question" ~ Jerilith the Mad
MrValentine
AGK Backer
13
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 22nd Mar 2012 20:36
it would depend on your physics engine and also whether your terrain is static or non-static

Timidon
18
Years of Service
User Offline
Joined: 26th Jun 2005
Location: Bakersfield, Ca. USA.
Posted: 22nd Mar 2012 21:02
Not realy much of a physics engine right now, just DGK defaults.

There are many answers but just one question" ~ Jerilith the Mad
Brendy boy
18
Years of Service
User Offline
Joined: 17th Jul 2005
Location: Croatia
Posted: 22nd Mar 2012 21:11
Quote: "dbLoadBSP ("","filename.x"); will that work?"

no,

You need to code your own collision detection using intersection functions or use sparky collision

WLGfx
16
Years of Service
User Offline
Joined: 1st Nov 2007
Location: NW United Kingdom
Posted: 22nd Mar 2012 21:17
Spartys works fine enough with GDK and almost any object can be setup for collision even is you use the complex object collision settings.

Mental arithmetic? Me? (That's for computers) I can't subtract a fart from a plate of beans!
Warning! May contain Nuts!
Timidon
18
Years of Service
User Offline
Joined: 26th Jun 2005
Location: Bakersfield, Ca. USA.
Posted: 22nd Mar 2012 21:39
Alright I will take a look at sparkies collisons

Trying to build a map for players to walk around is FUN! (hair turns even grayer)...

There are many answers but just one question" ~ Jerilith the Mad
MrValentine
AGK Backer
13
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 23rd Mar 2012 00:05
Timidon - have you dabbled in DBPro yet? unless your project is intended to be huge/massive in scale and highly complex, perhaps making it in DBPro might help with game structure? just a thought...

and use PhysX... ^^

WLGfx
16
Years of Service
User Offline
Joined: 1st Nov 2007
Location: NW United Kingdom
Posted: 23rd Mar 2012 01:58
Using a physics engine is good if you're going to be adding actual physics to a game you're working on, but if not then Sparkys is an extremely fast collision add-on and very easy to use. It's also perfect for sliding collision when your player moves along a wall as in Quake and UT. And it has ray-casting which is cool. Most FPS style of game only requires a basic collision to work. Plus, the only real physics in most games is just gravity.

Mental arithmetic? Me? (That's for computers) I can't subtract a fart from a plate of beans!
Warning! May contain Nuts!
Timidon
18
Years of Service
User Offline
Joined: 26th Jun 2005
Location: Bakersfield, Ca. USA.
Posted: 23rd Mar 2012 06:58
Just got back from work,...

I have DBPro, DGK, DGK net and the AGK. I was looking for map editor that works with the DGK or DB. I was hoping with world studio to be able to lay down the terrian, buildings where the player would walk around on. Then work from there for the coding to build doors, interactive parts and monster/mobs, with the map layed down, that's a good portion of the work.

World Studio is easy to use, I like that within minutes I was able to put some shapes down, add some models and textures, though I also found out that a majority of the "starter" textures that come with the 3D World Studio are not compaitble with the DGK, not to worried about that, can always get more textures. World Studio exports the scene in a few file formats. "X", ".dbo" object as well.

When I was looking through the options for loading in the DGK only ".X" was mention in the functions discription.

So I need to take that .X object and make it into the map that the players walks around on. So I need to be able to convert the ".x" model that is exported from 3d WS to something that is other than just a big block for collision.

The Physics is going to be simple. Movement, only certian objects will have any sort of gravity.

There are many answers but just one question" ~ Jerilith the Mad
MrValentine
AGK Backer
13
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 23rd Mar 2012 08:18
hmm... just a tip, delete all the models and textures that come with 3DWS, as you have no right to use them [ I found this out the annoying way]
just a heads up

you need to learn how 3DWS exports its data IE, Limbs Surfaces etc...

this information is in the help files, alternatively, a few bob here and there could also do the trick ^^ [looks to the sky... ]

no I don't mean me silly

I have the same principle as yourself in this area only I am using DBpro for my project as it has plenty of capacity for my needs... [for now... and if it does not... well I just feed someone some beer and cake and (no the cake is not a lie ...) and viola plugin created]

Timidon
18
Years of Service
User Offline
Joined: 26th Jun 2005
Location: Bakersfield, Ca. USA.
Posted: 23rd Mar 2012 10:07
Got Sparkies Collision up and running running a few tests right now. Its about time for bed.

Quote: "hmm... just a tip, delete all the models and textures that come with 3DWS, as you have no right to use them [ I found this out the annoying way]
just a heads up
"


Yup going to get rid of them. Just to bad, some are nice.

There are many answers but just one question" ~ Jerilith the Mad
Timidon
18
Years of Service
User Offline
Joined: 26th Jun 2005
Location: Bakersfield, Ca. USA.
Posted: 23rd Mar 2012 11:07 Edited at: 23rd Mar 2012 11:17
Hurrah, working code! Alright folks consider this thread almost done, just time for the closing remarks from those who made this thread possible.

The answer to the question:

?: "Dark GDK / DGK C++: How to make a .X object for collision 3d World Studio"

A: Using Sparkies Collision

SC_SetupObject(iObjectID,0,0);
Setting the collision to use the polygon collision.

Here is the bit of code for everbody to wonder over... This is not clean at all, it was mostly for protyping to see if I could do it.



One observation is that when my little box went inside the bigger structure, it was no longer colliding. Not sweating it though.

I think I will right up a code snippit, for the code base with a clean code set.

The download is just a .bmp screenshot of the workscreen.

Thanks for the help folks. Timidon going to bed. Sparkies Collision system works. I will have to experiment a bit more.

There are many answers but just one question" ~ Jerilith the Mad

Attachments

Login to view attachments
Matty H
15
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 23rd Mar 2012 12:11
Quote: "Using a physics engine is good if you're going to be adding actual physics to a game you're working on"


I disagree, but then I would

I tested Dark Dynamix character controller against using sparkys collision and found Dark Dynamix to be twice as fast and also less code to get it set up, this includes automatic slope limits and maximum step sizes.

I would always use a physics api, more so for an FPS as you never know what you might add in the future.

That all said, sparkys is fast and I would recommend sticking with it if you have it working already since Dark Dynamix will cost money while sparkys is free. Although you can try Dark Dynamix for free.

End plug

I suppose my point is that physics engines should provide good collision detection first and then have the advantage of being able to add some realistic looking physics if needed.

MrValentine
AGK Backer
13
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 23rd Mar 2012 17:22
Yeah I am stuck with no textures until I either buy that umm Genetica which is expensive... or learn to create my own textures which I can never find any tutorials on... so I am stuck for textures...

Timidon
18
Years of Service
User Offline
Joined: 26th Jun 2005
Location: Bakersfield, Ca. USA.
Posted: 23rd Mar 2012 20:13 Edited at: 23rd Mar 2012 20:27
Yup, now we are just kicking it. Best post threads ever, besides by adding more to the thread, people may pop on

Quote: "I tested Dark Dynamix character controller against using sparkys collision and found Dark Dynamix to be twice as fast and also less code to get it set up, this includes automatic slope limits and maximum step sizes."


I can also take a look at Dark Dymanix, writting some sort sloping code will be entertaining.

Quote: "Yeah I am stuck with no textures until I either buy that umm Genetica which is expensive... or learn to create my own textures which I can never find any tutorials on... so I am stuck for textures..."


Just looked at genetica, yah that is a grip of money. Here is another one called Seamless Texture Generator runs 34$, might be more cheaper. But for the price of Genetica, you also get textures out of the box. Texture packs can go a for a bit of money. There are also some free ones around.

There are many answers but just one question" ~ Jerilith the Mad
MrValentine
AGK Backer
13
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 23rd Mar 2012 20:41 Edited at: 23rd Mar 2012 20:42
I am one of those that dislike using too much free stuff as theres too much research with no ends in sight to perform... my guess is I will bite the bullet and get Genetica... pro

EDIT

I am hoping I can talk some sort of discount on my next purchase

Matty H
15
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 24th Mar 2012 01:42
Quote: "I can also take a look at Dark Dymanix, writting some sort sloping code will be entertaining."


The sliding, slopes and steps are all taken care of automatically. This is why there is less code to set a character up than using a collision only lib.

WLGfx
16
Years of Service
User Offline
Joined: 1st Nov 2007
Location: NW United Kingdom
Posted: 24th Mar 2012 03:36
Quote: "I am one of those that dislike using too much free stuff as theres too much research with no ends in sight to perform... my guess is I will bite the bullet and get Genetica... pro "


Free stuff is actually what gets a lot of us hobby programmers off the ground.

Searching google can find so much free stuff for new programmers. Apparently, for C++ programmers out there, there's a few physics libs, collision libs, GUI libs, etc, blah...

The only problem the guy/gal has is getting it working by reading the de-structions.

I'll grant the folks of the TGC forums medals for wrapping these things up to make it so much easier for the DBP and GDK programmers, but I'll always still root out the free stuff. And I bow to those that still update there plugins and stuff that are actually still free.

Everything I've learnt so far I've given away and will still do so for a long time, al-being that most of it has already been learned by others and taught too, but I get by and go on. I TRY!!!

There's lots of things I would love to purchase, but, I cannot... :-(

Mental arithmetic? Me? (That's for computers) I can't subtract a fart from a plate of beans!
Warning! May contain Nuts!
MrValentine
AGK Backer
13
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 24th Mar 2012 03:40
WLGfx we were talking about textures ^^

You still not gone to bed?

WLGfx
16
Years of Service
User Offline
Joined: 1st Nov 2007
Location: NW United Kingdom
Posted: 24th Mar 2012 14:43
@MrValentine - I might actually do some research into hunting down free texture packs later on today.

Mental arithmetic? Me? (That's for computers) I can't subtract a fart from a plate of beans!
Warning! May contain Nuts!
MrValentine
AGK Backer
13
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 24th Mar 2012 15:01
@WLGfx

Timidon
18
Years of Service
User Offline
Joined: 26th Jun 2005
Location: Bakersfield, Ca. USA.
Posted: 25th Mar 2012 21:09
Quote: "Free stuff is actually what gets a lot of us hobby programmers off the ground.

Searching google can find so much free stuff for new programmers. Apparently, for C++ programmers out there, there's a few physics libs, collision libs, GUI libs, etc, blah..."


Free is good, piad apps are usually more pollished. I liked Mojangs idea. Release a game that's a still under developement, if people like it, charge new folks more and more...

There are many answers but just one question" ~ Jerilith the Mad

Login to post a reply

Server time is: 2024-04-18 22:57:52
Your offset time is: 2024-04-18 22:57:52