CodeBlanks Logo Icon CodeBlanks

Summary - Godot 3D

Reinforce Godot 3D usage with a summary task.

Godot 3D Architecture Summary

The Godot 3D ecosystem is built from specialized node combinations. While MeshInstance3D and StandardMaterial3D handle visual geometry and surface shading, DirectionalLight3D illuminates the scene and Camera3D captures the viewpoint. Dynamic physics are managed via RigidBody3D.

MeshInstance3D mesh = new MeshInstance3D();
Camera3D cam = new Camera3D();
cam.Current = true;

Practice Inspect Godot 3D Scene State

Print mesh.Name and cam.Current values using GD.Print("Model: " + mesh.Name); and GD.Print("Kamera: " + cam.Current); respectively.

Starter code

Player.cs
using System;

public class MeshInstance3D
{
    public string Name { get; set; } = "Karakter";
}

public class Camera3D
{
    public bool Current { get; set; } = true;
}

public static class GD
{
    public static void Print(object message) => Console.WriteLine(message);
}

public class Program
{
    public static void Main()
    {
        MeshInstance3D mesh = new MeshInstance3D();
        Camera3D cam = new Camera3D();
        // Dugum adini ve kamera aktifligini ekrana yazdir
    }
}

Sample solution

Player.cs
using System;

public class MeshInstance3D
{
    public string Name { get; set; } = "Karakter";
}

public class Camera3D
{
    public bool Current { get; set; } = true;
}

public static class GD
{
    public static void Print(object message) => Console.WriteLine(message);
}

public class Program
{
    public static void Main()
    {
        MeshInstance3D mesh = new MeshInstance3D();
        Camera3D cam = new Camera3D();
        GD.Print("Model: " + mesh.Name);
        GD.Print("Kamera: " + cam.Current);
    }
}

Expected output

Model: Karakter
Kamera: True

Questions and answers

Review the lesson questions together with their answers. To test yourself, solve the lesson interactively.

1 Which three fundamental node groups are required in Godot 3D for objects to appear, be lit, and be viewed by the player?

  • AudioListener, Timer, and CanvasLayer
  • GPUParticles2D, Parallax2D, and Path2D
  • MeshInstance3D, DirectionalLight3D, and Camera3D Correct answer
  • Node2D, TileMap, and Sprite2D

Explanation: In a 3D scene, MeshInstance3D for appearance, DirectionalLight3D for illumination, and Camera3D for the viewpoint work together.

2 Summary Material Override

Question
meshDugumu.____ = yeniMateryal;
Answer
meshDugumu.MaterialOverride = yeniMateryal;

Explanation: The MaterialOverride property is used to assign custom materials to geometry on a MeshInstance3D.

3 All Godot 3D Concepts

Term Meaning
MeshInstance3D Node rendering 3D objects in scene
Camera3D Displays scene onto player screen
DirectionalLight3D Global sun-like light and shadow
RigidBody3D Dynamic body moving via physics engine

All lessons in Intermediate