flat assembler
Message board for the users of flat assembler.
Index
> OS Construction > fool 3D |
Author |
|
edfed 04 Mar 2012, 21:37
i recentlly refunded my old 3D_processing.rar (maybe the only time i used the .rar extension) code, in order to apply the fool structuration to every part of the 3D engine.
i had more advanced versions of the 3Dengine, but there were too much code inside to refactor it easy. then, i took the first version. now, i have a better code, that shows the way to do 3D render. shortcuts: Code: qwerty left clic, Q=accelerate right clic, middle clic, W=decelerate E=toogle edges D=toogle dots S=link camera to the first star of the starfield T=toogle triangles O=toogle sincos method (fixed point or floating point) P=toogle line method (with putpixel or direct) L=toogle the 2D display G=toogle palette (default or flashy) home=return to the initial camera position. mouse motion counter, up, down, left, right= rotate the camera. esc=exit enjoy, but it is a bit frustrating to don't have more than that for the moment. look at the version number, no number for the moment cause it should be integrated to the 2D fool interface as a simple set of 3D functions.
Last edited by edfed on 18 Mar 2012, 21:54; edited 1 time in total |
|||||||||||
04 Mar 2012, 21:37 |
|
Coty 08 Mar 2012, 19:57
This is great, thanks, I'll have to take it apart and mess with it
|
|||
08 Mar 2012, 19:57 |
|
Dex4u 08 Mar 2012, 21:26
Thanks edfed.
|
|||
08 Mar 2012, 21:26 |
|
pabloreda 09 Mar 2012, 00:16
nice lib edfed...
I have a implementation in fixed point..perhaps you can use something sin and cos aproximation in 16.16 (i try loockup table and this is best) http://code.google.com/p/reda4/source/browse/trunk/r4/Lib/math.txt if you need this in asm tell me and I traslate for you |
|||
09 Mar 2012, 00:16 |
|
Dex4u 09 Mar 2012, 03:34
Hi pabloreda.
I have not seen you around for some time, how is reda4 going ?. |
|||
09 Mar 2012, 03:34 |
|
pabloreda 09 Mar 2012, 11:56
Hi dex.
Near of optimizer compiler, I notice here when I get ready !! |
|||
09 Mar 2012, 11:56 |
|
Tomasz Grysztar 09 Mar 2012, 12:12
Looks a bit like Elite/Frontier to me.
|
|||
09 Mar 2012, 12:12 |
|
edfed 11 Mar 2012, 15:39
pabloreda wrote: nice lib edfed... it is still in fixed point. 24:8 with 24 part =0, and 8 part as fractional part of 1. it is the maximum i can use to do 32 bits fixed point for 3D. with 16:16, i will be limited to 65536 3Dpitch depth. what is like just smaller than the 'incal.inc' model. then, not good at all cause we'll never see the stars. or maybe do a 16:16 for near, and 24:8 for far. hem... no, floating point for everybody. i will make it floating point. it is the only good way to do 3D computations. using the floatting point, even if limited in resolution, will let play with really huge scenes. 32bits fp will be enough for the begining. using sse would improve a lot performance. especially when it will do matrix based 3D tranforms. cause for now, there are no matrix for the 3D transform, just 2 vectors. translation, and rotation, and only the translation here is reccursive. that's why objects cannot rotate. only the camera rotation is taken in account. about this rotation, i think a rotate container will be an acceptable solution. then, to rotate an object, just use a rot3D, like put3D tranlate. the rot3D function is still there, but it don't works as wanted. in this model, the nested transforms are simple. in theory, add the angles components of the item and the camera. then, use this angle to rotate the translation component of the item, before to add it to the camera position. and it should work. but don't wor, when i tryed it, the object effectivelly rotates, but in another dimension. lol. it is just a mistake, one day, it will work, maybe with the first digit based version number . thanks all. |
|||
11 Mar 2012, 15:39 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.