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

0 Members and 1 Guest are viewing this topic.

Offline Streetwalrus

  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3821
  • Rating: +80/-8
    • View Profile
Re: GLIB a graphics axe 3d librairy
« Reply #45 on: February 23, 2013, 02:40:48 am »
I think it does render invisible walls. So with grayscale, you get transparence.

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 #46 on: February 26, 2013, 06:37:30 am »
I think it does render invisible walls. So with grayscale, you get transparence.

no, this version doesn't rendering invisible walls  :'(
it draw all the wall, and don't clean buffers (distance rendering was not here), so it look like there is translucent wall....


.... but, I work on the engine !
-distance rendering (some bugs still here ...)
-"wired aspect" -> if all work correctly, the user will can choose the display mode
-pass from 3000 bytes to 4000 !  ;D
-translucent walls (and true translucent...)  ;D

(sorry, I can't upload the librairy rigth now  :( )

next step : textures !
« Last Edit: February 26, 2013, 06:37:43 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 willrandship

  • Omnimagus of the Multi-Base.
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2953
  • Rating: +98/-13
  • Insert sugar to begin programming subroutine.
    • View Profile
Re: GLIB a graphics axe 3d librairy
« Reply #47 on: February 26, 2013, 12:01:15 pm »
It still doesn't draw lines whose endpoints are offscreen. Are you planning on changing that or should I stop pestering you about it? :P

Offline Runer112

  • Moderator
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2289
  • Rating: +639/-31
    • View Profile
Re: GLIB a graphics axe 3d librairy
« Reply #48 on: February 26, 2013, 12:09:12 pm »
It still doesn't draw lines whose endpoints are offscreen. Are you planning on changing that or should I stop pestering you about it? :P

That's a little bit my fault really... Axe needs proper line clipping still, it's just a pain to get right and optimized.

Offline willrandship

  • Omnimagus of the Multi-Base.
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2953
  • Rating: +98/-13
  • Insert sugar to begin programming subroutine.
    • View Profile
Re: GLIB a graphics axe 3d librairy
« Reply #49 on: February 26, 2013, 12:20:10 pm »
Oh, ok. Sorry to place the blame wrongly.

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 #50 on: February 26, 2013, 12:36:03 pm »
It still doesn't draw lines whose endpoints are offscreen. Are you planning on changing that or should I stop pestering you about it? :P

yes, I planing to change that ; but I need first to optimize the engine itself (and after I will see for this)
However, it's true that doing a very optimized clipping line routine is a little hard...
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 DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55942
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: GLIB a graphics axe 3d librairy
« Reply #51 on: February 26, 2013, 01:39:58 pm »
Looks pretty cool. How fast is it when rendering an entire room of, let's say... 10 walls (including exit)?

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 #52 on: February 26, 2013, 06:59:10 pm »
Yeah, it's looking pretty cool!
And that is 42 frames per second, right? ;)

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

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55942
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: GLIB a graphics axe 3d librairy
« Reply #53 on: February 27, 2013, 03:38:10 pm »
According to the screenie, I would say more like 4.2 or 5 :P

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 #54 on: February 27, 2013, 09:17:31 pm »
What does the 42 mean then D:
(except the answer to life, the universe and everything)
« Last Edit: February 27, 2013, 09:17:50 pm by Sorunome »

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 #55 on: February 28, 2013, 03:43:49 am »
What does the 42 mean then D:
(except the answer to life, the universe and everything)

it's the FOV use to render.

According to the screenie, I would say more like 4.2 or 5 :P

no, for the frame, it's more 10fps (the screenshot is more slow than the real calc  :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 TheMachine02

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 452
  • Rating: +105/-0
  • me = EF99+F41A
    • View Profile
Re: GLIB a graphics axe 3d librairy
« Reply #56 on: March 18, 2013, 01:49:38 pm »
BIG UPDATE    :w00t:

-new command
-syntax command have change
-full support for 3,4 greyscale lvl and blck and white
-some very basic lightning stuff
-sorry no texture  :-\

List of command
-special command :
must be the first thing after the axe header, and they all must be here
-0/1->°LightOn    toggle on/off the lightning engine (save weight if you don't need it)

-0/1->°GBW
-0/1->°G3GreyLVL
-0/1->°G4GreyLVL     one of these three command must be on, and only one : choose the mode of display

-commands :
-GInit(FLAG)
init the declaration of vertex
FLAG is °GTRIANGLE or °GQUADRI

-GVertex(X,Z,Y)
define a vertex
draw when there is 3,or 4 vertices defines, depend on the FLAG option

-THE GEND() FUNCTION HAS BEEN REMOVE

-GRestoreID(NB_OF_FACE)
restore the list use for GDrawArray

-GSortID(ADD,NB_OF_FACE)
sort the faces  depending of the distance from the point in ADD and the pos of camera
ADD have the following format :
Data(X,Z,Y,X2,Z2,Y2 ...

-GDrawArray(ADD,NB_OF_FACE)
draw an array of vertex who have the following format :
Data(Norm,COLOR
Data(X,Z,Y
....
The number of vertex depend of the FLAG use to init
you can skip the second parameter if you have used GSortID() just before
color is all the following FLAG+ the flag °GLAMBERT, if you want to use light


FLAG->GColor
set the current face color

FLAG is :
in B&W mode
°GWHITE
°GBLACK

in 3GreyScale LVL
°GWHITE
°GGREY
°GBLACK

in 4 greyscales LVL
°GWHITE
°GGREY30
°GGREY60
°GBLACK

in all mode :
°GTWHITE   (wired aspect)

to use a light:
before the main loop put :
-1->{°GLIGHT}^r
in or before :
X->{°GLIGHT+3}
where x is the norm of the light

after, before the vertices def., you place GCalcLight(NORM_OF_FACE)->GColor at the place of FLAG->GColor
or use °GLAMBERT Flag if you use GDrawArray()

-GGetkey()
handle all the getkey


next step :
-Light at the same time than a Color definition (add the two)
-Texture

and two screenshot, B&W mode; 3 GreyLVL Mode, the  lib (ver 0.1) and the example prog  (note that I temporaly remove the Splash screen)

« Last Edit: June 27, 2013, 09:00:22 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 Streetwalrus

  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3821
  • Rating: +80/-8
    • View Profile
Re: GLIB a graphics axe 3d librairy
« Reply #57 on: March 18, 2013, 02:10:21 pm »
-0/1->°GBW
-0/1->°G3GreyLVL
-0/1->°G4GreyLVL     one of these three command must be on, and only one : choose the mode of display
Why isn't it simply 2/3/4->°Grays ? That would prevent one from making a mistake and be easier to read. ;)
Other than that, this thingy looks very nice. Keep up the good work. :thumbsup:
Good luck with textures. You'll probably have a hard time with them, as you'll have to work on a sprite deformation routine and this might affect performance greatly.
« Last Edit: March 18, 2013, 02:12:57 pm by Streetwalker »

Offline pimathbrainiac

  • Occasionally I make projects
  • Members
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1731
  • Rating: +136/-23
  • dagaem
    • View Profile
Re: GLIB a graphics axe 3d librairy
« Reply #58 on: March 18, 2013, 02:47:06 pm »
Cool!

* pimathbrainiac downloads
I am Bach.

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 #59 on: March 18, 2013, 06:22:30 pm »
Looking awesome as usual! :D

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