PIX engine
Baggers
Posts: 3,019
Out of curiosity, is anyone else having a crack at doing textured poly renderers?
Comments
For me personally, I think I understand the concept of how to render a poly with texture, but I do not understand the mechanics very well at all. In the past, I've written OpenGL code to render polygons in 3D space, projected onto the screen. That is possible to do with some basic understanding of transforms. GL handles all the hard stuff. I've also used CAD systems to "plot" data of various kinds into 3D or 4D space, using the system to visualize it from various angles, animate, etc... again, that does all the hard stuff.
I need to start back at "computer graphics 101" Got any links that are not huge discussions? This is an area I'm excited to learn about too. P1 had enough oomph to do some shaded polys, and you did 'em too.
This chip can do a lot more, and I think enough polys to do some fun things.
(reconsidered)
I have plans to do a triangle rendering test at least if not more. I've been thinking about the code a fair bit, but haven't actually written anything yet. I'm going to try some things this weekend on my Stratix III board setup (similar to the DE2-115 setups). Having done software rendering in the past (mid/late 90s), I have a reasonable idea on what to do, just need to sort out fitting it into a cog.
My current plan is to have one cog rendering to a buffer, and another cog displaying that buffer. Ultimately, I want to use the SDRAM as the buffer, so I can do hires.
@Roy, Yeah, I kinda figured you'd be looking into it also I've got the texture renderer working already, doing 4bit textures, from a 256 colour palette for the bitmap, until like you say, we can use SDRAM for hires.
Problem is fitting it into the cog ram, as you need your texture in there also, still have some more optimisation plans, but depends how much cog ram I can get it into.
It works a treat at the mo though!
There's so many great things I want to do with it, one is a SNES mode 7 thing.
Another is scaling sprites, for things like Space Harrier/Outrun type games.
My mind is full of so many things I want to try, it's hard deciding what to do next haha
And I need to work during the week too haha, so it's only evenings and weekends, and when I'm not having time with my family of course.
I've come to the conclusion, that although it's not fully optimised yet, It's taking twice as long as it did to render on the P1!
Now that doesn't sound good to you, but it is actually fantastic, the reason for this, is because of two reasons.
1. It's rendering to a screen 4 times as big memory wise, as it's 256x192 instead of 128x96 on the Prop1.
and more importantly...
2. it's only using ONE cog to render, whereas the Prop1 was using 4.
My favorite was watching Chip setup his color swirl thing. He explained the math, ran the thing and then proceeded to have it there running like some mind control device during the Q&A session. Hilarious!
Yeah, I too was surprised how fantastic it looks for composite! and when we get the real chip it should be better? somehow lol
haha to the mind control session
Staring at that spinning graphic I had the urge to buy as many Propeller 2 boards as possible, but I'm not sure if it was mind control.
Potatohead was there, I got to chat with him a fair bit, but the others were watching the live stream.
The graphics demo's were very nice, but it only scratches the surface of what the chip can do.
David, No worries, it was roughly 30MB of images to load serially, so don't worry too much about it it would have taken a while even with P2Load.
I was on the other side of the big pond Jason, just my demo was there
Roy, that's so true, I keep having to remind myself, these are only 5 of the 8 cogs, and at 1/3rd of the speed.
David, no worries, it was roughly 30MBytes of image data that it had to load serially, so would have taken a while even with P2Load.
Jason, I was unfortunately, on the other side of the big pond, I hope to go there one day!
Roy, that's so true, I keep having to remind myself that everything it has done so far, has been on an emulator, with only 5 cogs max, and running at roughly 1/3rd the speed of the full chip. so it would be like having another 19 ( current speed ) cogs worth of processing power on top of what we have now.
See http://en.wikipedia.org/wiki/OpenGL_ES
I was thinking a non-animated version of that thing would be good as a logo for Spin or for the Propeller2, maybe... Similar to how the bouncing ball animation for the Amiga eventually got used as logo too.
===Jac