flat assembler
Message board for the users of flat assembler.
Index
> Windows > win3ds Goto page Previous 1, 2, 3, 4, 5, 6 Next |
Author |
|
macgub 20 Feb 2015, 08:04
Hi Mikl.
You uploaded OpenGL example. I make app non ogl. It is more operating system and any library independent. Thanks anyway. |
|||
20 Feb 2015, 08:04 |
|
macgub 19 May 2015, 07:59
win3ds07. I added multi Bezier curves editing option (goes to rotary solid object) and new editing possibility - Bezier pipes (after pressing F2 several Times). I added also saving to 3ds file option. More info in readme.txt file in package:
http://macgub.co.pl/win/win3ds07.zip Enjoy ! Last edited by macgub on 16 Jan 2022, 16:16; edited 3 times in total |
|||
19 May 2015, 07:59 |
|
macgub 20 May 2015, 06:46
I don't know. I compile with FASM 1.69.50 and all is OK. So...
|
|||
20 May 2015, 06:46 |
|
macgub 20 May 2015, 07:05
OK. I uploaded fixed version win3ds07. Link as above. Compiles correctly in FASM 1.71.39
|
|||
20 May 2015, 07:05 |
|
ly47 21 May 2015, 05:59
macgub wrote: OK. I uploaded fixed version win3ds07. Link as above. Compiles correctly in FASM 1.71.39 Hi Thanks I have fixed it myself by changing lines like: mov [Bz1_axis],0.0 to: mov dword[Bz1_axis],0.0 Thanks again ly |
|||
21 May 2015, 05:59 |
|
macgub 27 Jun 2015, 15:09
win3ds08. Main change is: every segment of rotated Bezier solid can be rotated independent. Choosing active Bezier segment by pressing F9 - cyclic switching. More info, please read readme.txt file.
http://macgub.co.pl/win/win3ds08.zip Last edited by macgub on 16 Jan 2022, 16:16; edited 3 times in total |
|||
27 Jun 2015, 15:09 |
|
macgub 08 Sep 2015, 11:25
win3ds09. Bezier pipes editing option. Each segment can be rotated indywidually. Also posibility to edit pipes and Bezier curves based rotated solids parerell.
http://macgub.co.pl/win/win3ds09.7z
Last edited by macgub on 16 Jan 2022, 16:16; edited 3 times in total |
||||||||||
08 Sep 2015, 11:25 |
|
macgub 29 Oct 2015, 07:41
Hi, I want proudly present:
win3ds10. I implemented displacement mapping texture dependent. This option requires correctly declared vertexes (non mismatched senses of normal vectors). This effect looks good on objects described with many triangles - (I added dividing face into smaller faces option). Also posibility to load texture (512X512 24bit 0xRRGGBB raw uncompressed format), and simple texture moving directly on object, was added. http://macgub.co.pl/win/win3ds10.7z Last edited by macgub on 16 Jan 2022, 16:17; edited 3 times in total |
|||
29 Oct 2015, 07:41 |
|
randall 03 Nov 2015, 11:29
Very nice! Good work.
|
|||
03 Nov 2015, 11:29 |
|
macgub 05 Nov 2015, 07:40
There is such problem: when one triangle is divided to four triangles, and this is repeated a few times, arises many triangles that are on the same flat surface. So such flat area don't looks nice when only direction lights are using; (for now only such lights I implemented). Such situation need points lights.
|
|||
05 Nov 2015, 07:40 |
|
macgub 24 Jan 2016, 13:01
Win3ds11
I added some GUI buttons to make work with app more comfortable. http://macgub.co.pl/win/win3ds11.7z Last edited by macgub on 16 Jan 2022, 16:17; edited 3 times in total |
|||
24 Jan 2016, 13:01 |
|
idle 11 Feb 2016, 16:34
Hi, can you tell in short about:
- 3d-2d coords mapping - primitives (dots, triangles?) for model representation - simple-most shading THANX |
|||
11 Feb 2016, 16:34 |
|
macgub 12 Feb 2016, 09:11
Hi, best answer for topics you ask, is tranlate my tutorial ( http://macgub.co.pl/%21shading) into english. but I try short answer for for this subjects:
ad3 Simplest shading is flat shading. We drawing triangle filled only one color. To draw such triangle we interpolate x coordinates along y coordinate. (the begin and end of horizontal line) then we draw single line by ex. rep stosd (in 32 bit mode). Whole triangle is filled by such horizontal lines. When we want use Zbuffer we should interpolate z coord also. ad2 Drawing dots is simply drawing all vertices ( scaled and translated into app window). ad1 To draw 3d object in 2d screen we use perspective equations or we use axis z gradient (obliquity), or (so I done in my app ) just skip z coordinate (parallel projection). Sorry for to short answer, poor english. Thanks anyway for your reply. Im going to translate my tut soon. Good luck! Last edited by macgub on 16 Jan 2022, 16:18; edited 3 times in total |
|||
12 Feb 2016, 09:11 |
|
macgub 15 Feb 2016, 17:09
Hi!
You may also take a look at (for example): http://www.futuretech.blinkenlights.nl/graphics.html I think, internet is full of well done tutorials. I search a bit and i'm suprised positively. So if so many papers describes those problems, there is no so large need to translate my tutorial. So I 'm not convicent I do it soon (or ever). Sorry... |
|||
15 Feb 2016, 17:09 |
|
macgub 16 Feb 2016, 08:15
I traslated algorithm of drawing flat shaded single triangle from my tut:
Code: Flat shading algorithm: NOTE: Algorithm uses only integer variables. 1. Sort triangle vertices towards Y coordinates (from lowest to greatest). 2. Calculate increments between triangle vertices using equations: a) dx12=(x2-x1)/(y2-y1) b)dx13=(x3-x1)/(y3-y1) c)dx23=(x3-x2)/(y3-y2) when you calculate increments, numerator multiply by 256, if denominator is equal 0, then make increment dx = 0. 3. x11=x1; x12=x1, it means xk1=256x1; xk2=256x1 4. y=y1 5. x11=xk1/256; x12=xk2/256 6. Check, if not x11 =< x12 than exchange points order (x11,y) and (x12,y). 7. Draw horizontal line from point (x11,y) to point (x12,y). 8. x11=x11 + dx13, it means xk1=xk1 + dx13 9. x12=x12 + dx12, it means xk2=xk2 + dx12 10. y=y+1 11. If y < y2 than repeat from 5 step. 12. x11=x11 (none change); x12=x2, it means xk1 without change so like after loop end; xk3 = 256 * x2 13. y = y2 14. x11 = xk1/256; x12 = xk3/256; 15. Check, if not x11 =< x12 than exchange points order (x11,y) and (x12,y). 16. Draw horizontal line from point (x11,y) to point (x12,y). 17. x11 = x11+dx13; it means xk1 = xk1 + dx13. 18. x12 = x12 + dx23; it means xk3 = xk3 + dx23. 19.If y < y3 than repeat from 14 step. NOTE: Steps 4-11 and 13-20 should be implemented as loops. Multiplication and division by 256 should be implemented as bit shifts. |
|||
16 Feb 2016, 08:15 |
|
pabloreda 16 Feb 2016, 12:39
mac
if you draw a triangle, not need check if x-ini and x-end swap, step 6 and step 15 can be done outside the loop |
|||
16 Feb 2016, 12:39 |
|
idle 16 Feb 2016, 16:54
These days it seems a magic to me.
Anyway thank you for the push/direction. According OGL: just using it does not suffice - internals with formulas and principles do. That's why we are here |
|||
16 Feb 2016, 16:54 |
|
macgub 17 Feb 2016, 11:06
Thanks for replies.
Pablo You are right, nice improvement. It will spare some clockcycles. Maybye I defeat my laziness and implement it in my drawing_triangle procs. |
|||
17 Feb 2016, 11:06 |
|
randall 17 Feb 2016, 11:28
idle wrote: These days it seems a magic to me. OGL internals just translates API function calls to GPU native commands and pushes sets of those commands (called command buffers) to the HW. There is no magic. Just huge pile of often ugly code. |
|||
17 Feb 2016, 11:28 |
|
Goto page Previous 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.