Omnimaga: The Coders Of Tomorrow
Welcome, Guest. Please login or register.
 
Omnimaga: The Coders Of Tomorrow
24 May, 2013, 23:18:54 *
Welcome, Guest. Please login or register.

Login with username, password and session length
 
   home   news downloads projects tutorials misc forums rules new posts irc about Login Register  
+-OmnomIRC

You must Register, be logged in and have at least 40 posts to use this shout-box! If it still doesn't show up afterward, it might be that OmnomIRC is disabled for your group or under maintenance.

Note: You can also use an IRC client like mIRC, X-Chat or Mibbit to connect to an EFnet server and #omnimaga.

Pages: 1 ... 4 5 [6] 7 8   Go Down
  Print  
Author Topic: [Lua] Make3D -  (Read 7166 times) Bookmark and Share
0 Members and 1 Guest are viewing this topic.
Levak
LV8 Addict (Next: 1000)
********
Online Online

Gender: Male
Last Login: Today at 22:50:31
Date Registered: 04 April, 2010, 23:42:49
Location: France
Posts: 844


Topic starter
Total Post Ratings: +148

View Profile WWW
« Reply #75 on: 09 August, 2011, 18:50:45 »
0

ProjectPoint(obj[i ], obj[i+1], obj[i+2], zoffset)
I see, it's just {x,y,z}... Just what i thought first. i will study it. Thanks!
Is anything i must know to understand it?

Use setPixel() or equivalent in C, since in the TI-Nspire Lua API we don't have this.
And I think that you may use a Z-buffering instead of my Z-sorting (I wish do one if I had getPixel() and setPixel() )

And one more thing, for a the faces correlation : It is a table of undetermined size tables (2, 3, 4 etc ..). Each element refers to an index in the point list. The order is important, like if you draw yourself the face with lines point by points.

Good Luck =)
« Last Edit: 09 August, 2011, 18:51:29 by Levak » Logged

Human always wants to survive and that's why he will fall one day.
My website - TI-Planet - iNspired-Lua
Eiyeron
LV7 Elite (Next: 700)
*******
Offline Offline

Gender: Male
Last Login: 07 January, 2013, 20:29:04
Date Registered: 09 August, 2011, 16:51:22
Location: Err 404.
Posts: 552


Total Post Ratings: +18

View Profile WWW
« Reply #76 on: 09 August, 2011, 18:52:58 »
0

I want to start with a wireframe, after blanks face with black contour. So, Z-buffer... Ow...
Logged




Levak
LV8 Addict (Next: 1000)
********
Online Online

Gender: Male
Last Login: Today at 22:50:31
Date Registered: 04 April, 2010, 23:42:49
Location: France
Posts: 844


Topic starter
Total Post Ratings: +148

View Profile WWW
« Reply #77 on: 09 August, 2011, 18:55:33 »
0

I want to start with a wireframe, after blanks face with black contour. So, Z-buffer... Ow...

Don't be afraid about a Z-buffering. There are many tutorials on the internet. It is a really simple and powerfull algorithm, but, for performance, you should implement your own face filling algorithm. It is a really interesting experience.
« Last Edit: 09 August, 2011, 18:56:06 by Levak » Logged

Human always wants to survive and that's why he will fall one day.
My website - TI-Planet - iNspired-Lua
t0xic_kitt3n
LV10 31337 u53r (Next: 2000)
**********
Offline Offline

Gender: Male
Last Login: 13 May, 2013, 01:56:35
Date Registered: 16 June, 2010, 20:46:00
Location: w,x,y,z
Posts: 1583


Total Post Ratings: +32

View Profile
« Reply #78 on: 09 August, 2011, 19:44:59 »
0

Z-buffering is actually quite simple. You create an array with an entry for every pixel on the screen. In each "pixel" of the array is the depth of the object that was drawn there. Before drawing each pixel, you check the corresponding depth, and if it is closer than what you would draw, then that pixel does not get drawn. If the pixel does get drawn, then the z buffer is updated with the depth of that pixel.
Logged




