@OskSta, I always feel inspired by #Townscaper and many of your previous works. Currently, I am working in @PlayWonderbox building procedural structures as well. Would be great to share some of our techniques as a thank you.
It started with the classic marching cubes approach. By optimizing rotations and mirrors we were able to reach a dictionary with ~53 pieces. But since we were planning to develop many blocks, further optimizations were required. Image
By creating some additional rules to combine concave and convex pieces in runtime, we were able to reduce the dictionary to 43 pieces, without any drawback. And there is still room for improvement. Image
If we unify the two types of vertical concave pieces (single and double), we can combine pieces even further and get to our final generic dictionary of 34 pieces. Image
Of course not every block is made out of these simple rules. We had to build other systems on top of the marching cubes to support more complex blocks
For instance, houses are composed by ~115 pieces. Image
The most challenging part was how to specify these custom rules in a way that other team members feel capable of creating new blocks. This kind of modelling has already a steep learning curve, custom solving algorithms seem impossible to teach rapidly and effectively.
We created an interface to represent custom rules for every additional piece. As a 2D representation of all 26 neighbors. Artists can specify simple or complex rules to distribute support models. Configurations go way beyond that. But this is the basic idea. Image
We improved the system over the development process making it as generic as possible. At the moment, new blocks, even with new behaviors, don't require code to implement. The main limitation we embraced is that you can only specify rules on the direct neighbor of a block.
This sounds like a huge downside. But it's good for performance reasons and to keep the overall complexity in sane levels. On the other hand, blocks can be tagged and custom behaviors can be added if your neighbor is water, or a decoration, for example.
In many cases, we ditched completely the marching cubes dictionaries and created blocks from simpler rules and fewer pieces
This fence, for example, has only 13 pieces and 13 custom rules. Some blocks don't have many different pieces, but have lots of custom rules depending on the behavior complexity Image

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with Amilton Diesel

Amilton Diesel Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Too expensive? Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal Become our Patreon

Thank you for your support!

Follow Us on Twitter!

:(