Day 1 - Making a Palm Tree

Cagri BenliCagri Benli
7 min read

I recommend watching this tutorial from DevLogLogan if you like a video format. It's quite fast, but it's more detailed and step by step version and very similar to this document workflow-wise.

Texture Preparation

I started by collecting some reference images and putting them into PureRef (free reference image tool).

Getting textures: Downloaded textures from textures.com (paid texture library) for leafs and trunk texture, for learning images from google search should be ok

Got two textures like this, so I had to learn how to apply black/white alpha mask in Krita (Free image editing software)

Open the .tiff image in Krita. Then drag and drop your transparency mask (black-white image). Choose Insert as new Layer

  1. Right click on the black-white image layer

  2. Navigate to Convert

  3. Under Convert → Select Convert to Transparency Mask

    After clicking you should have your leaves without the background!

  1. Then press Ctrl + Shift + E (to flatten the image) -> Alternatively right click top most layer, and choose Flatten Image

  2. Then we'll scale the texture to a much lower size. From top menu Image -> Scale Image to New Size (Ctrl + Alt + I)

  3. Enter 64x64 for width and height and select Filter: Bilinear-> Press OK

  1. Then from top menu head to Filter -> Adjust -> Color Adjustment Curves (Ctrl + M)

  2. From dropdown menu, select Alpha and try to make your curve into a shape like this. Aim is to not have too much color variation in terms of transparency in the actual colored part of the texture.

  1. If editing the curve doesn't change anything, you might have skipped Flatten Layers step!

  2. On the right side, you should only have 1 layer, so go back to fix this!

(Optional) You can also edit color, saturation, value of the image from Filter -> Adjust -> HSV adjustment (Ctrl + U). If you're making a horror game, you might want to have lower saturation for your textures.

3D Modeling (Blender v4.4)

I recommend you start with the Donut and Anvil tutorials to have familiarity of most of 3D modeling, texturing, rendering workflow.

Disclosure: I had some experience (some years ago) with blender, so I had already created a donut and knew general terms like extrude, UV unwrapping, creating materials etc. I also asked what add-ons I can use to my 3D artist frends:

Another disclaimer: I got the packs, some of them won't be any use to me in short term. I got them at the beginning since I don't remember much, so my plan was to program my muscle memory to use these tools from start.

I've also setup some settings before I started modeling. Also added a 2m (79″) reference cube and moved it to the right side. Why: A human character in game is around 2m (6.5ft) tall. If you want some level of realism, you need to make models close to real world sizes, otherwise they'll feel a little off. For example now I can search how tall is a palm tree, and make my tree approximately that tall.

I've used these to setup Machin3Tools, and learn what features are available. Video 1 Video 2 Of course I'll not remember all these. I watched these to have some familiarity. I'd recommend you learn, merge, pie menus, and origin related shortcuts if you happen to purchase the tool.

After collecting some references and doing some research I got these information

  • Height 3m-15m(10ft-49ft)

  • Around 3m(10ft) radius for leaves

  • They look kinda low poly already

  • Thicc bottom, gets thin quick and gets even thinner towards top (this changes depending on type/age) So I decided to make a 3m tree and one 15m tree

Here's my palm trunk next to the Reference cube, created by extruding a circle with 6 vertices

And here is the leaf creation process:

  • Add a plane

  • Scale in X or Y axis

  • Loop cut and scroll up to increase loop count. We want low count since we want retro-like graphics

  • To "bend" I've selected the center edge and used proportional editing (Sharp curve) , moved on Z axis a bit

  • Then I created a material with the texture I prepared in previous part

  • Important things here are, selecting closest to disable blurring of the image (Since it's super low resolution it'll make it look bad)

  • And connecting alpha of image to alpha of the material, so transparent parts of the image are also transparent on the model/mesh

  • We need to UV Unwrap by going into edit mode, right click, Smart UV Project (for super simple shapes it's ok to use)

  • Then in UV Editing view you can adjust faces to have one "branch" of the tree

  • Now you should have some kind of leaf. I had to switch to 3rd view type to be able to see the material in viewport

  • Duplicate, scale, rotate, move on Z the leaf for around 10 times to make it look like a tree

  • I almost did the same steps for the trunk. Difference is no Alpha connection this time. Also I manually marked UV Seams and unwrapped not smart way

  • I think my knowledge of UV unwrapping comes from different videos. I remember some video mentioning "try to cut a cola can in such a way so you can lay it flat on a surface", and that's how I try to think.

  • One thing special to low-res textures is keeping pixel sizes close so they don't look amateurish and work in unison! That's why I had to cut bottom thick part and scale differently (There must be another and better way, that's how I solved it)

  • Time to export. I've merged leaves under 1 object and trunk is separate. I like to keep parts separate in case if I want to animate/add shader to different parts of the model.

  • I use this format to export form Blender for Godot. File -> Export -> In export glTF 2.0 (.glb, .gltf)

  • Also export only visible objects, so our reference cube doesn't get exported.

Importing to Godot 4.4

Then we drag drop the .glb to Godot

    1. Right click the model and create a New Inherited Scene, so we can add collision to our tree.
    1. Add StaticBody3D (good for not moving/animating environmental objects)
    1. Add CollisionShape3D under StaticBody3D
    1. Create a new shape and roughly match the trunk shape with the capsule
  • ?? And we see normals are wrong for the bottom part

  • Back to Blender We go select the trunk, go into edit mode. Press this menu on top right, and increase Normals size. Press A to select all faces, then Shift + N to recalculate normals. Then we export and return back to Godot

Result is not that good

We’ll now go through settings to go from picture above, to make it look like the picture below.

Steps to get to this:

  • Add world environment node and create procedural sky with these settings

  • A sun (DirectionalLight3D) -> Enabling shadows and disabling all layers made scene more bright? Not sure how to make it work with disabled shadows, please tag me if you know how at bluesky

  • Lastly disable receive shadows for leaf to get rid of self cast shadows

  • I added a new material for Leaves to Surface Material Override with following settings, marked non-default fields with red circles

Please let me know if there are any steps I did so inefficiently that I got you angry :D And tag me here, so I can fix next time!

And this concludes how I created a palm tree for my game!

Happy learning!

0
Subscribe to my newsletter

Read articles from Cagri Benli directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Cagri Benli
Cagri Benli