██████  ██  ██  ███████           ████    ██    ██   ██ ███████
█ ██ █  ██  ██   ██   █          ██  ██  ████   ███ ███  ██   █
  ██    ██  ██   ██             ██   ██ ██  ██  ███████  ██    
  ██    ██  ██   ██  █         ██       ██  ██  ███████  ██  █
  ██    ██████   █████         ██       ██  ██  ██ █ ██  █████ 
  ██    ██  ██   ██  █         ██   ███ ██████  ██   ██  ██  █
  ██    ██  ██   ██             ██   ██ ██  ██  ██   ██  ██    
  ██    ██  ██   ██   █          ██  ██ ██  ██  ██   ██  ██   █
 ████   ██  ██  ███████           █████ ██  ██  ██   ██ ███████

Levak
LV8 Addict (Next: 1000)
********
Online Online

Gender: Male
Last Login: Today at 22:50:31
Date Registered: 04 April, 2010, 23:42:49
Location: France
Posts: 844


Topic starter
Total Post Ratings: +148

View Profile WWW
« Reply #79 on: 11 August, 2011, 03:28:50 »
0

Ok, nothing really special during the past 3 days, so I rewrote the menu engine to make it compatible with the built-in  toolpalette.

Now, I've a dual menu. Why ? It lets me now make it compatible either with the Nspire-viewer and the TI Nspire Computer Software (with my personal menu) or with the TI-Nspire handheld.
So ... why keep the built-in toolpalette ? Because I'm sure it will be enhanced in future updates of the TI-Nspire API (if you see what I mean Wink )



Here is a comparison with the built-in toolpalette :

« Last Edit: 11 August, 2011, 03:45:48 by Levak » Logged

Human always wants to survive and that's why he will fall one day.
My website - TI-Planet - iNspired-Lua
adriweb
Editor
LV9 Veteran (Next: 1337)
*
Offline Offline

Gender: Male
Last Login: Yesterday at 12:02:44
Date Registered: 13 April, 2011, 18:42:59
Location: South of France
Posts: 1197


Total Post Ratings: +185

View Profile WWW
« Reply #80 on: 11 August, 2011, 03:34:38 »
0

Awesome, really Smiley
Logged


TI-Planet.org co-admin.
TI-Nspire Lua programming : Tutorials  |  API Documentation
ExtendeD
Coder Of Tomorrow
LV8 Addict (Next: 1000)
*
Offline Offline

Gender: Male
Last Login: Today at 10:41:30
Date Registered: 02 January, 2010, 13:03:41
Location: France
Posts: 766

Total Post Ratings: +151

View Profile
« Reply #81 on: 11 August, 2011, 13:58:36 »
0

I have missed something: does it mean the built-in tool palette cannot be used with the player and the Computer Software?
Logged

ndlessly - Progress and insights on Ndless
Ndless / Hackspire - Third-party TI-Nspire development
Chockosta
LV6 Super Member (Next: 500)
******
Offline Offline

Gender: Male
Last Login: 22 May, 2013, 20:19:59
Date Registered: 03 June, 2011, 20:14:17
Location: France
Posts: 440


Total Post Ratings: +159

View Profile
« Reply #82 on: 11 August, 2011, 15:32:26 »
0

There is no "menu" key...
Logged

Chockosta (Loic Pujet) - Sorry for my poor English...
Look at my projects :
in C code : Periodic table, Space invaders, Fall, Snake, Minesweeper, nCraft (WIP)
in Lua : Snake, Space invaders, Bobby Carrot, Minesweeper, Mazes 3D, nSpaint, FreeCell, Tiny3D-Viewer, CubeField, Gravity Guy
t0xic_kitt3n
LV10 31337 u53r (Next: 2000)
**********
Offline Offline

Gender: Male
Last Login: 13 May, 2013, 01:56:35
Date Registered: 16 June, 2010, 20:46:00
Location: w,x,y,z
Posts: 1583


Total Post Ratings: +32

View Profile
« Reply #83 on: 12 August, 2011, 00:18:51 »
0

There is. It is to the right of the click/touch pad.
Logged




██████  ██  ██  ███████           ████    ██    ██   ██ ███████
█ ██ █  ██  ██   ██   █          ██  ██  ████   ███ ███  ██   █
  ██    ██  ██   ██             ██   ██ ██  ██  ███████  ██    
  ██    ██  ██   ██  █         ██       ██  ██  ███████  ██  █
  ██    ██████   █████         ██       ██  ██  ██ █ ██  █████ 
  ██    ██  ██   ██  █         ██   ███ ██████  ██   ██  ██  █
  ██    ██  ██   ██             ██   ██ ██  ██  ██   ██  ██    
  ██    ██  ██   ██   █          ██  ██ ██  ██  ██   ██  ██   █
 ████   ██  ██  ███████           █████ ██  ██  ██   ██ ███████

