• [Axiom] AxeJH3D, a(n almost) complete axiom for 3D development ! 5 2
Currently:  

Author Topic: [Axiom] AxeJH3D, a(n almost) complete axiom for 3D development !  (Read 33622 times)

0 Members and 1 Guest are viewing this topic.

Offline tr1p1ea

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 647
  • Rating: +110/-0
    • View Profile
Re: [Axiom] AxeJH3D, a(n almost) complete axiom for 3D development !
« Reply #60 on: May 02, 2013, 02:05:35 am »
I suppose because there would still be a lot of detail required and calc 3D is pretty limited in complexity. But still worth a shot.
"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: [Axiom] AxeJH3D, a(n almost) complete axiom for 3D development !
« Reply #61 on: May 02, 2013, 11:37:46 am »
3d rpg is my final goal with glib  :P
and if I ever do it, it will be very simplified  ;D  (like only rooms, I not very sure how we can do optimized nature place, 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 Matrefeytontias

  • Axe roxxor (kinda)
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1982
  • Rating: +310/-12
  • Axe roxxor
    • View Profile
    • RMV Pixel Engineers
Re: [Axiom] AxeJH3D, a(n almost) complete axiom for 3D development !
« Reply #62 on: May 04, 2013, 04:56:02 am »
Small update :)

All drawing commands now takes an additional argument : 0 for black drawing, 1 for solid white. This makes solid display possible for you guys :thumbsup:

Also, if you can think of any functionality that you'd like to see in the axiom, please tell us because I'm a bit out of inspiration :P

Offline Hayleia

  • Programming Absol
  • Coder Of Tomorrow
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3367
  • Rating: +393/-7
    • View Profile
Re: [Axiom] AxeJH3D, a(n almost) complete axiom for 3D development !
« Reply #63 on: May 04, 2013, 04:57:49 am »
Small update :)

All drawing commands now takes an additional argument : 0 for black drawing, 1 for solid white. This makes solid display possible for you guys :thumbsup:
Great :D

Also, if you can think of any functionality that you'd like to see in the axiom, please tell us because I'm a bit out of inspiration :P
Well you already know them: clipping and textures :P
(I think clipping is more of a priority than textures if you support solid drawing with "colors")
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

Offline Matrefeytontias

  • Axe roxxor (kinda)
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1982
  • Rating: +310/-12
  • Axe roxxor
    • View Profile
    • RMV Pixel Engineers
Re: [Axiom] AxeJH3D, a(n almost) complete axiom for 3D development !
« Reply #64 on: May 04, 2013, 04:59:29 am »
Textures will come later (they'll come ;D), but yeah I forgot about clipping :P I'll take care of that, even if it's not a functionality.

Offline Matrefeytontias

  • Axe roxxor (kinda)
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1982
  • Rating: +310/-12
  • Axe roxxor
    • View Profile
    • RMV Pixel Engineers
Re: [Axiom] AxeJH3D, a(n almost) complete axiom for 3D development !
« Reply #65 on: May 14, 2013, 01:52:07 pm »
Good news :)

I wrote a perfectly working (100% success rate :thumbsup:) clipped triangle routine in Axe, and I'm working on editing the current ASM triangle routine :D  It's not too much things added, so you'll probably see it in ASM before next week.



It's going so fast that I don't have the time to release the button while it draws another triangle :P

Also, ben_g and me are working on a SortFaces(Zarray, facesArray, outputArea) automagic, to sort your faces to handle occlusion and make your life easier ;D
« Last Edit: May 14, 2013, 01:53:10 pm by Matrefeytontias »

Offline Matrefeytontias

  • Axe roxxor (kinda)
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1982
  • Rating: +310/-12
  • Axe roxxor
    • View Profile
    • RMV Pixel Engineers
Re: [Axiom] AxeJH3D, a(n almost) complete axiom for 3D development !
« Reply #66 on: May 28, 2013, 12:13:22 pm »
Bad news ...

I can't write a proper clipped triangle. I don't know why, but this just doesn't want to work. I re-read the code many many times and still can't see the error. If you guys wanna help me with this, here is the complete AxeJh3D code at pastebin.

Actually, clipping works perfectly with y < 0, y > 63, x > 95 but not with x < 0. I also attached a small Axe program to test the routine, if you want to see what's wrong or to fix it.

I need to explain some things related to the way I draw the triangle. First, I constantly use 3 variables : startX1 and startX2, two 16.8 numbers, which refers to the left and right pixels of the line to draw (because I draw the triangle with horizontal lines), startY, which is the Y coordinate of the line. I also constantly add two 8.8 variables to startX1 and startX2, namely dx1 and dx2, which are the slope of each side (dx1 is updated during the process to the slope of the 3rd edge of the triangle). I did it that way because with only 8.8 startX*, the triangle went too fast from 127 to -128, making the triangle being drawn wrongly. So by doing that, my goal was to fix that error, since it's harder to go from 32767 to -32768.

