I've seen several uses of 3D in Pico-8 games and I'm wondering if anyone knows of any good tutorials to better understand the process of setting up a 3D area? I've looked at the code of some of the games that setup 3D, but they're not clearly documented or I'm just not grasping it.
I'm new to Pico-8, but I've watched several good videos about basic 2D development. I have something I want to try, but I just need a better grip on how to set it up.
I'd never done any 3D before a month ago and I was able to learn enough to make this by reading mostly this site:
That whole site has a ton of stuff to read through and although there seemed to be a lot of typos for some reason, it was definitely helpful for me. When I didn't understand something, I would Google the concept to find alternate explanations of it on other sites.
This one looks pretty good too:
In general though it seems pretty difficult to find clear explanations of this stuff, since writing software 3D renderers is not a super-common thing in an age where we have GTX 1080s, so yeah if anyone else knows of any other good resources to continue to learn, I would be interested as well :)
@kittenm4ster nice! thanks for the resources. I'll look through those and see what I find.
And I guess I could have been more specific with my intentions. While I may need to build shapes in 3d, I'm more interested (at this point) in understanding the relationship between the camera view and moving it through the space, or creating targeted x,y,z points at distances from the camera. So I would think it's very basic stuff, math, to freely move and rotate camera in 3d space, with the goal of reaching a targeted coordinates.
Did you read the first Picozine ? There was a tutorial to make a cube rotate I think. To go beyond, you may have to learn about matrices and transformations. A lot of Pico 8 3D games only emulate some limited transformations to avoid costly matrices. So learning about the general case may give you a hint at what they try to do.
Basicly, to make a 3D scene, you first work in a 3D space called "the world" where you place your objects and everything in relation to each other. Then you have to see it from a camera, so you transform everything in the camera space. Then you need to project it on the 2D screen (making far away object smaller for example), and that is called "projection" and depend of the field of view of the camera.
Usually your objects are just a bunch of 3D vectors, that will end up projected in 2D on the screen, and you can draw a line, or a triangle or a sprite at those locations.
@NuSan I didn't read that. I'll check it out. But I did see a rotating 3D cube inside a cube demo. That's one of the games I looked at the code. It has a foundational similarity of where I think I need to begin. I just didn't fully grasp how some of his functions worked. Thanks. I'll check out that zine and keep trying stuff out.
old topic, but I'm facing the same needs. Understand 3D with simple examples.
I found this very good:
But no mention of camera view. Still very good.
The closest I ever got to doing 3d in code was a simple mesh cube once, But that was just manually putting in data lists of coorinates based off me playing around with isometric graphic paper.
Thanks for putting these links up, Rastering is something I've long heard tossed around in demoscene stuff but never really grasped the concept of it. (I am only in my later years starting to love and appreciate maths >.<)
[Please log in to post a comment]