Shop OBEX P1 Docs P2 Docs Learn Events
Propeller Application: 3D graphics demo — Parallax Forums

Propeller Application: 3D graphics demo

Beau SchwabeBeau Schwabe Posts: 6,568
edited 2006-09-15 16:24 in Propeller 1
This is just a DEMO for a 3D graphics engine written in Spin for the Propeller.

As a released object, I hope to have a complete engine written in Propeller Assembly.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe

IC Layout Engineer
Parallax, Inc.

Comments

  • BeanBean Posts: 8,129
    edited 2006-09-14 18:41
    Beau,
    · You're really making me mad that I don't have more time to play with the propeller chip.
    · The demo is way cool. Except I would have liked to see a Parallax Logo instead of a box with an arrow [noparse];)[/noparse]

    Bean.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Cheap used 4-digit LED display with driver IC·www.hc4led.com

    Low power SD Data Logger www.sddatalogger.com
    SX-Video Display Modules www.sxvm.com

    There are only two guaranteed ways to become weathy.
    Spend less than you make.
    Make more than you spend.
    ·
  • Beau SchwabeBeau Schwabe Posts: 6,568
    edited 2006-09-14 19:00
    Hmmm.....That would take alot of points and lines..... Hmmmm...... smilewinkgrin.gif

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Beau Schwabe

    IC Layout Engineer
    Parallax, Inc.
  • Kaos KiddKaos Kidd Posts: 614
    edited 2006-09-14 20:05
    <--- is back from the very sick...
    Go ahead Beau, make it so... you can do it... Yah, you can do it...
    [noparse]:)[/noparse]

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔

    Propeller + Hardware - extra bits for the bit bucket =· 1 Coffeeless KaosKidd

    ·
  • Graham StablerGraham Stabler Posts: 2,510
    edited 2006-09-14 22:50
    I love this. In these days of high end 3D graphics, this impresses me so much more.

    This has to be played with it really does.

    Graham
  • Mike GreenMike Green Posts: 23,101
    edited 2006-09-14 23:08
    Wow. I remember in graduate school (30 years ago) when one of the graphics researchers was so excited that he was able to get a room full of graphics display processor to do something only a little more complicated (like a coarse "wire frame" outline of the Starship Enterprise) to rotate much the same way. Truthfully, it did come out of "infinity" in perspective, but, in the foreground, there was no significant perspective distortion as it rotated and translated.
  • Beau SchwabeBeau Schwabe Posts: 6,568
    edited 2006-09-14 23:22
    Ok.... so I had to play a little.... actually this is something I already had most of already. I just needed to clean it up a bit.

    I had to break the video down into multiple files less than 2 Meg in size to meet the upload criteria limit we have.

    Have fun!! turn.gif

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Beau Schwabe

    IC Layout Engineer
    Parallax, Inc.
  • HarleyHarley Posts: 997
    edited 2006-09-14 23:53
    Beau said...
    This is just a DEMO for a 3D graphics engine written in Spin for the Propeller.
    I put off viewing this as I figured my PropSTICK setup was too primative to run it with TV only i/f; assumed VGA it needed.
    Then hours later, realized there was a demo.

    WOW!

    Then downloaded the Spin files and F11'd it, expecting a blank screen. My 5" b/w monitor came on with this beautiful wire-frame moving 3-D display.

    Now I'm expecting 'tons' more for the Propeller to provide than I'd of ever imagined it could.

    Thanks Beau, for the visual treat

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Harley Shanko
    h.a.s. designn
  • hellosethhelloseth Posts: 43
    edited 2006-09-15 01:18
    Beau,

    Very impressive.

    2 questions.

    1. How did you make the wmv? Propeller -> Composite -> Computer Video capture card? I was considering a capture card to use instead of a monitor, code in the prop IDE and the video in another window on my dev notebook.

    2. Where's the real hat demo? the propeller needs to spin while the hat is moving! smilewinkgrin.gif

    Seth
  • paulchainkangpaulchainkang Posts: 10
    edited 2006-09-15 01:47
    Beau,

    This 3D demo is great! Can you make it a VGA version?

    Paul
  • Dennis FerronDennis Ferron Posts: 480
    edited 2006-09-15 03:52
    This is great stuff Beau! I have a 3-d wireframe game called "Crystalis" that I wrote for DOS a long time ago. Now maybe I'll be able to port Crystalis to the Propeller!
  • Beau SchwabeBeau Schwabe Posts: 6,568
    edited 2006-09-15 06:00
    Seth Vanderdrift,
    You said...
    1. How did you make the wmv? Propeller -> Composite -> Computer Video capture card?
    I have a Belkin USB VideoBus II

    http://catalog.belkin.com/IWCatProductPage.process?Merchant_Id=1&Product_Id=105106

    Which works well with the software that comes with it for capturing the RAW video.

    I have a personal copy of Pinnacle Studio Version 8.3.12 that I use for rendering WMV.
    Pinnacle Studio has problems with the USB (video time sync issues) but works excellent
    with a fire-wire cable which is what I use sometimes if I am using my video camera.
    You said...
    2. Where's the real hat demo? the propeller needs to spin while the hat is moving!
    That would involve changing a few things.·· The easiest way would be to create two 3d-object's,
    one would be the beanie, while the other would be the Propeller.· Since the beanie and the propeller
    are connected to each other on the Y axis then both 3d-object's would get the same X and Z rotation
    values, but you would introduce a phase difference in the Y value between the two.· Right?! scool.gif







    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Beau Schwabe

    IC Layout Engineer
    Parallax, Inc.

    Post Edited (Beau Schwabe (Parallax)) : 9/15/2006 6:11:21 AM GMT
  • Beau SchwabeBeau Schwabe Posts: 6,568
    edited 2006-09-15 06:27
    paulchainkang,·

    You said...
    This 3D demo is great! Can you make it a VGA version?
    ·
    The ultimate idea is to design an object that would not be TV or VGA dependent,
    but instead allow the user to decide what the best platform to use for their application
    would be.
    ·
    This·demo is written in Spin, and it's just that, a DEMO of what is possible.
    Imagination is the key to unlocking more of this potential.· Ultimately I will
    make a Propeller Assembly version that I can release. The demo is nice,
    because I can get a good reaction indication within the forum and new ideas
    for that matter along the way.smilewinkgrin.gif

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Beau Schwabe

    IC Layout Engineer
    Parallax, Inc.
  • Graham StablerGraham Stabler Posts: 2,510
    edited 2006-09-15 08:59
    I made a cube in a cube [noparse]:)[/noparse]

    Next is to draw something in Rhino3D, add points to the vertexes and then export the point cloud as x,y,z co-ordinates. I just need to decide what to draw.

    Graham
  • APStech-AttilaAPStech-Attila Posts: 38
    edited 2006-09-15 09:55
    This is a very impressive demo, and runs smooth! Can't wait for the assmebly version!


    If you accidently·run·out of·COGRAM, I would like to propose some memory saving ideas for the 3D engine:
    [b]long[/b] ScnPntX[noparse][[/noparse]MaxPoints],ScnPntY[noparse][[/noparse]MaxPoints],ScnPntZ[noparse][[/noparse]MaxPoints]
    

    In the translation "engine" you do not use ScnPnt# as a "real array", because you do not do anything with the cumulated results. So I recommend, to use them as simple long variables
    [b]long[/b] ScnPntX,ScnPntY,ScnPntZ
    

    this will save 117 longs!
    After translation, the SX and SY points represent values from 0..256 (screen res.) thus they could be reduced to word.
    [b]word[/b]              SX[noparse][[/noparse]MaxPoints],SY[noparse][[/noparse]MaxPoints]
    
    

    This will save additional 40 longs!
    If you leave the TV_params and TV_Status·in DAT, this will save you 14 longs!

    And actually the optimized datastructure will give you 171 extra longs, this might be enough to draw faces instead of a wireframe! smilewinkgrin.gif
  • Graham StablerGraham Stabler Posts: 2,510
    edited 2006-09-15 10:51
    Just a thought, it would look really cool if you linked the angle of the cube with movement of the mouse. Then zoom on the roller [noparse]:)[/noparse]

    Graham
  • Beau SchwabeBeau Schwabe Posts: 6,568
    edited 2006-09-15 16:24
    Attila,

    Thanks for the tips.... the code is really not optimized. I was able to fiddle with it a little bit though, and between program longs and variable longs I was able to reduce
    the size by a total of 226 longs.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Beau Schwabe

    IC Layout Engineer
    Parallax, Inc.
Sign In or Register to comment.