flat assembler
Message board for the users of flat assembler.
Index
> MenuetOS > New 3ds. Goto page 1, 2, 3 Next |
Author |
|
macgub 15 May 2006, 08:54
New 3ds.
What was implememted ?: !. Shading vector light depend (No more "black holes"). 2. Lead color setting. 3. Better zoom in function (round problem fixed).
|
|||||||||||
15 May 2006, 08:54 |
|
macgub 16 May 2006, 07:17
Madis thanks for your like always fast reply. I am a self-learner like you . I enjoy you want join once again to project. Happy coding.
|
|||
16 May 2006, 07:17 |
|
Ville 09 Jun 2006, 16:28
Very nice. Works without a hitch with Menuet 64 also.
|
|||
09 Jun 2006, 16:28 |
|
macgub 13 Jun 2006, 07:40
Ville, fell free to put my program on your website.
|
|||
13 Jun 2006, 07:40 |
|
macgub 20 Jun 2006, 07:14
What's new?
1.2 new procedures drawing triangle using z-buffer Catmull alghoritm (better image quality). This new procedures can display correctly such object as eg. tetrahedrons. On teapot you can see better image quality by funnel and by handle of t. pot. New procedures have clipping on function. 2. Spherical environment mapping . FOr now only in sorting_faces mode. (catmull off). 3.Culling. (need perspective equations) 4.Perspective correction.
|
|||||||||||
20 Jun 2006, 07:14 |
|
macgub 26 Jun 2006, 06:55
From this place, I want thanks to majuma (www.majuma.xt.pl) for great 13h mode demos.
|
|||
26 Jun 2006, 06:55 |
|
Madis731 27 Jun 2006, 09:46
Macgub - have you had any success implementing 3DS-import. I've struggled with it for so long, but it works with included file and hand-written 3D, but not when I take it from a file
|
|||
27 Jun 2006, 09:46 |
|
macgub 28 Jun 2006, 07:36
I write, and compile 3DS program by FASMW, then run and test it under emulator (KlbInWin). IMHO to load 3ds file as external, memory managing functions are needed. Emulator not support this functions. For now I dont use KolibriOS very often - FAT32 functions would be better. When I use both WIndows and KolibriOS parallel, on the same files there are some disk problems and CHKDISK must be used.
|
|||
28 Jun 2006, 07:36 |
|
Madis731 28 Jun 2006, 21:55
Ok, done and done
http://menuet.2.forumer.com/index.php?showtopic=995&st=0&#entry6866 This is only wireframe because I am still looking for the perfect triangle filling algoritm...oh and btw, its 64-bit. The problem why loading from a file did not work was because my code supports transfering only -1,0 to 1,0 from 3D to 2D. If the house had some 50.0 or something inside then the rotation did not work correctly. I just divided everything with 100 and now its okey, but what if some points are 2487.253 or something Btw, I see you using painters algoritm for drawing, but I think you should first cull back faces, then do hidden surface removal and only then draw anything left on the screen!? EDIT: I'm looking about backface culling and I think I'm starting to succeed. I will pribably move all the changes to 32-bit also, but first I'll finish what I started. Other ideas I've got are making that catmull more interesting and make it recursive so you can zoom in infinately. Later, if we can manage to draw textures on it, we can think of a way to draw recursive-capable (think fractals) textures on faces and the zooming would be REALLY fun At least this is my humble opinion |
|||
28 Jun 2006, 21:55 |
|
macgub 03 Jul 2006, 10:14
"In Catmull mode you can zoom in infinatelly" - the cause is clipping on function.
|
|||
03 Jul 2006, 10:14 |
|
Madis731 04 Jul 2006, 18:39
The ultimate challenge is figuring out what objects can be recursive. One simple object is sphere. You don't even need verteces, but an XYZ and a radius. Then just make it render in a quality you want. The problem remains that other objects do not scale this way and the remain very primitive in the deeper zooms...
...aaah just throwing some ideas. PS. Now back-face-culling is done The algorithm goes something like this: We have three vertices: X0,Y0; X1,Y1; X2,Y2 They are already translated and rotated and ready to be drawn on screen. The drawing or not drawing is decided on weather the triangles are to be drawn clocwise or counter-clockwise. The simplest algorithm I've found so far is: Code: area = X0*Y1-Y0*X1+X1*Y2-Y1*X2+X2*Y0-Y2*X0 if area < 0 DRAW else ;DON'T end if The comparison sign may change depending on some calculation terms... |
|||
04 Jul 2006, 18:39 |
|
macgub 05 Jul 2006, 07:39
IMHO algorithm you have give is another words calculating normal. We drawing triangle when the "Z piece" of normal is greater then zero (or lower then zero, when we give points not clock-wise).
You have problem with coordinates: I suggest - just scale the object. When only one absoloute value of coordinate is greater then 1 then divide all coordinates by the greaters absolute value of coordinate. I don't know when I say it clear - sorry for my bad english. |
|||
05 Jul 2006, 07:39 |
|
Madis731 31 Jul 2006, 17:45
Sorry - I was on a holiday
I understand you but you say - division - the 6 multiplys I can do much quicker and shadow them with other instructions etc. and will never get a #DIV0 error |
|||
31 Jul 2006, 17:45 |
|
macgub 22 Aug 2006, 07:31
What was implemented?
1. Bump mapping model 2. All shading models avialable in Catmull mode. Sorry you must wait for new version so long.
|
|||||||||||
22 Aug 2006, 07:31 |
|
Madis731 22 Aug 2006, 11:33
It is a very nice addition to this demo - I think that bump-mapping can accept different sources and the 3DS file should be loaded on-the-fly.
I will see if I can make anything from this. Some problems: 1) M32/Kolibri don't support anything later than MMX, but it really needs some SSE tu bump the speed up. 2) In M32/Kolibri you can't drag&drop files that is a necessity to deal without any textboxes. 3) The linedrawing needs an integer approach, then you won't have any rounding errors, but my current best implementation of the Bresenham's line is in 64-bit registers and it will make heavy use of the stack if I convert it to 32-bit. I will post back any improvements... EDIT1: I MMXed the tex3.ASM at line 249 Its a small improvement so I won't post the whole code: Code: if Ext=MMX mov dword[esp-8],ROUND mov dword[esp-4],0 ; Is this a bug? Explanation down 3 lines movq mm0,qword[.scan_x1] movq mm1,qword[.scan_x2] psrad mm0,[esp-8] ;This instr. won't allow modifiers BYTE, WORD, etc. psrad mm1,[esp-8] ;It always defaults to QWORD packssdw mm0,mm1 movq [esp-8],mm0 sub esp,8 else mov edx, [.scan_y2] sar edx, ROUND push dx mov edx, [.scan_x2] sar edx, ROUND push dx mov edx, [.scan_y1] sar edx, ROUND push dx mov edx, [.scan_x1] sar edx, ROUND push dx end if |
|||
22 Aug 2006, 11:33 |
|
Madis731 01 Sep 2006, 18:56
[remove]
Last edited by Madis731 on 07 Jun 2008, 09:24; edited 1 time in total |
|||
01 Sep 2006, 18:56 |
|
Madis731 01 Sep 2006, 18:57
TEST POST2 - this topic seems to be crashing something...there is actually no second page!
|
|||
01 Sep 2006, 18:57 |
|
Madis731 01 Sep 2006, 18:57
TEST POST3 - this topic seems to be crashing something...there is actually no second page!
|
|||
01 Sep 2006, 18:57 |
|
Madis731 01 Sep 2006, 18:58
TEST POST4 - this topic seems to be crashing something...there is actually no second page!
|
|||
01 Sep 2006, 18:58 |
|
Goto page 1, 2, 3 Next < Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.