Joined: 30 Jan 2011 Posts: 1658 Location: Aufhelperstan, Utopian Republic
Posted: 21 Apr 2012 04:02:54 pm Post subject: [Prizm] 3D Renderer with software rasterizer!
I wanted to get 3D stuff put onto my Prizm for a bit now. Sure, I looked at Doom and such, but never went ahead with anything.
Now, I have been testing a 3D renderer that uses parts from Vincent 3D, an OpenGL ES rendering library, and other custom code. It works nicely so far (after fixing a few things and removing ties to stdlib stuff).
Here is a demo of a spinning diamond, 36 vertexes, with two lights in the scene. It has a vertex and fragment shader doing the lighting and matrix math non stop. I will post more about this when I experiment more with it, specifically speed ups (although it has already been optimized over a while) and other feature tests.
A video is included a few posts down. _________________ °ᴥ° Get Lucky
<BrandonW> "You don't even want to know what TI Connect does when it's just detecting your calculator...It ACTUALLY ERASES THE SWAP SECTOR on every communication attempt...EVERY SINGLE ATTEMPT...Yes, TI Connect will kill your calculator..What do I have to do to get your attention?!....Such a bloated protocol."
Last edited by AHelper on 21 Apr 2012 05:12:50 pm; edited 1 time in total
Joined: 30 Jan 2011 Posts: 1658 Location: Aufhelperstan, Utopian Republic
Posted: 21 Apr 2012 04:07:26 pm Post subject:
what sort of bugs? The pixels at the top left are the heartbeat monitors. The edges getting cut are from the perspective matrix. I didn't move it back _________________ °ᴥ° Get Lucky
<BrandonW> "You don't even want to know what TI Connect does when it's just detecting your calculator...It ACTUALLY ERASES THE SWAP SECTOR on every communication attempt...EVERY SINGLE ATTEMPT...Yes, TI Connect will kill your calculator..What do I have to do to get your attention?!....Such a bloated protocol."
Joined: 30 Jan 2011 Posts: 1658 Location: Aufhelperstan, Utopian Republic
Posted: 21 Apr 2012 04:08:38 pm Post subject:
I will do that later on (the code is there and should work). _________________ °ᴥ° Get Lucky
<BrandonW> "You don't even want to know what TI Connect does when it's just detecting your calculator...It ACTUALLY ERASES THE SWAP SECTOR on every communication attempt...EVERY SINGLE ATTEMPT...Yes, TI Connect will kill your calculator..What do I have to do to get your attention?!....Such a bloated protocol."
Joined: 30 Jan 2011 Posts: 1658 Location: Aufhelperstan, Utopian Republic
Posted: 21 Apr 2012 04:16:45 pm Post subject:
Do you have recommendations on capturing it? I lack fancy cameras that can do close-range video capture, unless I have one somewhere else... _________________ °ᴥ° Get Lucky
<BrandonW> "You don't even want to know what TI Connect does when it's just detecting your calculator...It ACTUALLY ERASES THE SWAP SECTOR on every communication attempt...EVERY SINGLE ATTEMPT...Yes, TI Connect will kill your calculator..What do I have to do to get your attention?!....Such a bloated protocol."
_________________ °ᴥ° Get Lucky
<BrandonW> "You don't even want to know what TI Connect does when it's just detecting your calculator...It ACTUALLY ERASES THE SWAP SECTOR on every communication attempt...EVERY SINGLE ATTEMPT...Yes, TI Connect will kill your calculator..What do I have to do to get your attention?!....Such a bloated protocol."
Joined: 30 Jan 2011 Posts: 1658 Location: Aufhelperstan, Utopian Republic
Posted: 21 Apr 2012 05:18:29 pm Post subject:
Thanks for the gif! I wonder how well it will work on the emulator if I put the rendering size to full screen instead of 150x150... _________________ °ᴥ° Get Lucky
<BrandonW> "You don't even want to know what TI Connect does when it's just detecting your calculator...It ACTUALLY ERASES THE SWAP SECTOR on every communication attempt...EVERY SINGLE ATTEMPT...Yes, TI Connect will kill your calculator..What do I have to do to get your attention?!....Such a bloated protocol."
I hate to be a pain, but...most image hosting sites are blocked here too. (K9 web protection=major PITA) Would you mind hosting on removedfromgame.com? _________________ -LincolnB
Joined: 14 Mar 2005 Posts: 55742 Location: Earth, Sol, Milky Way
Posted: 21 Apr 2012 06:55:18 pm Post subject:
Awesome! Can I safely assume that those little red pixels are for debugging purposes? Also, why is the rendering window so tiny? I presume there's a good reason for that. _________________
Joined: 30 Jan 2011 Posts: 1658 Location: Aufhelperstan, Utopian Republic
Posted: 21 Apr 2012 06:58:35 pm Post subject:
1) The blue dots are the phases of the renderer. The red ones are conditionals for the fragment shader. The two flashing ones are just to show changing frames.
2)Think first: The fragment shader is called for every pixel in a shape. A huge render window with every pixel operated on takes a long time, 3-4 fps. A tiny one, 100x100 is limited by the LCD speed and not the engine, 150 is a nice size. _________________ °ᴥ° Get Lucky
<BrandonW> "You don't even want to know what TI Connect does when it's just detecting your calculator...It ACTUALLY ERASES THE SWAP SECTOR on every communication attempt...EVERY SINGLE ATTEMPT...Yes, TI Connect will kill your calculator..What do I have to do to get your attention?!....Such a bloated protocol."
Joined: 23 May 2011 Posts: 833 Location: Well, the sign says "You are here"...
Posted: 21 Apr 2012 07:32:35 pm Post subject:
RE: Doom
That wouldn't have worked for what you wanted to do, because Doom uses raycasting, and is not true 3d. Raycasting uses some assumptions (like the world is made up of cubes, and some stuff about ceilings and floors). This means that it can't display even the simple wireframe cube. For more info, see this excellent tutorial. _________________ Code:
-----BEGIN GEEK CODE BLOCK-----
GCS 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?
------END GEEK CODE BLOCK------
Joined: 01 Dec 2010 Posts: 2417 Location: Stomp Stomp Stomp, The Idiot Convention
Posted: 21 Apr 2012 07:42:24 pm Post subject:
seana11 wrote:
RE: Doom
That wouldn't have worked for what you wanted to do, because Doom uses raycasting, and is not true 3d. Raycasting uses some assumptions (like the world is made up of cubes, and some stuff about ceilings and floors). This means that it can't display even the simple wireframe cube. For more info, see this excellent tutorial.
Somewhat incorrect. Doom's engine is based on raycasting, but it allows height mapping, different shapes, in addition to many other things. _________________ -Ashbad
Joined: 14 Mar 2005 Posts: 55742 Location: Earth, Sol, Milky Way
Posted: 21 Apr 2012 08:22:23 pm Post subject:
And since versions of the Doom source are available, I entirely expect that some time this year one of the many of us (myself, Merth, and AHelper at the very least, probably others) who have expressed a wish to port it over to the Prizm will succeed in getting around to it.
AHelper: That's what I was afraid of re: the window size. _________________
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.
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