Jump to content


Photo

3d Collisions Dll


  • Please log in to reply
154 replies to this topic

#21 hanson

hanson

    GMC Member

  • GMC Member
  • 444 posts
  • Version:GM8

Posted 29 September 2007 - 11:21 AM

Help?

I did notice that .obj's exported from Marzipan the faces are ordered 1-2-3-4 etc,etc

.obj's exported from Anim8or the faces seem to be ordered in order they were created in anim8or (eg: 13-14-15). I could add parsing with a little help from Mosaic Lite, but for now, just run the models through Marzipan for a shot term fix.  :unsure:

<{POST_SNAPBACK}>


Good work! I'll give that a try.

@Slick: Thanks!

-hanson
  • 0

#22 eat268

eat268

    Videogame Programmer

  • New Member
  • 335 posts

Posted 01 October 2007 - 12:33 AM

Are the collisions perfect?
  • 0

#23 hanson

hanson

    GMC Member

  • GMC Member
  • 444 posts
  • Version:GM8

Posted 01 October 2007 - 02:41 AM

Are the collisions perfect?

<{POST_SNAPBACK}>


Yes, the collisions are perfect. Every triangle in first model is collision checked with every triangle in second model.

-hanson
  • 0

#24 freko

freko

    The Professional

  • GMC Member
  • 504 posts
  • Version:GM8

Posted 01 October 2007 - 06:40 PM

Howz work on the rotations going on.

Will you be adding forces too..?
  • 0

#25 hanson

hanson

    GMC Member

  • GMC Member
  • 444 posts
  • Version:GM8

Posted 02 October 2007 - 12:52 PM

Howz work on the rotations going on.

Will you be adding forces too..?

<{POST_SNAPBACK}>


The rotations are going slow. I'm not an expert on 3d math. I have been reading on how to do them though. About forces... if you mean physics, I am not planning on it.

-hanson
  • 0

#26 xygthop3

xygthop3

    GMC Member

  • GMC Member
  • 2448 posts

Posted 10 October 2007 - 09:58 PM

A bump on the house.
  • 0

#27 dmitko

dmitko

    GMC Member

  • GMC Member
  • 1011 posts
  • Version:Unknown

Posted 20 October 2007 - 07:51 AM

This is what GM needs. Well done!
  • 0

#28 Proffessor_gad

Proffessor_gad

    GMC Member

  • New Member
  • 757 posts

Posted 13 November 2007 - 10:25 PM

I've been working on a 3d engine of my own with physics, real gravity, parenting, spheroids, fast rotate, fast resize, .obj import and stuff. But it doesn't have model -> model collissions. Maybe if we work together we can cook up something good. ;)



The main problem for both of us is that GM IS SLOW... So whoever uses this engine definately needs to simplify their models.

Edited by Proffessor_gad, 14 November 2007 - 04:12 AM.

  • 0

#29 hanson

hanson

    GMC Member

  • GMC Member
  • 444 posts
  • Version:GM8

Posted 14 November 2007 - 01:28 PM

I've been working on a 3d engine of my own with physics, real gravity, parenting, spheroids, fast rotate, fast resize, .obj import and stuff. But it doesn't have model -> model collissions. Maybe if we work together we can cook up something good.  ^_^



The main problem for both of us is that GM IS SLOW... So whoever uses this engine definately needs to simplify their models.

<{POST_SNAPBACK}>


Sure, we coult try :) . I am slowly getting through the model rotations code. Currently I am able to rotate one point with any xrot,yrot,and zrot. There shouldn't be too much work to do from here. I haven't had a lot of time to work on it lately though. I think adding the rotations is going to slow it down a bit. I might try wrapping ColDet , a Free 3D Collision Detection Library for C++. It would probably be much faster than my code.
If you would be willing, might I take a look at your progress on your 3d engine so far? It sound interesting.

-hanson
  • 0

#30 gamescoper

gamescoper

    GMC Member

  • New Member
  • 21 posts

Posted 14 November 2007 - 07:51 PM

superb hanson you siad you would make this and you delivered this is great no more 2d:3d ratios yesssssssssssssss!
  • 0

#31 IamCalle

IamCalle

    GMC Member

  • GMC Member
  • 444 posts

Posted 14 November 2007 - 09:59 PM

Hah, I wish ColDet was a lib for GameMaker. xP

It sounds like this project is heading in an even better direction now. x] (Cooperation and a nice C++ lib^^)
  • 0

#32 dk81584

dk81584

    Program Maker

  • New Member
  • 171 posts
  • Version:GM8

Posted 15 November 2007 - 02:42 PM

Yeah, ive wanted to make 3d games with collisions for a long time, but i couldn't do it, now i can thanks, and don't know if this has been asked yet, but will anim8or work with the .obj extensio, if not please someone send me a link to a program that can make these 3d models, i would really like to make a 3d game with collisions, instead of using only blocks :D
  • 0

