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

0 Members and 1 Guest are viewing this topic.

Offline TIfanx1999

  • ಠ_ಠ ( ͡° ͜ʖ ͡°)
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 6173
  • Rating: +191/-9
    • View Profile
Re: GLIB a graphics axe 3d librairy
« Reply #285 on: January 02, 2014, 11:18:06 am »
Wow, the progress here looks excellent since the last time I checked this out!
:thumbsup:
:thumbsup:

^This

;D

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 #286 on: January 02, 2014, 11:28:18 am »
combinaison of both dithering and texturing. Note that this is at 15MHz. 6MHz is not *that* slow, but the screen is  faster and look better like this  ;D



and thanks Xeda !
That looks really good. It seems like a great effect to make a dark environement.
Would it be hard to do lights at a different position as the camera, and multiple lights?
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 TheMachine02

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 452
  • Rating: +105/-0
  • me = EF99+F41A
    • View Profile
Re: GLIB a graphics axe 3d librairy
« Reply #287 on: January 02, 2014, 11:31:46 am »
That looks really good. It seems like a great effect to make a dark environement.
Would it be hard to do lights at a different position as the camera, and multiple lights?

well, with the way I calculate the illumination, only directionnal light can be defined ; but mutiple and different light are not so difficult  :P
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 #288 on: January 02, 2014, 11:36:44 am »
That looks really good. It seems like a great effect to make a dark environement.
Would it be hard to do lights at a different position as the camera, and multiple lights?

well, with the way I calculate the illumination, only directionnal light can be defined ; but mutiple and different light are not so difficult  :P
would it be slow/hard to recalculate the light direction based of a certain point for every vertex or for every 4*4 pixel area?
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 fb39ca4

  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1749
  • Rating: +60/-3
    • View Profile
Re: GLIB a graphics axe 3d librairy
« Reply #289 on: January 02, 2014, 03:11:50 pm »
Amazing what you can do with a 15MHz z80! You could also use the dithering for depth fog, like Doom did.

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Re: GLIB a graphics axe 3d librairy
« Reply #290 on: January 03, 2014, 03:29:38 pm »
This totally looks impressive. Would it be practical inside a game?

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 #291 on: January 04, 2014, 06:03:29 am »
wooooooow, that is just awesome O.O

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

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 #292 on: January 04, 2014, 12:36:01 pm »
That looks really good. It seems like a great effect to make a dark environement.
Would it be hard to do lights at a different position as the camera, and multiple lights?

well, with the way I calculate the illumination, only directionnal light can be defined ; but mutiple and different light are not so difficult  :P
would it be slow/hard to recalculate the light direction based of a certain point for every vertex or for every 4*4 pixel area?

I am not sure for what you mean, but if you think of a sort of per-vertex lightning ; a modification of the texture routine allow me to do some sort of gouraud shading.

Would it be practical inside a game?

I guess it would be better than texture, as it is faster ; and a bit cleaner  :P

anyway, since cliping reallly annoy me, I decide to go to the hard way  :P  perfect 3D clipping : many improvement expected :
-2D commands won't need clipping anymore
-I am thinking of a new way to do it, so it *may* be faster than the actual clipping routine
-all overflow due to this will be remove
-command will clip in a much more agressive way, cutting lot more of geometry  :P
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 #293 on: January 05, 2014, 08:18:00 am »
That looks really good. It seems like a great effect to make a dark environement.
Would it be hard to do lights at a different position as the camera, and multiple lights?

well, with the way I calculate the illumination, only directionnal light can be defined ; but mutiple and different light are not so difficult  :P
would it be slow/hard to recalculate the light direction based of a certain point for every vertex or for every 4*4 pixel area?

I am not sure for what you mean, but if you think of a sort of per-vertex lightning ; a modification of the texture routine allow me to do some sort of gouraud shading.
Yes, that's what I meant. And for the pixel area, I  meant some kind of per-pixel lightning, but since that would be too slow, it could be done for every 4*4 area of pixels.
But vertex lightning would probably be faster, and the higher accuracy of per-pixel-lightning is probably useless because of the dithering and the small amount of shades (compared to a good screen) anyway.
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 TheMachine02

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 452
  • Rating: +105/-0
  • me = EF99+F41A
    • View Profile
Re: GLIB a graphics axe 3d librairy
« Reply #294 on: January 05, 2014, 08:58:35 am »
per vertex lighting wouldn't be *that* slow. I guess you can use a vertex shader (or geometry shader) / combine with a texture shader to achieve per vertex lightning. I could also implement this directly in the lib, but the total weight will become even more big  :P. Shader is good though.
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 #295 on: January 05, 2014, 10:33:01 am »
Yea, not everyone would need lighting for his project, so I guess a shader for it is indeed the best option.

BTW, have you made any progress on backface culling and z-ordering?
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 TheMachine02

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 452
  • Rating: +105/-0
  • me = EF99+F41A
    • View Profile
Re: GLIB a graphics axe 3d librairy
« Reply #296 on: January 05, 2014, 10:40:30 am »
well backface culling work well, but sorting is pretty difficult due to data structure - and so I have a buggy routine, but it doesn't work  :P
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 #297 on: January 06, 2014, 09:55:56 am »
Feature request: could you add billboards? (basically sprites that always face the camera)
Because they always face the camera, only their scale changes based on the distance, not their persfective. Because of this, they only need 1 point to be transformed to get the on-screen coordinate of the sprite, and then you just draw a scaled sprite at that location. For the Z-ordering and finding the location and scale, you can probably re-use some code of the sphere drawing routine.
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 #298 on: January 06, 2014, 10:20:23 am »
Z-ordering isn't really that hard, but it requires caching rotated vertices. I can help you with that as it's how I do it with AxeJh3D.

Offline Vogtinator

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1193
  • Rating: +108/-5
  • Instruction counter
    • View Profile
Re: GLIB a graphics axe 3d librairy
« Reply #299 on: January 06, 2014, 12:51:00 pm »