Author Topic: Glib : a 3D graphics axe library  (Read 78784 times)

0 Members and 1 Guest are viewing this topic.

Offline TheMachine02

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 452
  • Rating: +105/-0
  • me = EF99+F41A
    • View Profile
Re: GLIB a graphics axe 3d librairy
« Reply #105 on: July 02, 2013, 05:39:36 am »
O_o I forgot to precise it's a 6Mhz screen and there is a pause 100 in the principal loop (principally to catch  bug)  ;D
AXE/asm programmer - unleash the power of z80 //C++//C

epic 3D things http://www.ntu.edu.sg/home/ehchua/programming/opengl/CG_BasicsTheory.html

Offline Sorunome

  • Fox Fox Fox Fox Fox Fox Fox!
  • Support Staff
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 7920
  • Rating: +374/-13
  • Derpy Hooves
    • View Profile
    • My website! (You might lose the game)
Re: GLIB a graphics axe 3d librairy
« Reply #106 on: July 02, 2013, 05:40:48 am »
wow, that means it is even faster O.O EPIC

THE GAME
Also, check out my website
If OmnomIRC is screwed up, blame me!
Click here to give me an internet!

Offline Streetwalrus

  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3821
  • Rating: +80/-8
    • View Profile
Re: GLIB a graphics axe 3d librairy
« Reply #107 on: July 02, 2013, 11:28:47 am »
/Totally/ epic. :thumbsup:

Offline ben_g

  • Hey cool I can set a custom title now :)
  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1002
  • Rating: +125/-4
  • Asm noob
    • View Profile
    • Our programmer's team: GameCommandoSquad
Re: GLIB a graphics axe 3d librairy
« Reply #108 on: July 02, 2013, 01:54:35 pm »
This seems to be able to do what my 3D engine kept failing at, and at a thrutely great speed.
It really looks like an epic library. I think I'm going to get started with axe again for this.
I can't wait untill the next release.

BTW: is this open-source?
My projects
 - The Lost Survivors (Unreal Engine) ACTIVE [GameCommandoSquad main project]
 - Oxo, with single-calc multiplayer and AI (axe) RELEASED (screenshot) (topic)
 - An android version of oxo (java)  ACTIVE
 - A 3D collision detection library (axe) RELEASED! (topic)(screenshot)(more recent screenshot)(screenshot of it being used in a tilemapper)
Spoiler For inactive:
- A first person shooter with a polygon-based 3d engine. (z80, will probably be recoded in axe using GLib) ON HOLD (screenshot)
 - A java MORPG. (pc) DEEP COMA(read more)(screenshot)
 - a minecraft game in axe DEAD (source code available)
 - a 3D racing game (axe) ON HOLD (outdated screenshot of asm version)

This signature was last updated on 20/04/2015 and may be outdated

Offline Matrefeytontias

  • Axe roxxor (kinda)
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1982
  • Rating: +310/-12
  • Axe roxxor
    • View Profile
    • RMV Pixel Engineers
Re: GLIB a graphics axe 3d librairy
« Reply #109 on: July 02, 2013, 02:03:50 pm »
Looks great :D

How are you handling the frustum culling ? Because it's something I could never figure out how to do.

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55941
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: GLIB a graphics axe 3d librairy
« Reply #110 on: July 02, 2013, 03:12:15 pm »
THat really looks nice TheMachine02! O.O Will collision detection be hard to implement btw?

Offline tr1p1ea

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 647
  • Rating: +110/-0
    • View Profile
Re: GLIB a graphics axe 3d librairy
« Reply #111 on: July 02, 2013, 07:30:31 pm »
Im not sure its frustrum culling (in 3D) rather its line clipping in 2D. Either way it looks great and the speed is impressive!

What method is used for clipping? Cohen-Sutherland? Do your filled surfaces clip as well?
"My world is Black & White. But if I blink fast enough, I see it in Grayscale."


Offline Matrefeytontias

  • Axe roxxor (kinda)
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1982
  • Rating: +310/-12
  • Axe roxxor
    • View Profile
    • RMV Pixel Engineers
Re: GLIB a graphics axe 3d librairy
« Reply #112 on: July 02, 2013, 07:35:44 pm »
I asked him, he uses frustum culling. Didn't ask how though.

Offline tr1p1ea

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 647
  • Rating: +110/-0
    • View Profile
Re: GLIB a graphics axe 3d librairy
« Reply #113 on: July 02, 2013, 07:39:14 pm »
It would be cool to get an explanation of the method used ... plus more screenies :).
"My world is Black & White. But if I blink fast enough, I see it in Grayscale."


Offline TIfanx1999

  • ಠ_ಠ ( ͡° ͜ʖ ͡°)
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 6173
  • Rating: +191/-9
    • View Profile
Re: GLIB a graphics axe 3d librairy
« Reply #114 on: July 02, 2013, 07:57:53 pm »
Wow, this is looking quite impressive. :) Nice work TheMachine02!

Offline TheMachine02

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 452
  • Rating: +105/-0
  • me = EF99+F41A
    • View Profile
