How to make a 3D platform with repeating texture.
3D platform with a repeating texture can be made by toggling UV1
toggles: Triplanar
→ World Triplanar
.
Here is a simple walkthrough.
I will use a kenney_voxel-pack/PNG/dirt.png
image texture.
First let’s make regular platform.
It’s a simple StaticBody3D
with sub-nodes CollisionShape3D
and MeshInstance3D
.
The CollisionShape3D
Shape
should be set to BoxShape3D
Setting MeshInstance3D Mesh
The MeshInstance3D
Mesh
should be set to New BoxMesh
Setting MeshInstance3D Material
Then we click on the Mesh of MeshInstance3D to expand options.
In the MeshInstance3D Mesh options we should see Material
to which we drag our dirt.png
image.
Setting MeshInstance3D Material to Triplanar: World Triplanar
This is the core of our tutorial. It will make Material a world Triplanar
which as you will see, will make Material into a seamless repetitive texture.
Now we click on the Material to expand options.
Scroll down and click on the Material UV1
Option.
In the UV1
toggle: Triplanar
and World Triplanar
.
All done.
Test: Scaling StaticBody3D
into a 3D platform
To test your seamless textured StaticBody3D
, let’s apply some basic scale transformation.
Let’s click on StaticBody3D
and expand Transform Option.
Click on icon (2.) to stop uniform
transformation and set X
and Z
values to higher.