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]
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]