Shop Learn
Super duper early preview: VJET for P2 — Parallax Forums

Super duper early preview: VJET for P2

Wuerfel_21Wuerfel_21 Posts: 1,449
edited 2021-02-22 00:46 in Propeller 2

I'm not going to have time for a while, I think, so I'll post this now: VJET for P2. Renders the 181-faced object in real time with 2 cogs in 1024x768

It's not done yet, but I feel like it may be of interest already.

Compile p2test.spin2. Tested with PropTool. Needs VGA and USB Keyboard.
Not going to type more about it now, hope the code mostly explains itself (it doesn't, haha).

Known issues:
- Rendering text off-screen causes corruption
- When enabling fleet or wireframe mode on the largest model, the USB keyboard sometimes stops working (?????????) What the shit?!?!?!?

Thanks to @moony for help and encouragement, thanks to 20kdc for making the additional models.

Old screenshot from when I last had it set up for svideo output (256x224):

Comments

  • roglohrogloh Posts: 2,957

    Very nice and silky smooth 3d rotations, Wuerfel_21!

    I wonder if the P2 could do more than a basic flat shade with more COGs perhaps and/or interpolate the colours for smooth shading in the fill loops or if that would be pushing it too hard at higher resolutions. The 8 bit colour modes makes things difficult to be smooth in any case unless you use luma modes (mono) or use custom palettes with smooth gradients. 16 bit or 24/32 bit colour might make it more doable perhaps.

  • RaymanRayman Posts: 11,842
    edited 2021-02-22 01:18

    Nice! I had to upgrade my PropTool as neither my old version nor FlexProp knew about qsin...

    Keyboard works for me... I have wireless kb/mouse combo...

    I could actually use this for showing 9DOF IMU output visually....

  • @Rayman said
    Keyboard works for me... I have wireless kb/mouse combo...

    Use B/N to go to the biggest model and then press F and R. For me, that kills the keyboard.

  • @rogloh said:
    I wonder if the P2 could do more than a basic flat shade with more COGs perhaps and/or interpolate the colours for smooth shading in the fill loops or if that would be pushing it too hard at higher resolutions.

    Certainly, but not with VJET. Being a scanline renderer, it needs every bit of fillrate it can get to work at high resolutions. Also, keeping track of the interpolated color would be tricky with the way it works right now.

  • evanhevanh Posts: 10,429

    Yay! Got it loaded using loadp2. :) Proptool can't detect the propeller for me. Took me a while to find how to save the compiled binary out of Proptool. "Viewinfo" certainly wasn't my first thinking for it.

  • evanhevanh Posts: 10,429
    edited 2021-02-22 02:27

    @Wuerfel_21 said:

    @Rayman said
    Keyboard works for me... I have wireless kb/mouse combo...

    Use B/N to go to the biggest model and then press F and R. For me, that kills the keyboard.

    F certainly loads the processing up for me. The frame rate drops down a lot on the big models. And in worst case gets scanline break up. Keyboard controls keep trucking along just fine. I'd guess your USB cable needs upgraded. I'm also using a short cable from a mains powered USB hub so then it doesn't matter how long the extension cable is nor the computer's USB power output.

    PS: Ambient temperature is 26 C with the Eval Board now at 40 C just from the prop2.

  • roglohrogloh Posts: 2,957

    @evanh said:
    Yay! Got it loaded using loadp2. :) Proptool can't detect the propeller for me.

    Perhaps you had the same problem I did. Just be sure you don't have the DIP settings all off and an SD card fitted so it attempts an SD boot. In my setup the updated version of PropTool couldn't seem to break in serially and detect the propeller in that case after a failed boot, while the previous version did somehow. When I yanked the SD it detected fine.

  • evanhevanh Posts: 10,429

    It's a Wine compatibility issue for me. PNut is fine at it. And that gives me hope that Jeff, I think it is, might attempt to identify why Pnut works while Proptool doesn't.

  • Spin Hexagon release is blocked by library issues, but I may aswell release the VJET improvements I made so far:

    • Slight fixes and improvements to text rendering. You can now render text at up to 64x scale. That's 512x512 pixels per character! I think the aforementioned corruption issue persists though.
    • Miscellaneous other gunk.
    • (The keyboard issue in the example program is indeed insufficient power. Connect a good power source!)
  • evanhevanh Posts: 10,429

    @Wuerfel_21 said:
    - (The keyboard issue in the example program is indeed insufficient power. Connect a good power source!)

    I think this is something that is going to endlessly reoccur in various guises with the prop2. Many don't fully appreciate how dynamic the power draw can be.

  • evanhevanh Posts: 10,429

    Anyone here tried compiling with flexspin/flexprop and then using this demo? My first attempt is somewhat broken. Here's the binary compiled with -O1 and -O2 optimising and I've had to shift the OBJ section in p2test.spin2 as well:

  • As said in the other thread, IDK why flexspin would choke on this, but the section order mattering seems like a red flag.

    Not at home this weekend, so I can't debug this myself right now.

    Can you try Spin Hexagon? That's all the same VJET+p2videodrv+1CogUsbKbm libraries and that is confirmed working with flexspin (infact it only works with flexspin). To rule any issues with your particular setup. Won't work without an SD card though.

  • evanhevanh Posts: 10,429
    edited 2021-02-28 06:03

    Hexagon is working. Here's what the VJET demo looks like when compiled with flexspin.

  • Wuerfel_21Wuerfel_21 Posts: 1,449
    edited 2021-02-28 14:12

    Yowie, that looks like dot product function is having a stroke.

Sign In or Register to comment.