Log In  

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.

P#22279 2016-06-04 16:19 ( Edited 2017-09-15 03:56)

3

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:

http://www.scratchapixel.com/lessons/3d-basic-rendering/rasterization-practical-implementation

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:

https://www.davrous.com/2013/06/13/tutorial-series-learning-how-to-write-a-3d-soft-engine-from-scratch-in-c-typescript-or-javascript/

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 :)

P#22280 2016-06-04 16:39 ( Edited 2016-06-04 20:45)

@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.

P#22281 2016-06-04 16:54 ( Edited 2016-06-04 20:55)

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.

P#22285 2016-06-04 17:25 ( Edited 2016-06-04 21:25)

@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.

P#22289 2016-06-04 19:03 ( Edited 2016-06-04 23:03)

old topic, but I'm facing the same needs. Understand 3D with simple examples.

I found this very good:
http://petercollingridge.appspot.com/3D-tutorial/rotating-objects

But no mention of camera view. Still very good.

P#44182 2017-09-14 06:23 ( Edited 2017-09-14 10:23)

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 >.<)

P#44194 2017-09-14 19:00 ( Edited 2017-09-14 23:00)

Rasterizing is a great way to learn about programming and optimization. You even pick up some linear algebra. The rabbit hole goes really, really deep, too, so you can learn a lot. One of the most fun skills I've ever developed.

P#44202 2017-09-14 23:56 ( Edited 2017-09-15 03:56)

[Please log in to post a comment]

Follow Lexaloffle:          
Generated 2022-11-27 01:39:38 | 0.015s | Q:22