EDIT : with help from Runer112 on IRC, we made it that the triangle is properly clipped when x < 0 ; but the 127→-128 thing still appears, so the problem is not solved yet.
« Last Edit: May 28, 2013, 01:17:32 pm by Matrefeytontias »

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: [Axiom] AxeJH3D, a(n almost) complete axiom for 3D development !
« Reply #67 on: June 10, 2013, 11:55:00 pm »
How do I compile the program? If I try to, the calc just shuts off then I get a RAM Clear ???

Offline tr1p1ea

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 647
  • Rating: +110/-0
    • View Profile
Re: [Axiom] AxeJH3D, a(n almost) complete axiom for 3D development !
« Reply #68 on: June 11, 2013, 01:13:58 am »
Since you are clipping triangles in 2D, you will need to see if the length of any slice is > 128 and dont draw if this is so. This usually means that the triangle is ultra close to the viewer anyway so should be ok.

If you are wanting to make an indoor room however, you might need to look at 3D clipping techniques.
"My world is Black & White. But if I blink fast enough, I see it in Grayscale."


Offline Eiyeron

  • Urist McEiyolobster
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1430
  • Rating: +130/-10
  • (-_(//));
    • View Profile
    • Rétro-Actif : Rétro/Prog/Blog
Re: [Axiom] AxeJH3D, a(n almost) complete axiom for 3D development !
« Reply #69 on: August 19, 2013, 06:00:02 pm »
How that works? I understood that MatrxRot prepare the matrix, that RotVertx rotates coordonates with the matrix and ProjVertew give us some coords, but why when using on a simple point it gets crazy rotztuons?

Code: [Select]
0->I
Repeat GetKey(15)
CalcMatrx(I,0,)
RotVertx(10,0,0,L1)
ProjVertx({L1}^r, {L1+2}^r, {L1+4}^r)->A
Pxl-On(A^256, A/256)
DispGraphClearDraw
I++
End
Why do I get a point that goes berzerk and go erratically?

Offline Matrefeytontias

  • Axe roxxor (kinda)
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1982
  • Rating: +310/-12
  • Axe roxxor
    • View Profile
    • RMV Pixel Engineers
Re: [Axiom] AxeJH3D, a(n almost) complete axiom for 3D development !
« Reply #70 on: August 19, 2013, 06:24:39 pm »
You need to add an offset to {L1+4}r (150 works fine) so that the point doesn't project right at your eyes, but a little further. I'm very glad to finally see someone trying to use the axiom ^^
« Last Edit: August 19, 2013, 06:25:28 pm by Matrefeytontias »

Offline Eiyeron

  • Urist McEiyolobster
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1430
  • Rating: +130/-10
  • (-_(//));
    • View Profile
    • Rétro-Actif : Rétro/Prog/Blog
Re: [Axiom] AxeJH3D, a(n almost) complete axiom for 3D development !
« Reply #71 on: August 19, 2013, 06:29:29 pm »
Yay I got a spinning dot! 3D can finally be studyied, thanks!

Offline Matrefeytontias

  • Axe roxxor (kinda)
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1982
  • Rating: +310/-12
  • Axe roxxor
    • View Profile
    • RMV Pixel Engineers
Re: [Axiom] AxeJH3D, a(n almost) complete axiom for 3D development !
« Reply #72 on: August 19, 2013, 07:06:57 pm »
You're welcome :) keep us informed about your work ! I'd love to see moar 3D stuffs coming up !

Offline Eiyeron

  • Urist McEiyolobster
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1430
  • Rating: +130/-10
  • (-_(//));
    • View Profile
    • Rétro-Actif : Rétro/Prog/Blog
Re: [Axiom] AxeJH3D, a(n almost) complete axiom for 3D development !
« Reply #73 on: August 19, 2013, 07:13:48 pm »
I just noted that Quad should need vertices in order, right? Oh, and xhat's the offset for quad?

Offline Matrefeytontias

  • Axe roxxor (kinda)
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1982
  • Rating: +310/-12
  • Axe roxxor
    • View Profile
    • RMV Pixel Engineers
Re: [Axiom] AxeJH3D, a(n almost) complete axiom for 3D development !
« Reply #74 on: August 20, 2013, 08:52:13 am »
Quad( will need the inputted vertices to be ... inputted as follows :
Code: [Select]
1---------2
|         |
4---------3
Rotated in any way of course.
You use the function in that way :

Quad(OFFSETS, TABLE, COLOR)

OFFSETS is a pointer on 41-bytes values, which are multiples of 6 : they will be added to TABLE, which is a pointer on a table of 6-bytes vertices (don't forget to rotate them before drawing). COLOR is 0 for black and 1 for solid white. Example :

Quad(Data(24,48,6,12), GDB1ROT, 1)

Will draw a white quad out of the 4th, 8th, 1st and 2nd vertices of the vertices table situated at GDB1ROT.

EDIT : not sure about the multiples of 6, I guess you can just test it. Maybe in the example it's just Data(4,8,1,2), I don't remember :/
« Last Edit: August 20, 2013, 08:58:00 am by Matrefeytontias »