#33 Proffessor_gad

Proffessor_gad

    GMC Member

  • New Member
  • 757 posts

Posted 16 November 2007 - 05:04 AM

Hanson,


The trick to fast rotations is NOT to rotate the mesh (slow), but to rotate the object inversly to what you were supposed to rotate the mesh (fast).

Eg: Instead of rotating the whole world just so that a plane can fly from Mexico to Florida, just rotate the plane instead. After you are done rotating the "airplane" and checking collissions, place it back to the original position.


I would send you the source code, but many of the functions are not working yet. To add to the pain it's Worry Season, I've got lots of homework, an additional HUGE project that I'm working on, and plenty of chores... I can give you what I do have, but I doubt that it would be of much help as it is right now.
  • 0

#34 hanson

hanson

    GMC Member

  • GMC Member
  • 444 posts
  • Version:GM8

Posted 17 November 2007 - 02:27 PM

Hanson,


The trick to fast rotations is NOT to rotate the mesh (slow), but to rotate the object inversly to what you were supposed to rotate the mesh (fast).

Eg: Instead of rotating the whole world just so that a plane can fly from Mexico to Florida, just rotate the plane instead. After you are done rotating the "airplane" and checking collissions, place it back to the original position.


I would send you the source code, but many of the functions are not working yet. To add to the pain it's  Worry Season, I've got lots of homework, an additional HUGE project that I'm working on, and plenty of chores... I can give you what I do have, but I doubt that it would be of much help as it is right now.

<{POST_SNAPBACK}>


For rotations I was thinking that you would pass xrot,yrot,and zrot, for each model, the same as the values passed to d3d_transform_add_rotation_x(),...y(),...z(). As for your project, I can wait. Thank you though.

  Yeah, ive wanted to make 3d games with collisions for a long time, but i couldn't do it, now i can thanks, and don't know if this has been asked yet, but will anim8or work with the .obj extensio, if not please someone send me a link to a program that can make these 3d models, i would really like to make a 3d game with collisions, instead of using only blocks  :GM131:

xygthop3 was working on a script to import obj files. Look on the first page. He suggests that you run the obj file through marzipan to make it compatible.
Marzipan is available for download at http://www.silentwor...age=downloads

Thanks to everybody for the comments!

-hanson
  • 0

#35 Proffessor_gad

Proffessor_gad

    GMC Member

  • New Member
  • 757 posts

Posted 17 November 2007 - 05:09 PM

Exactly! Just set a value to each object that defines it's rotation, and scaling. d3d_transform_add will make this possible. You can even use d3d transformations to invert the model.


Xypthog's idea about importing .obj is good, but it would be smarter to convert all of the obj's to some intermediate 3d model format that Game Maker can load quickly.


If we work together on this we might be able to get equal with the other 3d engines around here  :GM131: ...

Edited by Proffessor_gad, 17 November 2007 - 05:10 PM.

  • 0

#36 xygthop3

xygthop3

    GMC Member

  • GMC Member
  • 2448 posts

Posted 18 November 2007 - 12:10 AM

xygthop's idea about importing .obj is good, but it would be smarter to convert all of the obj's to some intermediate 3d model format that Game Maker can load quickly.

<{POST_SNAPBACK}>


I would like to have converted all of the obj file to be able to load any formated obj file, but I don't completely understand the file format. If anybody can help that would be great.

It would be great to see some speed improvement with this collision dll to allow to load full game levels because at the moment only very low poly models can be loaded because the collision check system is a little slow.
  • 0

#37 splinterphobe

splinterphobe

    GMC Member

  • New Member
  • 4 posts

Posted 18 November 2007 - 12:42 AM

In the example if you jump the ball so that its side is touching the edge of anything, it'll float in mid-air and act as if it's on solid ground instead of sliding off. Keep up the good work!
  • 0

#38 IamCalle

IamCalle

    GMC Member

  • GMC Member
  • 444 posts

Posted 22 December 2007 - 01:03 AM

Are there any updates? =D
  • 0

#39 hanson

hanson

    GMC Member

  • GMC Member
  • 444 posts
  • Version:GM8

Posted 23 December 2007 - 02:54 PM

Are there any updates? =D

<{POST_SNAPBACK}>


Yes, there is a small one. You can now replace a collision model with a new one. I have been busy on my entry for the winter competition, so I haven't gotten much done. I will post the new file when I get a free moment.

My entry to the winter competition uses this dll for collision detection. Check it out at http://www.yoyogames...ames/show/20613.

-hanson

Edited by hanson, 24 December 2007 - 04:10 AM.

  • 0

#40 Krisando

Krisando

    GMC Member

  • New Member
  • 1351 posts

Posted 24 December 2007 - 03:05 AM

Nice, You're a star!!! :P
May I ask how did you make tghat texture for the player, it wraps around perfect but is drawen quite "cooly" lol?
  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users