XaiJu
Tooley1998
Tooley1998

patreon


New PCG System

To support more natural looking environments and my future planned content I have rewritten my procedural asset placement system. I thought I'd do a small write up about it.

I initially looked into using UE5s PCG plugin but found its learning curve quite steep & some things like for example getting a meshes bounds to be overly convoluted. Or maybe its just my C++ loving ape brain hating node based interfaces idk.

It also looked like it was going to be quite hard to get custom data into the PCG system from my voxel engine. Anyway I did take inspiration from some of its principles.

My system which I call Voxel PCG features a modular staged design. Each stage is run in sequence and uses a series of passes. These passes can be overridden to have special behavior.

Each stage starts off by generating a field of random points at a desired density and then runs a series of interpretation passes on those points to reach the desired result.

For example the rock stage takes each initial point, assigns a large rock to that point and then places a grouping of small rock points around it to create natural looking group of rocks instead of a randomly scattered field.

Each stage can also interpret points generated in prior stages however they need. E.g in the old system a rock could not be placed under a tree as their bounds would overlap. Now the rock interprets the bounds to be just the trunk and as such it can be placed under the tree.

Other things like vegetation/some ambient effects are now also generated using this system and because its all just C++ you can do basically anything you want. Anyway I hope this was at least a little interesting and made some sense 😂😂

 

New PCG System

Comments

Thanks

Tooley1998

My my, that does look good!

Angus Keane

oh no the old mystical forest assets wont be coming back

Tooley1998

I mean in the forest the new trees look skimpy on the leaves like sometimes while exploring the first biome you come across really thick and dence woods were it gets dark underneath. But with these new looking trees it doesn't look like that will be happening anymore

mrwoofwoof

Thanks

Tooley1998

if you're referring to the super old mushroom swamp biome that is still coming it will just look very different

Tooley1998

ill be separating stages into biomes but other than that the system probably wont change much

Tooley1998

Very cool! I appreciate the share and I like the approach. As your game expands will you be abstracting the stages into stage types/categories and then applying a layering order? Just thinking that down the line this would make it possible to feed in parameters to your world building system and allow for some very dynamic world/terrain creation.

Tillweed

Looks good and i cant wait to see more but i do have one thing ima miss and that is the thick rooftop forest were the trees covered so much it was alway darker in the forest or wil that still be a thing

mrwoofwoof

1. C++ = I love you, 2. The Code is sorted = pleasure to look at, 3. It looks Beautiful = well done!

[TheUserNameOf_TBOTUkN]

Thanks haha it could probably use a few comments.

Tooley1998

Thanks :)

Tooley1998

That’s really awesome bro! I’d love to see more behind the scenes stuff, I find it fascinating :) also, big thumbs up for the clean and well formatted code :D

txsss

Super interesting! I’d love more posts like these. Keep up the good work man! Well done!

Emil Iwarson


More Creators