flat assembler
Message board for the users of flat assembler.

Index > Windows > win3ds

Goto page Previous  1, 2, 3, 4, 5, 6  Next
Author
Thread Post new topic Reply to topic
macgub



Joined: 11 Jan 2006
Posts: 348
Location: Poland
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. Very Happy
Post 20 Feb 2015, 08:04
View user's profile Send private message Visit poster's website Reply with quote
macgub



Joined: 11 Jan 2006
Posts: 348
Location: Poland
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
Post 19 May 2015, 07:59
View user's profile Send private message Visit poster's website Reply with quote
ly47



Joined: 24 Sep 2010
Posts: 28
ly47 19 May 2015, 17:34
Hi macqub
I'm getting an error message for win3ds03 to win3ds07 as follow:
flat assembler version 1.71.39 (1048576 kilobytes memory)
win3ds03.asm (411) :
mov [sin_gamma],0.17364817766693034885171662676931
error: invalid value.
>Exit code: 0

why ??
thanks
ly
Post 19 May 2015, 17:34
View user's profile Send private message Reply with quote
macgub



Joined: 11 Jan 2006
Posts: 348
Location: Poland
macgub 20 May 2015, 06:46
I don't know. I compile with FASM 1.69.50 and all is OK. So... Question
Post 20 May 2015, 06:46
View user's profile Send private message Visit poster's website Reply with quote
macgub



Joined: 11 Jan 2006
Posts: 348
Location: Poland
macgub 20 May 2015, 07:05
OK. I uploaded fixed version win3ds07. Link as above. Compiles correctly in FASM 1.71.39
Post 20 May 2015, 07:05
View user's profile Send private message Visit poster's website Reply with quote
ly47



Joined: 24 Sep 2010
Posts: 28
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
Post 21 May 2015, 05:59
View user's profile Send private message Reply with quote
macgub



Joined: 11 Jan 2006
Posts: 348
Location: Poland
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
Post 27 Jun 2015, 15:09
View user's profile Send private message Visit poster's website Reply with quote
macgub



Joined: 11 Jan 2006
Posts: 348
Location: Poland
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


Description:
Filesize: 70.83 KB
Viewed: 22466 Time(s)

win3ds09_big.png




Last edited by macgub on 16 Jan 2022, 16:16; edited 3 times in total
Post 08 Sep 2015, 11:25
View user's profile Send private message Visit poster's website Reply with quote
macgub



Joined: 11 Jan 2006
Posts: 348
Location: Poland
macgub 29 Oct 2015, 07:41
Hi, I want proudly present:
win3ds10. Wink
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
Post 29 Oct 2015, 07:41
View user's profile Send private message Visit poster's website Reply with quote
randall



Joined: 03 Dec 2011
Posts: 155
Location: Poland
randall 03 Nov 2015, 11:29
Very nice! Good work.
Post 03 Nov 2015, 11:29
View user's profile Send private message Visit poster's website Reply with quote
macgub



Joined: 11 Jan 2006
Posts: 348
Location: Poland
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.
Post 05 Nov 2015, 07:40
View user's profile Send private message Visit poster's website Reply with quote
macgub



Joined: 11 Jan 2006
Posts: 348
Location: Poland
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
Post 24 Jan 2016, 13:01
View user's profile Send private message Visit poster's website Reply with quote
idle



Joined: 06 Jan 2011
Posts: 440
Location: Ukraine
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
Post 11 Feb 2016, 16:34
View user's profile Send private message Reply with quote
macgub



Joined: 11 Jan 2006
Posts: 348
Location: Poland
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
Post 12 Feb 2016, 09:11
View user's profile Send private message Visit poster's website Reply with quote
macgub



Joined: 11 Jan 2006
Posts: 348
Location: Poland
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...
Post 15 Feb 2016, 17:09
View user's profile Send private message Visit poster's website Reply with quote
macgub



Joined: 11 Jan 2006
Posts: 348
Location: Poland
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. 
    
[/code]
Post 16 Feb 2016, 08:15
View user's profile Send private message Visit poster's website Reply with quote
pabloreda



Joined: 24 Jan 2007
Posts: 116
Location: Argentina
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
Post 16 Feb 2016, 12:39
View user's profile Send private message Visit poster's website Reply with quote
idle



Joined: 06 Jan 2011
Posts: 440
Location: Ukraine
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 Smile
Post 16 Feb 2016, 16:54
View user's profile Send private message Reply with quote
macgub



Joined: 11 Jan 2006
Posts: 348
Location: Poland
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. Wink
Post 17 Feb 2016, 11:06
View user's profile Send private message Visit poster's website Reply with quote
randall



Joined: 03 Dec 2011
Posts: 155
Location: Poland
randall 17 Feb 2016, 11:28
idle wrote:
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 Smile


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.
Post 17 Feb 2016, 11:28
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  
Goto page Previous  1, 2, 3, 4, 5, 6  Next

< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.