Feedback: PCG Linear Grammar - Allow "Scalable" modules to scale down when spline length is smaller than module size

When spawning meshes using the PCG Linear Grammar tool, it would be incredibly useful if modules could automatically scale down to fit a spline or subdivision that is smaller than the base module size.

Currently, if the spline length is shorter than the module size, the system spawns nothing and throws a warning. While this warning can be suppressed by enabling Accept Incomplete Subdivision, doing so still doesn’t scale the module down to fit the available space, even when the module’s Scalable property is set to True. I would expect “Accept Incomplete Subdivision” combined with “Scalable” to shrink the module to fit the remaining length.

[Attachment Removed]

Steps to Reproduce

  1. Create an actor with PCG Linear Grammar tool
  2. Define a module with a Size of 100 and set Scalable to True.
  3. Adjust the length of your spline so it is shorter than 100 cm.
  4. Result: Nothing spawns, and the following warning appears in the Output Log: LogPCG: Warning: One segment has an incomplete subdivision (grammar doesn't fit the whole segment).
  5. Enable Accept Incomplete Subdivision.
  6. Result: The warning disappears, but the module still does not scale down to fit the short spline.

[Attachment Removed]

Hi Sophy,

Sorry for the late answer!

So the reason we do not allow scaling down is because our way of doing the module placement and grammar solving does not allow for it.

Basically, the algorithm currently is fairly simple:

  • Compute the length we have
  • Select a pattern that fits
  • Expand that pattern if it has symbols for it
  • And continue doing so until we run out of place

The problem here is at steps 2 and 3 - finding what fits (what does this mean if you can scale down?) and how you decide to expand (do you scale up modules? do you support adding scaled down modules?)

Allowing scaling down would require a bit more settings, like a minimum scale, a threshold at which we prioritize scale up vs scale down, and certainly a lot more details.

I don’t think it’s impossible, just more complex both on the implementation and on the user side.

Maybe we’ll get to it at some point though!

Let me know if you have more questions,

Cheers,

Julien

[Attachment Removed]