Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » How do I make 3d with pen?
- 3ex
-
Scratcher
39 posts
How do I make 3d with pen?
How do you make 3d with pen? I need your help…



ask [ How do you make 3d with pen?] and wait
- awesome-llama
-
Scratcher
1000+ posts
How do I make 3d with pen?
You should just search it.
Anyway, I found this:
Just read no.3
Anyway, I found this:
Just read no.3
Introduction
How you go about 3D on Scratch really depends what sort of 3D you're thinking of. I'd say there are, roughly, three types of 3D you can do in Scratch (though you can combine some of them in various ways).
But be warned: I'd really recommend you ensure you are confident creating ‘normal’ games/projects in Scratch before you head into 3D! With that warning, here goes…
1) Top-down costume slices:
This works by taking slices through a 3D object (i.e. you think what each slice looks like), and creating a costume for each (different) slice. Then you ‘stack’ them - placing each slice on top of the previous, with a slight offset. This gives the illusion of a 3D object, and by changing the offset you can even make it look like they are tilted by different amounts. Rotating the costumes will rotate the 3D object in the appropriate way, making it quite an easy method to pull off something that looks quite reasonably 3D.
The game-play is obviously fairly limited to top-down using this approach, though changing the offset of the stacked costumes does give the impression of looking from different angles or heights, so it's possible to make it look more sophisticated with some work.
A project that gives an overview of the idea: http://scratch.mit.edu/projects/1236750/
A studio with numerous examples of this approach (as well as others): http://scratch.mit.edu/studios/22121/
Amount of maths required: fairly minimal (e.g. can get away without trig, since the way the game works would be basically the same as a top-down 2D game, but you just stack costumes to give it some 3D appearance).
2) Costume size with distance:
The most basic way to do this is simply to have the various objects in your game as costumes, and then change the size of the costume with the distance to that object (i.e. the further away it is, the smaller it gets). This limits the game-play to pretty much a two-dimensional surface, because you can only see one view of the objects (unless you create more costumes for some height variation views).
If you put some effort into creating many costumes, one for each viewing angle of each of your objects, then this can give some very impressive results. (And I think combining this with a raycaster for vertical walls is probably the most effective way to create a great-looking 3D game in Scratch.)
A great classic example is Coin Runners 3D: http://scratch.mit.edu/projects/1530618/
An example combining costumes with raycaster: http://scratch.mit.edu/projects/14777574/
Amount of maths required: Some 3D to 2D projection to work out where objects will appear on-screen, and what size to make them. If you want to use multiple costumes, for different viewpoints (like Coin Runners above), then some trig required to get rotation angles to find which costumes to use for the correct view.
3) Pen-rendered ‘full 3D’ objects:
This is the most complicated 3D to do in Scratch. There are a number of things that make it difficult, such as the maths involved, but also some of the limitations of Scratch itself (pen limits, speed, lack of certain types of built-in list operations, etc.)
I call this “full 3D” because it's the only feasible way to create 3D objects in Scratch that can be seen from any viewing direction (i.e. different tilt angles above and below, and all angles around).
If you're going to try this, start with just wireframe objects. You need to think carefully about how you're going to store the information about the objects (e.g. using lists, etc.), and how you manipulate that information (due to the speed of Scratch's script interpretation).
If you're feeling really confident, once you've got wireframe going, you can start to think about filling in surfaces, even with some shading for lighting. There are really not that many Scratchers who have managed wireframe 3D in Scratch - and even fewer who get as far as trying filled surfaces!
A wireframe tutorial: http://scratch.mit.edu/projects/2855520/
An example wireframe game: http://scratch.mit.edu/projects/10015457
An example filled-surface game: http://scratch.mit.edu/projects/10085324
A studio containing examples of ‘full 3D’ projects (and raycasters): http://scratch.mit.edu/studios/201680/
Amount of maths required: Lots! Most helpful is understanding vectors in 3D. Also some trig to deal with angles and rotation.
If you really want to attempt this, I'd suggest you work carefully through the studio in my sig below.
Texturing? Raytracing?
I haven't said anything above about textures (that means drawing some kind of patterning onto surfaces of 3D objects). There's a reason for that… it's simply too much for Scratch at the moment. This is really why the best-looking 3D comes from using multiple-view costumes - because then you get the good-looking detail from a pre-existing costume, rather than trying to draw it all with the pen.
Just to give an idea of how impossible it is to pen-render textured objects that can rotate in a general way in full 3D, and do it quickly enough to use in a game, here are a few examples:
3D textured Minecraft block: http://scratch.mit.edu/projects/10536676
3D textured Link (from TLOZ): http://scratch.mit.edu/projects/10541079
3D textured Minecraft chunk: http://scratch.mit.edu/projects/14128344
3D textured globes: http://scratch.mit.edu/projects/17679303
I also haven't said anything about raytracing (that's different to raycasting). Again this isn't something you can use for a game - though it can produce some nice-looking rendered scenes. Here's a classic example…
Raytraced scene of patterned balls: http://scratch.mit.edu/projects/56074/
Last edited by awesome-llama (March 21, 2016 06:37:18)
- 3ex
-
Scratcher
39 posts
How do I make 3d with pen?
Here's a simple example.3ex: Thanks Gaza101!
gaza101's reply: _________
- 3ex
-
Scratcher
39 posts
How do I make 3d with pen?
http://dealsnprice.com/stores/mobikwik this may help, check it out.Excuse me but I can't click the link.
- deck26
-
Scratcher
1000+ posts
How do I make 3d with pen?
It's spam, I've reported it.http://dealsnprice.com/stores/mobikwik this may help, check it out.Excuse me but I can't click the link.
- loranne666
-
Scratcher
10 posts
How do I make 3d with pen?
define Go to(x)(y)(z)
go to x: (240*(x/z)) y: (240*(y/z))
define Draw rect(length)(width)(x)(y)(Z)
Go to(x-(length/2))(y+(width/2)(z)
pen down
Go to(x+(length/2))(y+(width/2))(z)
Go to(x+(length/2))(y-(width/2))(z+150)
Go to(x-(length/2))(y-(width/2))(z+150)
Go to(x-(length/2))(y+(width/2))(z)
pen up
- deck26
-
Scratcher
1000+ posts
How do I make 3d with pen?
Please try to remember to check the date before posting. Not sure why you need a custom block for a single Scratch block which you could just use in place or how drawing 4 lines can possibly give a 3d rectangle.define Go to(x)(y)(z)
go to x: (240*(x/z)) y: (240*(y/z))
define Draw rect(length)(width)(x)(y)(Z)
Go to(x-(length/2))(y+(width/2)(z)
pen down
Go to(x+(length/2))(y+(width/2))(z)
Go to(x+(length/2))(y-(width/2))(z+150)
Go to(x-(length/2))(y-(width/2))(z+150)
Go to(x-(length/2))(y+(width/2))(z)
pen up
- pitir
-
Scratcher
4 posts
How do I make 3d with pen?
(pick random (pick random (pick random (pick random (pick random () to (10)) to (10)) to (10)) to (10)) to (10))
- DrGaming_92Games
-
Scratcher
100+ posts
How do I make 3d with pen?
(hi)
Please don't post on old topics
- xrobotPl
-
Scratcher
4 posts
How do I make 3d with pen?
I say (THANKS?)
(THANKS?=true)
Last edited by xrobotPl (May 4, 2020 12:09:59)
- gilbert_given_189
-
Scratcher
1000+ posts
How do I make 3d with pen?
say [i want to know how to make 3d]
I say (THANKS?)(THANKS?=true)
(pick random (pick random (pick random (pick random (pick random () to (10)) to (10)) to (10)) to (10)) to (10))
I need help with (all) 3D stuff
It seems like you post a blockspam. If you're here just to practice [scratchblocks], check this post.(hi)
If you want to make 3D things, look at the post before.
Last edited by gilbert_given_189 (May 21, 2020 01:54:19)
- Alan_Walker_3
-
Scratcher
33 posts
How do I make 3d with pen?
lolsay [i want to know how to make 3d]I say (THANKS?)(THANKS?=true)(pick random (pick random (pick random (pick random (pick random () to (10)) to (10)) to (10)) to (10)) to (10))I need help with (all) 3D stuffIt seems like you post a blockspam. If you're here just to practice [scratchblocks], check this post.(hi)
If you want to make 3D things, look at the post before.
pppppppp
- Discussion Forums
- » Help with Scripts
-
» How do I make 3d with pen?