Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • CreatiCode
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

CreatiCode Scratch Forum

  1. CreatiCode Forum
  2. Knowledge Base
  3. 3D Blocks
  4. Using Spheres

Using Spheres

Scheduled Pinned Locked Moved 3D Blocks
1 Posts 1 Posters 1.4k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • CreatiCodeI Offline
    CreatiCodeI Offline
    CreatiCode
    wrote on last edited by admin
    #1

     

    Prerequisite

    • Adding Boxes to a 3D scene

    Introduction

    Besides boxes, the next most commonly used shape in 3D scenes is the Sphere. Spheres can be added using the add sphere block from the 3D Object category:

    https://cdncreaticodecom.b-cdn.net/scratch-gui-projects/forum/64af77df-e310-4f4d-913d-fc3290749e99.png" width="800" style="filter: drop-shadow(0.35rem 0.35rem 0.4rem rgba(0, 0, 0, 0.5));">

     

    Parameters

    Color

    You can set the color of the sphere by clicking on the color input.

    Size in x/y/z

    These 3 numbers control the size of the sphere in each direction. For example, the following program adds an oval shape that is taller along the Z-axis:

    https://cdncreaticodecom.b-cdn.net/scratch-gui-projects/forum/5cf1c819-82f3-4013-96dd-acae03911f32.png" width="800" style="filter: drop-shadow(0.35rem 0.35rem 0.4rem rgba(0, 0, 0, 0.5));">

    https://cdncreaticodecom.b-cdn.net/scratch-gui-projects/forum/a993d755-b8ef-4aac-b93a-58d38f13b166.gif" width="325" style="border-radius: 5px; border: 1px solid #29622d;">

     

    Arc

    The “arc” value allows us to show a portion of a sphere, just like how you can peel off some sections of an orange:

    https://cdncreaticodecom.b-cdn.net/scratch-gui-projects/forum/3c2d967d-0c24-46f5-9976-8e0e35e78443.png" width="300" style="border-radius: 5px; border: 1px solid #29622d;">

    For example, the following picture shows the difference between arc values of 100, 75, 50, 25 and 5:

    https://cdncreaticodecom.b-cdn.net/scratch-gui-projects/forum/be785df3-2da3-4bd0-ac47-f4120b620da5.gif" width="700" style="border-radius: 5px; border: 1px solid #29622d;">

     

    Slice

    The “slice” value allows us to vertically cut off a portion of a sphere, just like how you cut lemon slices:

    https://cdncreaticodecom.b-cdn.net/scratch-gui-projects/forum/ecae681f-afda-4269-95ec-169044bc2f06.png" width="400" style="border-radius: 5px; border: 1px solid #29622d;">

    For example, the following picture shows the difference between slice values of 100, 75, 50, 25 and 5:

    https://cdncreaticodecom.b-cdn.net/scratch-gui-projects/forum/42d0d9b4-df20-436a-970b-d781a8140934.gif" width="700" style="border-radius: 5px; border: 1px solid #29622d;">

     

    Sides

    A sphere is approximated by many small triangles, and the “sides” value controls how many such triangles are used. The more sides, the smoother the sphere looks, but it would also take the game engine more time to draw these triangles. For example, the following picture shows the difference between sides values of 2, 4, 8, 16 and 32.

    https://cdncreaticodecom.b-cdn.net/scratch-gui-projects/forum/3a158433-155c-4b39-a847-76fa33313cbf.gif" width="700" style="border-radius: 5px; border: 1px solid #29622d;">

    For most situations, you can use sides of 8 or 16 to reduce the computations. If you are including a very large sphere in your scene, then you will need to use more sides to make it smooth.

     

    Demo

    When you set both the arc and slice to less than 100, you can get some interesting shapes.

    For example, with arc of 25 and slice of 50, you get a flying carpet:

    https://cdncreaticodecom.b-cdn.net/scratch-gui-projects/forum/fe6070f7-13ed-463f-aa76-268c730197b9.gif" width="250" style="border-radius: 5px; border: 1px solid #29622d;">

    On the other hand, with arc of 50 and slice of 25, you get a face mask:

    https://cdncreaticodecom.b-cdn.net/scratch-gui-projects/forum/5b4b92a9-7352-4a12-9228-47d043e45395.gif" width="250" style="border-radius: 5px; border: 1px solid #29622d;">

    1 Reply Last reply
    0
    • CreatiCodeI CreatiCode pinned this topic on

    Hello! It looks like you're interested in this conversation, but you don't have an account yet.

    Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

    With your input, this post could be even better 💗

    Register Login
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • CreatiCode