flat assembler
Message board for the users of flat assembler.
Index
> Windows > win3ds Goto page 1, 2, 3, 4, 5, 6 Next |
Author |
|
macgub 25 Jan 2013, 12:59
I ported (partially) my view3ds app for MenuetOS. For now it support several displaying models, please use SPACE key for switching, also make random lights (use TAB) and zoom in/out (use +/- keys).
Until them, enjoy... http://macgub.co.pl/win/win3ds00.zip Last edited by macgub on 16 Jan 2022, 16:13; edited 4 times in total |
|||
25 Jan 2013, 12:59 |
|
macgub 20 Feb 2013, 10:10
win3ds01 - I added several sse4.1 optimizations (using "pblendvb" instruction). When you haven't sse4.1 machine you can use sse2 version but it slower than completly unoptimized x86 code ("maskmovdqu" instruction I used to, operates on non temporal variables). I added viewing edges only drawing model, which plots smooth shaded wire-frame. All without OpenGL touching.
http://macgub.co.pl/win/win3ds01.zip Last edited by macgub on 16 Jan 2022, 16:13; edited 3 times in total |
|||
20 Feb 2013, 10:10 |
|
comrade 22 Feb 2013, 10:15
Niiicceee!!
|
|||
22 Feb 2013, 10:15 |
|
randall 22 Feb 2013, 14:48
Great work!
|
|||
22 Feb 2013, 14:48 |
|
macgub 25 Feb 2013, 07:35
Thanks guys for your opinions.
|
|||
25 Feb 2013, 07:35 |
|
macgub 11 Mar 2013, 11:38
Win3ds02. I added ability load external .3ds file. (App open dialog at start). I implemented on/off motion blur option (press F1 key) and play with float Zbuffer coordinates also using AVX instructions -> flat shading, last drawing model; but it decreases app speed
app: http://macgub.co.pl/win/win3ds02.zip a few 3ds objects: http://macgub.co.pl/menuet/3ds_view/3ds_objects.tgz Last edited by macgub on 16 Jan 2022, 16:14; edited 3 times in total |
|||
11 Mar 2013, 11:38 |
|
macgub 22 Oct 2013, 10:09
Win3ds03. I added new displaying models based on textured lines (Press space several times). Texture can be like in environment mapping or red-white stripes like in texture mapping displaying model). I added also predefined 3d model as an alternative to model loaded from file (switching beetwen models after hit F2).
http://macgub.co.pl/win/win3ds03.zip -> application http://macgub.co.pl/menuet/3ds_view/3ds_objects.tgz -> sample 3d objects Last edited by macgub on 16 Jan 2022, 16:14; edited 3 times in total |
|||
22 Oct 2013, 10:09 |
|
Roman 31 Oct 2013, 08:56
macgub
Good work ! I know how not easy to write such code. Be stubborn and believe in yourself ! You can write an article on how load 3ds model. |
|||
31 Oct 2013, 08:56 |
|
cod3b453 05 Nov 2013, 18:00
It's stuff like this that makes me wish I had a CPU with AVX... Looks amazing though
|
|||
05 Nov 2013, 18:00 |
|
macgub 07 Nov 2013, 07:30
@ Roman
Oops, my mistake the code witch load 3ds file contains about 100 lines. Code: read_from_file: fninit mov edi,triangles ; triangles -> contains lsit of polygons xor ebx,ebx ; each poligon 3 word integer -index ; to points_r xor ebp,ebp mov [points_count_var],0 mov [triangles_count_var],0 mov esi,[File_ptr] cmp [esi],word 4D4Dh jne .exit ;Must be legal .3DS file mov eax,dword[esi+2] ; cmp eax,[fsize] ; jne .exit add eax,esi mov [EndFile],eax ; add esi,6 @@: cmp [esi],word 3D3Dh je @f add esi,[esi+2] jmp @b @@: add esi,6 .find4k: cmp [esi],word 4000h je @f add esi,[esi+2] cmp esi,[EndFile] jc .find4k jmp .exit @@: add esi,6 @@: cmp [esi],byte 0 je @f inc esi jmp @b @@: inc esi @@: cmp [esi],word 4100h je @f add esi,[esi+2] jmp @b @@: add esi,6 @@: cmp [esi],word 4110h je @f add esi,[esi+2] jmp @b @@: movzx ecx,word[esi+6] add [points_count_var],cx mov edx,ecx add esi,8 @@: push edi mov edi,points_r ; each point 3 dwords float -> x, y, z push dword[esi+4] pop dword[edi+ebx*2+0] push dword[esi+8] pop dword[edi+ebx*2+4] push dword[esi+0] pop dword[edi+ebx*2+8] pop edi add ebx,6 add esi,12 dec ecx jnz @b @@: push edi mov edi,points_r mov dword[edi+ebx*2],-1 ; end mark (not always in use) pop edi @@: cmp [esi],word 4120h je @f add esi,[esi+2] jmp @b @@: movzx ecx,word[esi+6] add [triangles_count_var],cx add esi,8 @@: movsd movsw add word[edi-6],bp add word[edi-4],bp add word[edi-2],bp add esi,2 dec ecx jnz @b add ebp,edx jmp .find4k mov eax,-1 ;<---mark if OK .exit: mov dword[edi],-1 ret @Cod AVX version is not so fast like you expected, its rather slowly than sse2 version. It was only first try |
|||
07 Nov 2013, 07:30 |
|
Roman 07 Nov 2013, 18:43
how about texture? When support textures ?
Best way to direct you work to ray tracing and global illumination. Because video cards very fast display 3d models and textures. But raytracing helpfull on CPU witch AVX or SSE4 |
|||
07 Nov 2013, 18:43 |
|
macgub 08 Nov 2013, 07:22
All textured are generated. I don't load texture from file.
|
|||
08 Nov 2013, 07:22 |
|
macgub 17 Jan 2014, 13:16
Win3ds04 can produce images like this:
I implemented bumps map texture dependent, fixed bug badly textured lines, plain lines without z coordinate interpolation (code posted some time ago by PabloReda) etc... http://macgub.co.pl/win/win3ds04.zip Last edited by macgub on 16 Jan 2022, 16:14; edited 5 times in total |
|||
17 Jan 2014, 13:16 |
|
catafest 20 Feb 2014, 10:58
@macgub
try to use shaders ... also cuda implementation will be great ... also clean your code ... (sorry about this ...) |
|||
20 Feb 2014, 10:58 |
|
Fixit 21 Feb 2014, 03:59
Excellent graphics and detail.
|
|||
21 Feb 2014, 03:59 |
|
macgub 24 Feb 2014, 07:14
Thanks for your replies. Unfortunatelly my hardware don't suport CUDA. Also using shaders is for me rather difficult, any example ?
|
|||
24 Feb 2014, 07:14 |
|
macgub 15 Sep 2014, 06:49
I added editor wich produce solid object using rotared bezier curve. Result is displayed on fly. Editor mode avialable after pressing F2 key several times.
http://macgub.co.pl/win/win3ds05.zip Last edited by macgub on 16 Jan 2022, 16:15; edited 3 times in total |
|||
15 Sep 2014, 06:49 |
|
macgub 15 Feb 2015, 15:59
I added *.asc models support, read and write. To write current object to object.asc file press F8.
http://www.macgub.co.pl/win/win3ds06.zip - binaries and sources. http://www.macgub.co.pl/win/asc_objects.zip - example asc objects Last edited by macgub on 16 Jan 2022, 16:15; edited 3 times in total |
|||
15 Feb 2015, 15:59 |
|
Mikl___ 20 Feb 2015, 02:49
Hi, macgub !
binary and source
|
||||||||||||||||||||
20 Feb 2015, 02:49 |
|
Goto page 1, 2, 3, 4, 5, 6 Next < Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.