Author Topic: [Lua] Make3D  (Read 40430 times)

0 Members and 2 Guests are viewing this topic.

Offline ruler501

  • Meep
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2475
  • Rating: +66/-9
  • Crazy Programmer
    • View Profile
Re: [TI-Nspire] Make3D - TI-Basic to Lua
« Reply #30 on: June 02, 2011, 06:44:45 pm »
I think he thought you had somehow added it in
I currently don't do much, but I am a developer for a game you should totally try out called AssaultCube Reloaded download here https://assaultcuber.codeplex.com/
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GCM/CS/M/S d- s++: a---- C++ UL++ P+ L++ E---- W++ N o? K- w-- o? !M V?
PS+ PE+ Y+ PGP++ t 5? X R tv-- b+++ DI+ D+ G++ e- h! !r y

Ashbad

  • Guest
Re: [TI-Nspire] Make3D - TI-Basic to Lua
« Reply #31 on: June 02, 2011, 06:47:21 pm »
Basically, anti-aliasing is a graphical term, in which you color smooth out the edges of contrasting colors by putting intermediary colors between them.  Example of anti-aliasing compared to non-aliased lines:

Yes, I know that (I use Blender a lot, made also a RayTracer), but I don't understand why BrownyTCat proposed me to make an anti-aliasing in Lua ?!
It is quite impossible since this routine has to be included in the gc:drawRect one !

I edited my post with the picture to explain a crude way of obtaining anti-aliasing between colors on a plane.  I actually suggest you do implement some form of it, as rendering far-away objects in 3D without it will make things look ugly and distorted.

Offline BrownyTCat

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 420
  • Rating: +37/-8
    • View Profile
Re: [TI-Nspire] Make3D - TI-Basic to Lua
« Reply #32 on: June 02, 2011, 06:47:59 pm »
I think he thought you had somehow added it in
Regardless, it looks great.

Offline Levak

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1002
  • Rating: +208/-39
    • View Profile
    • My website
Re: [TI-Nspire] Make3D - TI-Basic to Lua
« Reply #33 on: June 02, 2011, 06:54:15 pm »
I edited my post with the picture to explain a crude way of obtaining anti-aliasing between colors on a plane.

But this method is usuable only if we have a setPixel() function. But in the Lua API, there is no such a function ! Personnaly I draw things with drawPolyLine() which is an implemented method of the TI-Nspire API. And I can't control the screen buffer since there is no getPixel() function.

Thus, I can't make an anti-aliasing filter because the drawing part is handled by the TI-Nspire API !
« Last Edit: June 02, 2011, 06:55:10 pm by Levak »
I do not get mad at people, I just want them to learn the way I learnt.
My website - TI-Planet - iNspired-Lua

Ashbad

  • Guest
Re: [TI-Nspire] Make3D - TI-Basic to Lua
« Reply #34 on: June 02, 2011, 06:55:48 pm »
Wow, no set pixel function?  O.O NLua has problems.

Offline Levak

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1002
  • Rating: +208/-39
    • View Profile
    • My website
Re: [TI-Nspire] Make3D - TI-Basic to Lua
« Reply #35 on: June 02, 2011, 06:57:37 pm »
I do not get mad at people, I just want them to learn the way I learnt.
My website - TI-Planet - iNspired-Lua

Ashbad

  • Guest
Re: [TI-Nspire] Make3D - TI-Basic to Lua
« Reply #36 on: June 02, 2011, 07:00:27 pm »
I think your best bet would be to just do this:

Code: [Select]
function SetPixel(x, y)
  gc:fillRect(x, y, 1, 1)
end

Rectangles are inherently faster to compute than lines ;)
« Last Edit: June 02, 2011, 07:01:02 pm by Ashbad »

Offline Levak

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1002
  • Rating: +208/-39
    • View Profile
    • My website
Re: [TI-Nspire] Make3D - TI-Basic to Lua
« Reply #37 on: June 02, 2011, 07:04:23 pm »
I think your best bet would be to just do this:

Code: [Select]
function SetPixel(x, y)
  gc:fillRect(x, y, 1, 1)
end

Rectangles are inherently fast to computer than lines ;)

