Render line grid on 2D and 3D FTC fields#527
Conversation
|
There is actually one offseason FTC event per year with a differently scaled field. Last year I made a custom assets file for this from the official field render with the lines built in, so as long as this overlay can be disabled from an asset file setting it's totally fine. That looks perfect for all the regular fields though! It's okay if it isn't perfectly accurate. |
|
Does this event have a different number of squares, or no grid at all? Should there be support for specifying dimensions? |
After reviewing with the game manual, the asset edge lines are where they should be, and the grid does extend beneath the walls. Its just an inconsistency with the image in that path-planning software which connects very cleanly to a grid, and from the model of the field that was rendered. So the assets are fine. :) |
|
I was referring to the Chicago Robotics Invitational, which is a premier event where the field is expanded to be 3v3 instead of 2v2. The exact aspect ratio and size change year to year but it is always still based on the tiles. Last year I just used their field image with the detailed lines for the 2d field, instead of making a render. The target audience for this would be really small though, since only 38 teams go, so if it's difficult to support don't worry about it. Are you planning on including 3D field support in this PR as well? |
I can certainly give it a shot! |
|
I think the subtle look is great! The center one could match it as well. |
|
I this this is pretty complete now. Let me know if anything should change :) |
|
That looks great to me! Your implementation seems perfect as well. Have you tested XR mode? |
I haven't looked enough into it. Is the rendering code done on the iOS device or is the rendering streamed? Does the app need to be updated on the device? I'm much more familiar with the Android ecosystem for development, and I only have access to an old iPad for testing anything Apple-based. Would jailbreaking be required? Maybe there should be a section added to the contributing document explaining the testing mechanisms / structure for XR. |
|
The rendering is done in Typescript code sent to the iOS device when it connects. Look at XRRenderer.ts for the details, but it should be easy to update and you won't need to change the iOS app at all. (Which is good, since it's pretty impossible to develop the iOS app unless you're Jonah lmao) |
|
Go ahead and give that a try if you'd like. I'll be able to test it when I get home though. |
|
After some testing, the lines render just fine. But the lines were covered in the 2024/2025 model, because it seems like the XRRenderer never respects the 1.3 centimeter offset applied to that model. "position": [0, 0, -0.013], |
|
Aside from that independent issue, XR works now! :) |
Works great for me with #515 ! The lines look kinda bad in this screenshot but they look great in headset. I verified they were accurate to the tile sizes as well!
|





Solution for #524
This will draw lines directly onto the 2d field when it is an FTC field. Assuming a 6x6 grid, scaled to the size of the field, and enabled or disabled in per-field configuration.