anu-prakash-dev / godot-landscaper

Grass scatterer, grass colorer, terrain builder, terrain texturer, and terrain colorer. Based in textures and brushes

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Godot Landscaper

Terrain builder, terrain texturizer, grass scatterer, and grass colorer. Based on textures and paintbrushes landscaper

Content

  1. Features And How To Use Them
  2. Performance Concerns
  3. Roadmap To Beta And Asset Library
  4. Author Notes

1. Features And How To Use Them

Follow the next steps:

  1. Download and install this Plugin. See installing_plugins
  2. Open a scene, and instantiate a 'SceneLandscaper' node in the scene tree. It will create a new terrain template
  3. Select the 'SceneLandscaper' node and go to the "Landscaper" tab over the right dock.
  4. Select your brush and click and drag over your terrain to start terra-brushing!

1.1 Terrain Builder

Brush that generates new mesh when you paint over the terrain.
Paint white with left-click to build a new mesh, and paint black with right-click to erase.
TerrainBuilder

1.2 Terrain Color

Brush that color-paints your created terrain.
Paint with the selected color using left-click, use right-click to smooth the selected color.
TerrainColor

Brush Properties:

  • Color of the terrain paint
  • Resolution of the texture in pixels per meter.

1.3 Terrain Height

Brush that changes the height of your created terrain.
Create mounds with left-click, and create ditches with right-click.
TerrainHeight

Brush Properties:

  • Max Height is the relative height of the entire terrain.
  • Apply To All Heighten or lowers the whole terrain evenly.

1.4 Grass Color

Brush that color-paints your spawned grass.
Paint with the selected color using left-click, use right-click to smooth the selected color.
GrassColor

Note that only the top of the grass is being colored. That's because the bottom half is taking the color of the terrain!

Brush Properties:

  • Color of the terrain paint

1.5 Grass Spawn

Brush that spawns new grass over your created terrain.
Spawn grass with left-click to spawn your selected grass variant or right-click to clear it
GrassSpawn

Brush Properties:

  • Density: How many grass instances are inside the area you have painted with this brush
  • Billboard: Tipes of billboarding. BillboardY (grass always looks at the camera), CrossBillboard (for each grass, spawns another 90 degrees in the same position), and Scatter (Scatters the grass with random rotations)
  • Enable Details: Renders the details of your grass variant texture. These are the sharp margin edges in the preview grass shown here
  • Detail Color: Recolor of your details
  • Quality: Subdivisions for each blade of grass. This affects its sway animation and gradient color smoothness (because is vertex colored)
  • Size: Size of the average blade of grass in meters
  • Gradient Value: The color mix from the grass roots to the top as seen from the front. BLACK=terrain_color and WHITE=grass_color
  • Variants: A list of the grass textures to show. Uses the preview images shown here. Does not create extra materials but is capped at 4

Performance concerns

About Textures:

  • Terrain and Grass color textures are stored in separate files as PNG and their size in pixels is calculated as "resolution*world_size". This means that the file is as big as the terrain's bounding box.
  • Terrain and Grass color textures are not mipmapped (LOD) internally but after saving the project, they will be mipmapped automatically.
  • Every texture except colored ones, are stored in a "project.tres" file. They are not relevant for end-products and the project file itself can be deleted if the user doesn't want to edit the landscape anymore.

About Grass:

  • This version now supports GL Compatibility rendering! But it is limited to one grass variant due to the lack of shader instance variables in Compatibility
  • Coloring the grass is optimized by using vertex colors. This means that the shader is only coloring as less as 4 vertex per instance (The vertices of a square)
  • You can set how many vertex to use per grass in "GrassSpawn Brush > Quality"
  • Grass chunking has not been implemented yet.

Roadmap to Beta and Asset Library

  1. Save and bake textures, shaders, and materials in the user folder

  2. Add support for multiple grass billboarding options

    • Cross billboard
    • Billboard Y
    • Scatter
  3. Add Terrain generator brush

    • Click over the terrain and create a mesh surface
    • Meshes are ImmediateMesh that are generated dynamically instead of using a shader
  4. Dedicated UI for paintbrushes

    • Custom control in rightmost Dock
    • Recouple brushes for this new system
  5. Add Instancer Brush

    • Use the same logic as the grass spawner but with custom scenes instead of grass
  6. Asset Library friendly

Author notes

Hi, nickname's DIP. Thanks for passing by!
I'd be glad to hear what you have to say about the grass shader here. Or contact me about this plugin at ab-cb@hotmail.com
See ya!

About

Grass scatterer, grass colorer, terrain builder, terrain texturer, and terrain colorer. Based in textures and brushes

License:MIT License


Languages

Language:GDScript 100.0%