I just ran across this again after a few months. Do you think the pen colors could be altered to "shade" faces that are reflecting light less directly?
i looked at your octohedron (cant spell) and cube wire frame project and simplified it to just a cube, and couldn't tell how the corner equations quite worked out, even when i wrote it our on paper (it's easer for me to see it that way)
It's pretty complicated stuff... I wrote that back in 7th grade so I can't really remember what I did anymore haha! I don't feel like going back and figuring it out xD
I've never experienced that glitch as far as I can tell... make sure you run it in the java player online, it works better than the flash player. But thanks for your comments and input!
Exactly. If I made it into a full cube (which I would have already done if Scratch could handle it) I'd shade each sticker, so it would take a little bit of rewriting but it wouldn't be too terrible...
Actually it has absolutely no 3D perspective, because that slows it down quite a bit, and it's just an illusion that the things farther away are larger, because you'd be expecting them to be smaller... if you get what I mean...
This is really cool! The first textured truly 3d object in scratch! Can the textures be made in any resolution, or is there a set one? Also, could this technique be applied to a more complex shape?
It would take some re-scripting to apply the textures to any resolution, so using this technique it's not possible to, for instance, create a slider variable for that. But by altering the algorithm it could theoretically be applied to any shape really...
Interesting approach on making this, but it would be more flexible using a 3D array. The way I see it, it would almost be like a raycaster, except the camera plane is not a line, but a square, sending out rays into a 3D object. This way, you can render any 3D object, not just a cube. But, that would be very slow, and Scratch probably can't do it, though.
Yeah, I'm focusing more on customizing methods for exact objects (such as cubes) than creating a 3D rendering program for any shape, and then I'm optimizing it for more speed, and the camera plane in this project seems to work best for cubes, though I have tried a few other things.
Yeah I'm trying to eventually work up to a full 3D rubik's cube, but Scratch can't seem to handle it (It crashes whenever the scripts become too long or the program is too large), and even if I could, it would likely exceed the upload limit for Scratch. :/ So I'm probably going to turn to Visual Basic or Java, which I intend to learn eventually...
I'm probably not going to add perspective right now, because I would have to completely change a ton of rendering formulas, and that would complicate things, thus slowing down the calculations and rendering, so I'm trying to stay away from perspective rendering at the moment. . .
It only works in the flash player, so make sure you use that for online viewing. I would highly suggest that you DOWNLOAD IT, because the blue and green faces don't render properly when you run it online. Plus, it's fun to download, run in fullscreen, and move around the mouse wildly while watching it trying to render all kinds of cube-like shapes xD
How to use it: -Click the mouse to rotate the cube. -It will constantly render in realtime as a 3D surfaced cube.
How it works: It uses several complex 3D projection formulas to find the x and y coordinates of the vertices to make the cube wireframe appear 3-dimensional. It then connects these in order with the pen tool, creating a 3D wireframe, and draws the additional lines making it a Rubik's cube. To shade the sides, it must first know which sides are visible and which are hidden. It uses a complex rotational identification algorithm to find which sides are visible to the viewer based on the rotation and tilt of the cube. It then stores these in a list. Finally, the 6 shading sprites identify which sides are supposed to be shaded and shade them using a parallelogram shading algorithm. The technique used to shade is a brute-force method, which speeds up the rendering speed indefinitely. How it works is that instead of using loop blocks such as forever, repeat until, or repeat (x), each repetition is programmed out into a huge script. This way, it runs the whole script instantly, instead of running all 51 repetitions at the rate of 40x per second. This makes the cube render theoretically in 1/40th of a second rather than 1.275 seconds. COME AT ME BRO
I used some scripts from my project "3D Object Wireframe."
This is the first of its kind on Scratch, and only took about 2 hours to make.
Thanks for watching and please leave a comment or press love it if you love it!
Comments
You need to be logged in to post comments
Add a Comment
unreal
Not even in turbo!
nice
Amazing
I just ran across this again after a few months. Do you think the pen colors could be altered to "shade" faces that are reflecting light less directly?
Interesting project wow :O!
That's the best program I've ever seen! Make a speed of rotate :)
:( why won't it let me download???nvm...*sigh* btw nice project!!
Sweet!
Hmm.. I thought it was by Atomicbawn...!
Nope, I made this a while ago, on my own :p
(view all replies)Well done! The loop delay in Scratch is killing me! Lol: "COME AT ME BRO"
Thanks! Yeah, the loop delay is sure a problem; I hope they make an atomic forever block in scratch 2.0!
(view all replies)"E' BBellissimo" (this is FFantastic) said my 8-years-old son :-)
Tell him, "Vi ringrazio molto per il vostro complemento!" (I used Google Translate!)
(view all replies)wow
i looked at your octohedron (cant spell) and cube wire frame project and simplified it to just a cube, and couldn't tell how the corner equations quite worked out, even when i wrote it our on paper (it's easer for me to see it that way)
It's pretty complicated stuff... I wrote that back in 7th grade so I can't really remember what I did anymore haha! I don't feel like going back and figuring it out xD
make a project where it asks for the (x,y,z) of a slider value set of points and it creates it in a wire frame and you can drag it around
if you get a face looked at strait on, it disapears. but that probably could be fixed, i mean, by the looks of it, you do pretty good
I've never experienced that glitch as far as I can tell... make sure you run it in the java player online, it works better than the flash player. But thanks for your comments and input!
I downloaded this and you are a genius.
Thanks! :D
ohh, discovered a blind spot
epic!!! BTW i know what W.W.J.D means
I really like this! (:
Thanks!
Meow! Meow! Meow! Meow! Meow!
meow
cat
EPIC!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Rubiks cube XD
WOW.
Amazingly fast! Lov'd it and fav'd it!
Thanks a ton!
really epic. but I suppose that you shade by the whole face not by the sub-faces, which means it isn't extendable to any non-solved conditions.
Exactly. If I made it into a full cube (which I would have already done if Scratch could handle it) I'd shade each sticker, so it would take a little bit of rewriting but it wouldn't be too terrible...
(view all replies)Can you mix it up, or is it just a rotational 3d thing?
Sorry, at this point it just rotates...
(view all replies)this is reallly cool
Thanks dude!
(view all replies)I tilted it just so on the white side and the screen turned black. Are you aware of that glitch? (I'm online)
WOW! Just like a Rubix Cube.
Yeah, that's what I was going for!
if scratch only had costume x stretch and y stretch (like.. was it byob?), making these 3D figure with textures wouldn't be hard.
Yeah I'm pretty sure it's BYOB
*Caugh* typo farther
Epic, but the prospective 3d seems to be wrong, things further should be smaller, but instead, in your project, things further are larger.
Actually it has absolutely no 3D perspective, because that slows it down quite a bit, and it's just an illusion that the things farther away are larger, because you'd be expecting them to be smaller... if you get what I mean...
(view all replies)Epic man.
This is REALLY GOOD! If you came out with an actual rubik's cube game, MAN WOULD YOU GET SO MANY LOVE ITS AND VIEWS!
great job :O
Thanks :D
This is really cool! The first textured truly 3d object in scratch! Can the textures be made in any resolution, or is there a set one? Also, could this technique be applied to a more complex shape?
It would take some re-scripting to apply the textures to any resolution, so using this technique it's not possible to, for instance, create a slider variable for that. But by altering the algorithm it could theoretically be applied to any shape really...
(view all replies)This is amazing! And Aidan is right, there was one before, but it was nowhere near as good as this.
Cool. Thanks! What's the project called?
(view all replies)This isn't the "first of its kind", but it is definitely very good.
Are you sure? I haven't seen any surfaced cubes yet, besides AddZero's kinda sketchy one :P
Love + Fav. Amazing!
Wow! This is amazing. The blue is kind of messed up though.
Yeah a little, that's a glitch that only happens online though.
(view all replies)This is the best 3d Ive ever seen! Good Job! Im gonna try to make a 3d game out of this!
Thanks! Just PLEASE make sure you give credit for this!
(view all replies)Interesting approach on making this, but it would be more flexible using a 3D array. The way I see it, it would almost be like a raycaster, except the camera plane is not a line, but a square, sending out rays into a 3D object. This way, you can render any 3D object, not just a cube. But, that would be very slow, and Scratch probably can't do it, though.
Yeah, I'm focusing more on customizing methods for exact objects (such as cubes) than creating a 3D rendering program for any shape, and then I'm optimizing it for more speed, and the camera plane in this project seems to work best for cubes, though I have tried a few other things.
Cool
Wow! What could you do in turbo mode? If you could render 26 of these at once and do a bit more sorting, you would have a rubix cube.
Hey check it out! I made it into a Rubik's cube by adding a few extra lines. Sadly you can't turn it or anything though...
Yeah I'm trying to eventually work up to a full 3D rubik's cube, but Scratch can't seem to handle it (It crashes whenever the scripts become too long or the program is too large), and even if I could, it would likely exceed the upload limit for Scratch. :/ So I'm probably going to turn to Visual Basic or Java, which I intend to learn eventually...
you're a ginious!
I dont think that I spelled that right
(view all replies)Awesome! Totally amazing! If you add perspective, would it fix the glitchyness in the edges that are almost perpendicular to your view.
Nah, I'm not really working on anything, but I'm about to go away for a few days.
(view all replies)I'm probably not going to add perspective right now, because I would have to completely change a ton of rendering formulas, and that would complicate things, thus slowing down the calculations and rendering, so I'm trying to stay away from perspective rendering at the moment. . .
(view all replies)Yeah. Thanks! This was easier than I thought, I just had to employ a bit of an unintuitive method.
(view all replies)