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 > MenuetOS > New 3ds.

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



Joined: 11 Jan 2006
Posts: 192
Location: Poland
New 3ds.
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).


Description: New 3ds. Coffe time.
Download
Filename: 3dstpotcone.7z
Filesize: 34.47 KB
Downloaded: 810 Time(s)

Post 15 May 2006, 08:54
View user's profile Send private message Visit poster's website Reply with quote
Madis731



Joined: 25 Sep 2003
Posts: 2146
Location: Estonia
Oh yeah - the classical teapot - I love it.

Btw, have you taken courses at school about 3D or you are a self-learner like me? Smile

You keep coming on with new algoritms all the time Wink its hard to keep up with your pace! Thank for what you've done.

I can see that you'd like to have external 3DS support - that is fun - less overhead for executable. And I agree that the support is minimal - showing only vertexes. At minimal we shoul implement culling because right now ALL the triangles are draw - no matter which way they are. Second is that we need colouring and textures to 3DS support.

I'll join you when I can with some more ideas - until then good luck!
Post 15 May 2006, 11:50
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger Reply with quote
macgub



Joined: 11 Jan 2006
Posts: 192
Location: Poland
Madis thanks for your like always fast reply. I am a self-learner like you Wink. I enjoy you want join once again to project. Happy coding.
Post 16 May 2006, 07:17
View user's profile Send private message Visit poster's website Reply with quote
Ville



Joined: 17 Jun 2003
Posts: 201
Very nice. Works without a hitch with Menuet 64 also.
Post 09 Jun 2006, 16:28
View user's profile Send private message Reply with quote
macgub



Joined: 11 Jan 2006
Posts: 192
Location: Poland
Ville, fell free to put my program on your website.
Post 13 Jun 2006, 07:40
View user's profile Send private message Visit poster's website Reply with quote
macgub



Joined: 11 Jan 2006
Posts: 192
Location: Poland
Next 3ds.
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.


Description:
Download
Filename: 3dstpotheart.7z
Filesize: 52.71 KB
Downloaded: 695 Time(s)

Post 20 Jun 2006, 07:14
View user's profile Send private message Visit poster's website Reply with quote
macgub



Joined: 11 Jan 2006
Posts: 192
Location: Poland
From this place, I want thanks to majuma (www.majuma.xt.pl) for great 13h mode demos.
Post 26 Jun 2006, 06:55
View user's profile Send private message Visit poster's website Reply with quote
Madis731



Joined: 25 Sep 2003
Posts: 2146
Location: Estonia
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 Sad
Post 27 Jun 2006, 09:46
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger Reply with quote
macgub



Joined: 11 Jan 2006
Posts: 192
Location: Poland
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.
Post 28 Jun 2006, 07:36
View user's profile Send private message Visit poster's website Reply with quote
Madis731



Joined: 25 Sep 2003
Posts: 2146
Location: Estonia
Ok, done and done Very Happy
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 Sad

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 Very Happy

At least this is my humble opinion Embarassed

_________________
My updated idol Very Happy http://www.agner.org/optimize/
Post 28 Jun 2006, 21:55
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger Reply with quote
macgub



Joined: 11 Jan 2006
Posts: 192
Location: Poland
"In Catmull mode you can zoom in infinatelly" - the cause is clipping on function.
Post 03 Jul 2006, 10:14
View user's profile Send private message Visit poster's website Reply with quote
Madis731



Joined: 25 Sep 2003
Posts: 2146
Location: Estonia
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 Razz just throwing some ideas.

PS. Now back-face-culling is done Very Happy
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 Very Happy
end if



The comparison sign may change depending on some calculation terms...
Post 04 Jul 2006, 18:39
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger Reply with quote
macgub



Joined: 11 Jan 2006
Posts: 192
Location: Poland
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.
Post 05 Jul 2006, 07:39
View user's profile Send private message Visit poster's website Reply with quote
Madis731



Joined: 25 Sep 2003
Posts: 2146
Location: Estonia
Sorry - I was on a holiday Razz

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 Smile
Post 31 Jul 2006, 17:45
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger Reply with quote
macgub



Joined: 11 Jan 2006
Posts: 192
Location: Poland
New 3ds
What was implemented?
1. Bump mapping model
2. All shading models avialable in Catmull mode.
Sorry you must wait for new version so long.


Description:
Download
Filename: Caritas.7z
Filesize: 38.81 KB
Downloaded: 652 Time(s)

Post 22 Aug 2006, 07:31
View user's profile Send private message Visit poster's website Reply with quote
Madis731



Joined: 25 Sep 2003
Posts: 2146
Location: Estonia
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 edxROUND
  push dx
  mov edx, [.scan_x2]
  sar edxROUND
  push dx
  mov edx, [.scan_y1]
  sar edxROUND
  push dx
  mov edx, [.scan_x1]
  sar edxROUND
  push dx
end if


Post 22 Aug 2006, 11:33
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger Reply with quote
Madis731



Joined: 25 Sep 2003
Posts: 2146
Location: Estonia
[remove]


Last edited by Madis731 on 07 Jun 2008, 09:24; edited 1 time in total
Post 01 Sep 2006, 18:56
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger Reply with quote
Madis731



Joined: 25 Sep 2003
Posts: 2146
Location: Estonia
TEST POST2 - this topic seems to be crashing something...there is actually no second page!
Post 01 Sep 2006, 18:57
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger Reply with quote
Madis731



Joined: 25 Sep 2003
Posts: 2146
Location: Estonia
TEST POST3 - this topic seems to be crashing something...there is actually no second page!
Post 01 Sep 2006, 18:57
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger Reply with quote
Madis731



Joined: 25 Sep 2003
Posts: 2146
Location: Estonia
TEST POST4 - this topic seems to be crashing something...there is actually no second page!
Post 01 Sep 2006, 18:58
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  
Goto page 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 can 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.