Join us on Discord!
You can help CodeWalrus stay online by donating here.

[gLib][3d][z80][ez80] gLib a fast 3D asm/axiom library

Started by TheMachine02, January 19, 2015, 05:10:01 PM

Previous topic - Next topic

0 Members and 3 Guests are viewing this topic.

Dream of Omnimaga

Isn't pixel shading a bit overkill for a calculator, if we're talking about the typical PC pixel shaders? Because I remember that in even 1998-2000 many video cards had no pixel shading support (or maybe it was just pixel shading 2.0 that wasn't supported?)
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

TheMachine02

Quote from: tr1p1ea on May 31, 2016, 12:11:25 PM
Cool, I was wondering how many degrees (0-360) you are rotating that model by per frame?

Also do you plan on making a project with it yourself, or just releasing as a lib?

The model rotate by ~0.7° (ie circle is represented by 512 subdivision) each frame. It kinda lack precision, but I don't really know why >_>.
About project, I guess I'll try to do something, but I don't promise anything. Developping the library is already pretty tough  :P

Quote from: DJ Omnimaga on May 31, 2016, 12:44:22 PM
Isn't pixel shading a bit overkill for a calculator, if we're talking about the typical PC pixel shaders?

Yeah, it won't definitly be like PC pixel shader. It is not like they have dedicated units to do this  :P However, I count texturing into pixel shading (with per pixel lightning calculation). Those may be too slow for the CE.... but I'll try one day  :P

EDIT :

So exporting blender material almost work (ie, I still need to remplace name with correct color), and that is pretty much cool.

Also put together hackish back face culling, which supreisely didn't speed up thing (it might be however just hided by the vsync (800000 TStates delta between frame, and the implementation is kinda loosy), but it show what precision is to expect from polygon. (For now, cause I plan to increase subpixel precision). There is also somme poly removed even if they shouldn't cause there is no double face poly support obviously.


Dream of Omnimaga

That new chocobo really looks great! The 2nd lower quality one doesn't look bad either, although the tail is a bit weird in it. Good job! :)
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

tr1p1ea

Yeah pretty sure it's the same model, but without double-sided polygons parts of the tail will disappear with backface-culling enabled.

Things are coming along very nicely though! When do you plan on implementing draw order/sorting?

I did some minor work on a chocobo model I found online to get it to 252 faces which might be a bit more calc friendly. I'll clean it up if you want to test it out?

Dream of Omnimaga

Ah I thought it was a different model with a much lower polygon count.

I definitively think that space shooter games with very simple 3D ship models (even if it means the wings are flat) or stick figure platformers could be doable.
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

TheMachine02

Quote from: tr1p1ea on May 31, 2016, 11:56:20 PM
Yeah pretty sure it's the same model, but without double-sided polygons parts of the tail will disappear with backface-culling enabled.

It is definitly what happen  ;)

Quote from: tr1p1ea on May 31, 2016, 11:56:20 PM
Things are coming along very nicely though! When do you plan on implementing draw order/sorting?
I did some minor work on a chocobo model I found online to get it to 252 faces which might be a bit more calc friendly. I'll clean it up if you want to test it out?

Well I can test (I just need the obj file and the mlt file and I can import it from there). Draw order is high on my todo list, but for now I am implementing correct data structure and optimizing a few thing (my triangle filling routine start to rock !). (yeah, I am kinda short of time with my exams coming next week)

But yeah, this calc as a lot of power to play with (and I have ony scratch the surface, I don't even use the $E30800 space right now (ie, space with less wait states when I read data)  :P
3D space shooter is more than doable.


EDIT : with tr1p1ea chocobo model :


Color are a bit off and I should have scaled it more, but it runs quite faster hopefully  :P There is 252 faces/168 verts.

Dream of Omnimaga

I like it. You should make a new screenshot with fixed colors and higher zoom :)
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

TheMachine02

Color fixed and zoom +



Look pretty nice  :P

EDIT : was bound to happen I think  >:D :



There is 256 frames needed for a complete turn here (twice as fast as chocobo's screens)

Lionel Debroux

Member of the TI-Chess Team.
Co-maintainer of GCC4TI (GCC4TI online documentation), TIEmu and TILP.
Co-admin of TI-Planet.

Dream of Omnimaga

That new chocobo is even better, and glad to see that tr1p1ea's :walrii: model is compatible :D
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

TheMachine02

Well he puted the walrii as a .obj on the thread, so I just needed to convert it. I have an (almost) working converter to get an include file from obj file.

Dream of Omnimaga

I wonder how the data looks like in z80 or C form, though. I don't have Blender but I am curious about if data can be converted easily for use on the HP Prime...
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

TheMachine02

Well you can convert obj to pretty much anything you want:  https://en.wikipedia.org/wiki/Wavefront_.obj_file
I just convert them to be able to read them more easily in asm (and scale + material handling). Depend on what you have on the Prime, I guess it could be easily done.


what happen ith an huge model (1841 vertices, 3485 faces)

Dream of Omnimaga

The Prime uses some sort of list of coordinates IIRC. 1 rectangle for example is something like ((0,0),(0,10),(10,10),(10,0)) or maybe it was with brackets.

Also that last model is running at quite good speeds considering how complex it is for calculators. :) Is that Lara Croft?
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

tr1p1ea

Very impressive! The lara croft is a nice achievement ... and good to see walrii running at a higher resolution!

I should really work on that model more :).

I saw on IRC that you were looking at trying to implement face sorting, have you had any luck?

Powered by EzPortal