I don't get it. You wan't me to make a FillPolygon function using a cheated setPixel function only to make the render "nicer" but the render time extremly important whereas there is already a fillPolygon() function that works perfectly ? :D
I do not get mad at people, I just want them to learn the way I learnt.
My website - TI-Planet - iNspired-Lua

Offline ruler501

  • Meep
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2475
  • Rating: +66/-9
  • Crazy Programmer
    • View Profile
Re: [TI-Nspire] Make3D - TI-Basic to Lua
« Reply #38 on: June 02, 2011, 07:06:08 pm »
That would only be worthwhile if you could set up some kind of anti aliasing with it
I currently don't do much, but I am a developer for a game you should totally try out called AssaultCube Reloaded download here https://assaultcuber.codeplex.com/
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GCM/CS/M/S d- s++: a---- C++ UL++ P+ L++ E---- W++ N o? K- w-- o? !M V?
PS+ PE+ Y+ PGP++ t 5? X R tv-- b+++ DI+ D+ G++ e- h! !r y

Offline Levak

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1002
  • Rating: +208/-39
    • View Profile
    • My website
Re: [TI-Nspire] Make3D - TI-Basic to Lua
« Reply #39 on: June 02, 2011, 07:07:35 pm »
That would only be worthwhile if you could set up some kind of anti aliasing with it
Already said that it is impossible if I wan't to keep my 30 fps animation.
                                                                         ↑
                                                                yeah this is not a joke
« Last Edit: June 02, 2011, 07:10:31 pm by Levak »
I do not get mad at people, I just want them to learn the way I learnt.
My website - TI-Planet - iNspired-Lua

Ashbad

  • Guest
Re: [TI-Nspire] Make3D - TI-Basic to Lua
« Reply #40 on: June 02, 2011, 07:10:15 pm »
I think your best bet would be to just do this:

Code: [Select]
function SetPixel(x, y)
  gc:fillRect(x, y, 1, 1)
end

Rectangles are inherently fast to computer than lines ;)

I don't get it. You wan't me to make a FillPolygon function using a cheated setPixel function only to make the render "nicer" but the render time extremly important whereas there is already a fillPolygon() function that works perfectly ? :D

Well, obviously don't make your own fillpolygon routine if there is already a native one supplied (most likely written in Native-C or highly optimized Lua) but if you choose to do limited anti-aliasing, it's a useful routine.  Plus, it wouldn't be much a of a speed troll if you only use it on faraway objects and spherical objects.

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: [TI-Nspire] Make3D - TI-Basic to Lua
« Reply #41 on: June 06, 2011, 02:55:47 pm »
IMHO anti-aliasing isn't necessary. After all, even some game systems from a few years ago didn't have it.

Offline Levak

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1002
  • Rating: +208/-39
    • View Profile
    • My website
Re: [TI-Nspire] Make3D - TI-Basic to Lua
« Reply #42 on: June 14, 2011, 06:16:01 pm »
* Levak designed a logo concept with paint.NET for Make3D while doing his computer school project

« Last Edit: June 15, 2011, 04:08:35 pm by Levak »
I do not get mad at people, I just want them to learn the way I learnt.
My website - TI-Planet - iNspired-Lua

Offline Jim Bauwens

  • Lua! Nspire! Linux!
  • Editor
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1881
  • Rating: +206/-7
  • Linux!
    • View Profile
    • nothing...
Re: [TI-Nspire] Make3D - TI-Basic to Lua
« Reply #43 on: June 15, 2011, 03:04:20 am »
Looks pretty nice!
Maybe the last line of 3 could be part of the D (with a little space between it)?

Offline Levak

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1002
  • Rating: +208/-39
    • View Profile
    • My website
Re: [TI-Nspire] Make3D - TI-Basic to Lua
« Reply #44 on: June 15, 2011, 02:43:02 pm »
like so ? :


* Levak loves Paint.NET

edit :
EPIC LOGO \o/
http://levak.free.fr/ftp/nspire/Make3D/logos/Make3D3.jpg
« Last Edit: June 15, 2011, 04:08:21 pm by Levak »
I do not get mad at people, I just want them to learn the way I learnt.
My website - TI-Planet - iNspired-Lua