12-20-2022, 07:33 PM
(12-20-2022, 03:37 PM)SMcNeill Wrote: @MasterGy Hey MasterGy, how about you do us the world's simplest tutorial in 3d graphics. Let's say we have a 2d graphic of a 3x3 grid, which would produce the floor layout to a square room. Can you show us how you'd turn that 2D "map" into a series of cubes which would be placed across the screen in various points?
The Square starting at (0,0) (top,left) would be placed independently to the top, left of the screen, so we could see how that (0,0)-(1,0)-(1,1)-(0,1) series of 4 coordinates would turn into the X/Y/Z of 3 dimensional space. Let the user hit the space bar, and then do the same thing for the to the square next to it, which would be from (1,0)-(2,0)-(2,1)-(1,1), and how that translates to 3D space.
Personally, I think something as simple as that would make a GREAT breakthrough point for a lot of folks with 3D graphics. Once people understand how to get those 3D coordinates, then rotation and such can be added, but going from the 4 2-D points to the 8 3-D points, (I think it's 8 of them, isn't it, for a cube?) is probably the hardest point for people to get sorted out.
Honestly, I'd love for us to have a whole series of 3D related tutorials, where one new concept is added at a time, without it all overwhelming the users all at once, but I also realize others might not have the time to devote to such a number of posts. A post for 2D to 3D. A post for adding rotation on the cubes after that. A post for static cube, but the "player" moving around the cube/grid itself. A post for adding textures via maptriangle so we don't just have plain line walls, ceilings and floors. And finally, a post for detecting collision in that 3D plane...
It's probably more than anyone would want to sit and work up, one after the other, but a fellow can dream can't he? Especially around Christmas time?
I have already tried many times how to make the 3D thing as understandable as possible.
That's why I made this:
https://staging.qb64phoenix.com/showthread.php?tid=896
I didn't overcomplicate it on purpose, I just included the essentials.
Indeed, good documentation would be useful.
3d is not very complicated, it's just very hard to explain. you are right, it should be made visually understandable. I'm happy to help. Unfortunately, I don't understand what you meant by the 3x3 cubes, even though I've read it many times. Please write it again.