• AVR Freaks

Simple 3D Rendering engine for PIC32

Author
justinwoodman
Starting Member
  • Total Posts : 19
  • Reward points : 0
  • Joined: 2010/02/07 22:30:40
  • Location: 0
  • Status: offline
2010/04/02 08:16:58 (permalink)
5 (1)

Simple 3D Rendering engine for PIC32

My code is highly unoptimized and there is no true shading or texturing yet, but I have a 3D rendering engine working on the PIC32. it DOES do backface culling and Z-sorting.
Anyways, I though some of the people here might be interested so: http://vimeo.com/10625880
This is really the first thing I've done with PIC32, and the first time I've worked on a 3D engine so I'm sure a LOT could be improved.
#1

14 Replies Related Threads

    dtran11
    Super Member
    • Total Posts : 244
    • Reward points : 0
    • Joined: 2009/10/20 08:33:03
    • Location: 0
    • Status: offline
    RE: Simple 3D Rendering engine for PIC32 2010/04/02 09:27:13 (permalink)
    0
    Is the code open source? I would love to help with the development.
    #2
    justinwoodman
    Starting Member
    • Total Posts : 19
    • Reward points : 0
    • Joined: 2010/02/07 22:30:40
    • Location: 0
    • Status: offline
    RE: Simple 3D Rendering engine for PIC32 2010/04/02 09:46:18 (permalink)
    0
    I don't see why not... It will probably require some explanation though.
    The main confusion in the code will be that the PIC32 doesn't have enough memory for an entire frame. Therefore I can not fill a frame in memory, then draw it. Instead, each line of the frame must be calculated, then drawn. This makes some of the routines, (especially the triangle drawing routine) pretty awkward.
    Anyway, I will see if I can get the project up on sourceforge or something similar.
    #3
    dtran11
    Super Member
    • Total Posts : 244
    • Reward points : 0
    • Joined: 2009/10/20 08:33:03
    • Location: 0
    • Status: offline
    RE: Simple 3D Rendering engine for PIC32 2010/04/02 09:50:48 (permalink)
    0
    That would be cool. If you use the newer pic32 with more memory it might be better?
    What is the resolution of the screen?
    #4
    justinwoodman
    Starting Member
    • Total Posts : 19
    • Reward points : 0
    • Joined: 2010/02/07 22:30:40
    • Location: 0
    • Status: offline
    RE: Simple 3D Rendering engine for PIC32 2010/04/02 09:56:04 (permalink)
    0
    Perhaps a newer PIC32 would be better... But even if it has enough memory to hold an entire frame, it will probably max out the RAM which is also used to hold triangle data (vertices, faces, etc).
    The screen is a 320x240 LCD with an SSD1963 controller (from Newhaven Displays).
    #5
    dtran11
    Super Member
    • Total Posts : 244
    • Reward points : 0
    • Joined: 2009/10/20 08:33:03
    • Location: 0
    • Status: offline
    RE: Simple 3D Rendering engine for PIC32 2010/04/02 10:10:13 (permalink)
    0
    I see what you mean with maxing out memory. Especially if you want
    shading. Would be nice to use external memory.
    #6
    ohmite
    Senior Member
    • Total Posts : 156
    • Reward points : 0
    • Joined: 2007/06/19 15:41:08
    • Location: 0
    • Status: offline
    RE: Simple 3D Rendering engine for PIC32 2010/04/04 04:05:22 (permalink)
    0
    Justin,
    This is fantastic!  Excellent job.  I would love to get a copy of your code sometime.
    I hope you are enjoying using the PIC32 on a DIP.  It looks like you have put it to good use.
    Regards,
    -Eric

    PIC24/PIC32 Breakout boards and PIC projects www.eflightworks.net
    #7
    bien_van_khat
    Starting Member
    • Total Posts : 45
    • Reward points : 0
    • Joined: 2006/05/11 20:41:17
    • Location: Vietnam
    • Status: offline
    RE: Simple 3D Rendering engine for PIC32 2010/04/04 20:53:51 (permalink)
    0
    wow, really cool

    Your video make me remember I had stuck with the hidden-face removal algorithm when I worked with a 320x240 TFT demo [&:]

    Looking forward to see your source code, :D
    #8
    justinwoodman
    Starting Member
    • Total Posts : 19
    • Reward points : 0
    • Joined: 2010/02/07 22:30:40
    • Location: 0
    • Status: offline
    RE: Simple 3D Rendering engine for PIC32 2010/04/06 13:12:40 (permalink)
    5 (2)
    Alright guys, a project is up on SourceForge for this. Develop as you please!
    Just go easy on me, haha. This was supposed to be a "rough sketch", so comments are pretty awful and my coding practices aren't great.
    I am new to PIC32 and 3D engine stuff as I said (and I'm a college student so my C is "under development" as well).

    here it goes... http://sourceforge.net/projects/pic323d/files/
    #9
    Neiwiertz
    Super Member
    • Total Posts : 2094
    • Reward points : 0
    • Joined: 2004/09/01 02:58:52
    • Status: offline
    RE: Simple 3D Rendering engine for PIC32 2010/04/06 14:04:47 (permalink)
    0
    I located the - Simple 3D Rendering engine for PIC32  - at the Explorer 16 Favorites Gallery

    E16 Interfacing: Graphics PICtail Plus Daughter Board 2

    Flying With --|Explorer 16|HardWare|SoftWare|-- Fav(s) Gallery Lists
    #10
    rvogti
    New Member
    • Total Posts : 26
    • Reward points : 0
    • Joined: 2008/11/05 21:40:01
    • Location: 0
    • Status: offline
    RE: Simple 3D Rendering engine for PIC32 2010/04/06 14:32:47 (permalink)
    0
    That is awesome.
    #11
    justinwoodman
    Starting Member
    • Total Posts : 19
    • Reward points : 0
    • Joined: 2010/02/07 22:30:40
    • Location: 0
    • Status: offline
    RE: Simple 3D Rendering engine for PIC32 2010/04/06 16:51:50 (permalink)
    0
    Hopefully I don't owe anyone a new keyboard after looking through the code...
    If you want to be a developer for the project, I'll keep an eye out for requests on Sourceforge. Feel free to ask questions about how it works here or there.
    #12
    oliglaser
    Super Member
    • Total Posts : 257
    • Reward points : 0
    • Joined: 2009/11/01 01:20:59
    • Location: Manchester, UK
    • Status: offline
    RE: Simple 3D Rendering engine for PIC32 2010/04/06 18:23:26 (permalink)
    0
    Very cool, Good job. Will check out the code.

    #13
    bien_van_khat
    Starting Member
    • Total Posts : 45
    • Reward points : 0
    • Joined: 2006/05/11 20:41:17
    • Location: Vietnam
    • Status: offline
    RE: Simple 3D Rendering engine for PIC32 2010/04/08 02:53:51 (permalink)
    0
    Just read through your code, your row buffering idea is very nice

    Though full frame buffering is impossible, row buffering still be much faster than directly perform drawing in LCD RAM, like MCHP graphic library.
    Furthermore, triangle filling speed will be nearly independent with triangle size

    great, Smile
    #14
    DarioG
    Allmächtig.
    • Total Posts : 54081
    • Reward points : 0
    • Joined: 2006/02/25 08:58:22
    • Location: Oesterreich
    • Status: offline
    RE: Simple 3D Rendering engine for PIC32 2010/04/08 03:15:54 (permalink)
    0
    Hi, yesterday I come through some site talking about a "youtube player" made in an embedded system.

    I though about you.. !

    GENOVA :D :D ! GODO
    #15
    Jump to:
    © 2019 APG vNext Commercial Version 4.5