Super duper early preview: VJET for P2
![Wuerfel_21](https://forums.parallax.com/uploads/userpics/693/n8QPDN86LL3XG.png)
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 Smile?!?!?!?
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
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.
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....
Use B/N to go to the biggest model and then press F and R. For me, that kills the keyboard.
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.
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.
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.
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.
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:
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.
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.
Hexagon is working. Here's what the VJET demo looks like when compiled with flexspin.
Yowie, that looks like dot product function is having a stroke.