Levak
LV8 Addict (Next: 1000)
********
Online Online

Gender: Male
Last Login: Today at 22:50:31
Date Registered: 04 April, 2010, 23:42:49
Location: France
Posts: 844


Topic starter
Total Post Ratings: +148

View Profile WWW
« Reply #84 on: 12 August, 2011, 00:37:36 »
0

I have missed something: does it mean the built-in tool palette cannot be used with the player and the Computer Software?

Actually I was half-wrong. Yes the TI-Nspire-online-Viewer doesn't include the toolpalette support. On the other hand, the TI-Nspire Computer Software manages the user's toolpalette. I was used to have this toolpalette on the top of the interface, like on the version 1.6 to 2.1 of the software, but they changed its place on the side panel, where I wasn't enabled to see !





On the other way, here a demo of my menu in TINCS :

Logged

Human always wants to survive and that's why he will fall one day.
My website - TI-Planet - iNspired-Lua
Levak
LV8 Addict (Next: 1000)
********
Online Online

Gender: Male
Last Login: Today at 22:50:31
Date Registered: 04 April, 2010, 23:42:49
Location: France
Posts: 844


Topic starter
Total Post Ratings: +148

View Profile WWW
« Reply #85 on: 12 August, 2011, 11:31:15 »
+1




What's new :
 - Modes demo, using the same code for each widget (saved)
 - Properties mode displaying the lastest selected properties
 - Text input (related to the properties mode)
 - Display objects's label
 - bugs fixed

From the Properties panel we can change directly object's data, except its name. Why ? because I store each object as : cube.[datas], cube2.[datas]

If we change the object's name, we have to :
 1) Change its name (obviously)
 2) Duplicate the object and monitor it
 3) Delete the old object

only to change its name. The name will be choosen at the object's creation.
Logged

Human always wants to survive and that's why he will fall one day.
My website - TI-Planet - iNspired-Lua
Jim Bauwens
Lua! Nspire! Linux!
Editor
LV10 31337 u53r (Next: 2000)
*
Offline Offline

Gender: Male
Last Login: Today at 21:52:56
Date Registered: 28 February, 2011, 22:32:12
Location: Belgium
Posts: 1733


Total Post Ratings: +180

View Profile WWW
« Reply #86 on: 12 August, 2011, 11:39:57 »
0

Very good work Levak Smiley
Logged

Eiyeron
LV7 Elite (Next: 700)
*******
Offline Offline

Gender: Male
Last Login: 07 January, 2013, 20:29:04
Date Registered: 09 August, 2011, 16:51:22
Location: Err 404.
Posts: 552


Total Post Ratings: +18

View Profile WWW
« Reply #87 on: 12 August, 2011, 14:31:58 »
0

Can we move the camera? (related with the motor...)
Logged




Levak
LV8 Addict (Next: 1000)
********
Online Online

Gender: Male
Last Login: Today at 22:50:31
Date Registered: 04 April, 2010, 23:42:49
Location: France
Posts: 844


Topic starter
Total Post Ratings: +148

View Profile WWW
« Reply #88 on: 12 August, 2011, 14:37:41 »
0

Can we move the camera?
For now we can rotate the camera, but a move is planed

Quote
(related with the motor...)

A what ?
Logged

Human always wants to survive and that's why he will fall one day.
My website - TI-Planet - iNspired-Lua
Eiyeron
LV7 Elite (Next: 700)
*******
Offline Offline

Gender: Male
Last Login: 07 January, 2013, 20:29:04
Date Registered: 09 August, 2011, 16:51:22
Location: Err 404.
Posts: 552


Total Post Ratings: +18

View Profile WWW
« Reply #89 on: 12 August, 2011, 14:44:23 »
0

Related with my motor prject.
How the motor works? I dunno how directly adpat these engine in C...
Logged




Pages: 1 ... 4 5 [6] 7 8   Go Up
  Print  
 
Jump to:  

Powered by EzPortal
Powered by MySQL Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Powered by PHP
Page created in 0.349 seconds with 30 queries.
Skin by DJ Omnimaga edited from SMF default theme with the help of tr1p1ea.
All programs, games and songs avaliable on this website are property of their respective owners.
Best viewed in Opera, Firefox, Chrome and Safari with a resolution of 1024x768 or above.