Re: GLIB a graphics axe 3d librairy
« Reply #115 on: July 03, 2013, 09:25:42 am »
Well,well...

I use a 2d method and a 3d one.
The clipping line routine first check if the 2 point we want to draw is not behind the camera.
If so, it's apply the cohen sutherland algorithm to clip the line in 2d
If one point is behind camera, it's calculate the 3d coordinate of the two needed point and then clip in 3d. (clip against the camera x,y plane)
It's simply after render with the 2d clipping line routine.

The result is a good clipping, but a very slow thing when calculating the 3d clipping. I have optimizations in mind, though  :P
Filled surface is not clip for the moment

This seems to be able to do what my 3D engine kept failing at, and at a thrutely great speed.

I am not agree with that. You have texture, and they give me a very hard time !

Else :
*You can of course take any part of the librairy you want at each update, as long you credits me  ;D
*I don'y (currently) know how to handle collision (but you can be sure I will find a way)
*I can't currently make screenshot, sorry
*And of course thanks for all support  :D

EDIT: 200 posts  :w00t:
« Last Edit: July 03, 2013, 09:27:45 am by TheMachine02 »
AXE/asm programmer - unleash the power of z80 //C++//C

epic 3D things http://www.ntu.edu.sg/home/ehchua/programming/opengl/CG_BasicsTheory.html

Offline ben_g

  • Hey cool I can set a custom title now :)
  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1002
  • Rating: +125/-4
  • Asm noob
    • View Profile
    • Our programmer's team: GameCommandoSquad
Re: GLIB a graphics axe 3d librairy
« Reply #116 on: July 03, 2013, 05:10:30 pm »
This seems to be able to do what my 3D engine kept failing at, and at a thrutely great speed.
I am not agree with that. You have texture, and they give me a very hard time !
Well, my 3D engine failed missarably at clipping in indoor scenes. But I didn't do any 3D clipping when only one point is behind the camera.

Anyway, if you want help with textures, I can always see if I can modify my texture drawing code to make it compatible with axe.
« Last Edit: July 03, 2013, 05:11:40 pm by ben_g »
My projects
 - The Lost Survivors (Unreal Engine) ACTIVE [GameCommandoSquad main project]
 - Oxo, with single-calc multiplayer and AI (axe) RELEASED (screenshot) (topic)
 - An android version of oxo (java)  ACTIVE
 - A 3D collision detection library (axe) RELEASED! (topic)(screenshot)(more recent screenshot)(screenshot of it being used in a tilemapper)
Spoiler For inactive:
- A first person shooter with a polygon-based 3d engine. (z80, will probably be recoded in axe using GLib) ON HOLD (screenshot)
 - A java MORPG. (pc) DEEP COMA(read more)(screenshot)
 - a minecraft game in axe DEAD (source code available)
 - a 3D racing game (axe) ON HOLD (outdated screenshot of asm version)

This signature was last updated on 20/04/2015 and may be outdated

Offline tr1p1ea

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 647
  • Rating: +110/-0
    • View Profile
Re: GLIB a graphics axe 3d librairy
« Reply #117 on: July 03, 2013, 06:04:19 pm »
Sounds like a great solution for wireframe clipping.

So i guess you clip coordinates to positive 3D space and then utilise 2D clipping when drawing (cohen-sutherland clipping against a 2D viewport). Very impressive and i agree that clipping filled surfaces can be a bit of a pain.

That said i guess you could try to clip each endpoint if z<=0 in a similar way? It would however require that your triangle drawing routine be able to handle shapes with > 3 sides.

Can i ask if this will likely be used for indoor scenes?
"My world is Black & White. But if I blink fast enough, I see it in Grayscale."


Offline TheMachine02

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 452
  • Rating: +105/-0
  • me = EF99+F41A
    • View Profile
Re: GLIB a graphics axe 3d librairy
« Reply #118 on: July 06, 2013, 08:01:02 am »
Yeah of course. Clipping are mainely for indoor scene, as well as portals.

A very very very very  :P  super good new :

TEXTURES WORKS !!!!  :w00t:

but it's slllllllloooooooowwwwwwwwwwwwwwwww  :crazy:
AXE/asm programmer - unleash the power of z80 //C++//C

epic 3D things http://www.ntu.edu.sg/home/ehchua/programming/opengl/CG_BasicsTheory.html

Offline Hayleia

  • Programming Absol
  • Coder Of Tomorrow
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3367
  • Rating: +393/-7
    • View Profile
Re: GLIB a graphics axe 3d librairy
« Reply #119 on: July 06, 2013, 10:46:43 am »
Congratulations !
And you say it is slow, but at least it works, and it is easier to optimize a working code than to create and optimize a working code, so I'm sure you'll manage.
All I can do is wish you good luck (and give you a +1) to encourage you to keep making that lib awesome.
« Last Edit: July 06, 2013, 10:48:13 am by Hayleia »
I own: 83+ ; 84+SE ; 76.fr ; CX CAS ; Prizm ; 84+CSE
Sorry if I answer with something that seems unrelated, English is not my primary language and I might not have understood well. Sorry if I make English mistakes too.

click here to know where you got your last +1s