flat assembler
Message board for the users of flat assembler.
 Home   FAQ   Search   Register 
 Profile   Log in to check your private messages   Log in 
flat assembler > Windows > win3ds

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



Joined: 11 Jan 2006
Posts: 193
Location: Poland
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: 193
Location: Poland
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.hekko.pl/win/win3ds07.zip
Enjoy !
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: 15
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: 193
Location: Poland
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: 193
Location: Poland
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: 15

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: 193
Location: Poland
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.hekko.pl/win/win3ds08.zip
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: 193
Location: Poland
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.hekko.pl/win/win3ds09.7z


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

win3ds09_big.png


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: 193
Location: Poland
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.hekko.pl/win/win3ds10.7z
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: 152
Location: Poland
Very nice! Good work.

_________________
https://github.com/michal-z
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: 193
Location: Poland
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: 193
Location: Poland
Win3ds11
I added some GUI buttons to make work with app more comfortable.
http://macgub.hekko.pl/win/win3ds11.7z
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: 342
Location: ukraina
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 Send e-mail Reply with quote
macgub



Joined: 11 Jan 2006
Posts: 193
Location: Poland
Hi, best answer for topics you ask, is tranlate my tutorial ( http://macgub.hekko.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!
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: 193
Location: Poland
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: 193
Location: Poland
I traslated algorithm of drawing flat shaded single triangle from my tut:

Code:

Flat shading algorithm:

NOTEAlgorithm uses only integer variables.

1. Sort triangle vertices towards Y coordinates (from lowest to greatest).
2. Calculate increments between triangle vertices using equations:
adx12=(x2-x1)/(y2-y1b)dx13=(x3-x1)/(y3-y1c)dx23=(x3-x2)/(y3-y2when you calculate incrementsnumerator multiply by 256if denominator is equal 0then 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. Checkif not x11 =< x12 than exchange points order (x11,yand (x12,y).
7. Draw horizontal line from point (x11,yto point (x12,y).
8. x11=x11 + dx13it means xk1=xk1 + dx13
9. x12=x12 + dx12it 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. Checkif not x11 =< x12 than exchange points order (x11,yand (x12,y).
16. Draw horizontal line from point (x11,yto 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.

NOTESteps 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: 78
Location: Argentina
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: 342
Location: ukraina
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 Send e-mail Reply with quote
macgub



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

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.

_________________
https://github.com/michal-z
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  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


Powered by phpBB © 2001-2005 phpBB Group.

Main index   Download   Documentation   Examples   Message board
Copyright © 2004-2016, Tomasz Grysztar.