Mario Morgenthum
banner
morgenthum.bsky.social
Mario Morgenthum
@morgenthum.bsky.social
Software developer 💻 and math student 🧑‍🎓
I still have a few issues with the lighting. The world still looks quite empty with just a few birch trees, mushrooms, and flowers, but that'll change quickly once I have some vegetation models. By the way, those elements were placed using bevy_map_scatter based on certain rules.

#map_scatter
November 5, 2025 at 7:54 PM
It uses the avian3d physics engine (also used in the game for general physics) to top-down raycasts to the ground, to find the height/y-coordinate for the trees.
October 7, 2025 at 3:20 PM
Oh, because the relative link doesn‘t work on crates.io. Need to fix it, ty!

Examples: github.com/morgenthum/m...
October 6, 2025 at 6:52 PM
Jittered grid position candidates are filtered by a field graph using a simple texture. The scene features a camera with a Bloom component and 3D cubes with emissive colors. A separate system modifies the cubes Y-scale to create this effect.
October 1, 2025 at 5:06 PM
Candidate positions were generated with Poisson-disk sampling; grass uses a jittered grid. Actual species are placed layer by layer - trees first - by computing per-species probabilities from their own field-graph specifications.
September 18, 2025 at 3:25 PM
The water is the double sine wave in the middle of the image. It was constructed using the crates Texture-trait to generate the texture programmatically.
September 18, 2025 at 3:14 PM
I’m not sure yet whether I should release map_scatter as engine-agnostic, or if I should first think more about bevy_map_scatter. I’d like to take the Bevy community’s knowledge into account for the Bevy crate.
September 17, 2025 at 4:03 PM
Points are generated by a jitter grid (with no jitter, so it’s actually just a grid). The first texture is used as the basis for a Euclidean distance transform to calculate the points nearest to the text. These are then filtered with smoothstep and finally rendered as a PNG for this example.
September 17, 2025 at 4:00 PM
Final polish is underway. Expect a release in a few days with docs and examples.
August 28, 2025 at 6:31 PM
If it looks too “generated”: use splat maps from texture paint (e.g., Blender) to drive or filter the rules - paint where to allow/boost/suppress types. Mix authored masks with procedural fields for control.
August 28, 2025 at 6:28 PM
Works great for 2D - and for 3D too: sample a top‑down position, raycast to terrain for height, then spawn models at the hit. Same rules, different consumer. See my previous post for a 3D in‑game screenshot.
August 28, 2025 at 6:28 PM
In the example, the rules (grass near river, trees away, mushrooms near trees) are ~250 LOC total. You write small field‑graphs (distance, smoothstep, masks) and compose them into stages/layers. That’s it - rules, not hand‑placed points.
August 28, 2025 at 6:26 PM
Of course, many species are still missing - just a first attempt.
August 26, 2025 at 2:42 PM