Cropout Sample Project - Unreal 5.5.4 - Mega Learning Thread

[INFO DUMP: BP_IslandGen Part 1]

After fiddling with C++ classes for a while I decided to switch focus as I had an idea that bothered me for a while, namely, to have better control over what is where on the island. The original IsaldnGen plugin uses BP_SpawnMarkers to know where to spawn the Interactables, but that in all cases is just a circle with various degrees of radius, and I somewhat wanted more variety of sorts. In the end, I decided to learn more ways of generating things, especially in a more complex direction and shape. And that led me to the Procedural Mesh Generation… :slight_smile:

I can’t recommend enough the following 2 YouTube videos:

1. Poly Paths

Knowing the individual cone’s Radius and Center Point where the BP_SpawnMarkers are placed, I decided to first create the CIrcle Path 3D that would give me a poly path of 64 points which would later be converted into a closed Circular Spline. This took me a long time to find, as I didn’t even know what questions I should ask in Google, as thought has been there but not language to explain it. :smiley:

2. Maps for Calculations.

After spending some longer though on the whole process of storing the data, I went for String / Int Maps, mainly because the String Part could ask as a combined tag, while all the values for the calculations can be grabbed based off that.

3. Set-up

Because we will be going through all the Cone Overlaps individually, the first thing we need to ensure is to clear all the Maps each time we switch to checking the next Cone. This works well as we need that information only once, during the Island Creation.

As a safety feature we ignore any Islands that consist of only 1 Cone (Main Menu), so that we can focus our Gameplay Logic on just that area. Once we know the valid Island is ready, we perform the caulcations.

4. Spawn Points Calculations

Reaching the above set up was a painful and slow learning experience but I finally nailed it as my head refused to make it work, initially. Anyways, thanks to keeping the pairs unique we do the first Filter of combinations we care about. Later we will use it to focus our calculations only on the unique pairs. That will be the backbone of the whole system.

5. Circle Calculations.

Here comes the math (https://stackoverflow.com/questions/3349125/circle-circle-intersection-points). This part was actually enjoyable, to re-learn the math from old school days.

In the end we get:

  • DIstance between the 2CIrcle Centers
  • Differences of the 2 Circle Radiuses
  • Sums of the 2 Circle Radiuses
  • First and Second Circle Radiuses (simpler than navigating through arrays, at least for me)

With the above weapons we can start fighting with the logic, and there is a lot to cover, so sit tight for the next episode of new guy’s struggles.. :smiley:

1 Like

[INFO DUMP: BP_IslandGen Part 2]

The time flies, so this one will be short, so I don’t lose it all. Last time I have written about prepping all the fancy calculations, so now we can start using them, somewhat.

1. Looking for the number of the Intersection Points.

Initial step for me at the time I have prepared all the formulas was to filter out all the possible combinations in order to narrow the later logic manipulation into the individual buckets, mainly:

  1. Two Point Intersections ( I have that )
  2. One point External Intersection ( not yet covered but you should easily figure out how)
  3. One point Internal Intersection ( kind of covered by Point 4 but not really :smiley: )
  4. Zero Point Intersection ( I have that too )
  5. Infinite Point Intersection ( not really something I care about at the moment, but might be something for later )


As you can see from the above, once you have the formulas for all the intersection types, it’s quite straightforward to do the thing and separate them. One thing that I will definitely need to adjust down the line is to use different buckets as for now Map of Overlaps stores all types, which will not be a good idea in the future, as that might be a problem later.

2. Full Circle Overlap.

Figuring the above was easy. Not much else to say. The real trouble came with the below. :smiley:

3. Partial Circle Overlap.


For some reason, negative values in Unreal calculations are bad, so once I figured out that problem, converting the formula (Diego Assencio) into nodes was not so painful anymore. And not sure I have mentioned it already, but, slowly I get to like math more and more. Still am stupid in understanding it, and yet, it is quite fun activity. Though tiring. :smiley:

4. Island Debug

Now, after all the trouble you can use it to determine which cones on your island have the least amount of valid overlaps of your choosing. :slight_smile:

That’s it for the time being, write to you next time!

[INFO DUMP: BP_IslanddGen Part 3]

So that the topic doesn’t get closed as I barely had a chance to sit to my laptop and the holiday season is here. :smiley:

There’s procedural progress. :slight_smile: