I'm creating a huge city for which I've made 240 different building prefabs. Now I need to scatter those prefabs randomly with a height, width and depth and rotation randomness variation.

I thought the prefab scatter tool provided by the polybrush package was perfect for the job, but as soon as I added more than 50 prefabs to the prefab palette, it started to glitch and act weird. The variation settings also seem to be uniquely saved for each prefab, but I'd like to have 1 set of settings for all prefabs.

These points make me believe polybrush wan't made for scattering a large amount of prefabs (unless I'm missing something?)

Are there any other tools that can assist me with this?

Thanks in advance.

  • 2
    \$\begingroup\$ Have you considered writing your own scattering script exactly to your specifications? We can help you with that if you got stuck on it anywhere. \$\endgroup\$ – DMGregory Jul 15 '20 at 13:36
  • 1
    \$\begingroup\$ Is it possible that the glitches you experienced might be because 240 different 3d models are more than your GPU can handle? Especially if they are high-detail and you are placing a lot of them (as implied by "huge city"). Games which model large and highly detailed cities often use very sophisticated systems to dynamically load and unload parts of the city and the assets they need at runtime. \$\endgroup\$ – Philipp Jul 15 '20 at 13:42
  • \$\begingroup\$ @Philipp The 240 building prefabs are actually quite simple, I have 60 different buildings with 4 color variations each, resulting in 240 prefabs. A prefab consists of 1 - 10 very basic models, and every model has the same material applied to it. I'm afraid the issue here is that polybrush wasn't made for this amount of prefabs, but I hope I'm wrong here. \$\endgroup\$ – Thrindil Jul 15 '20 at 14:03
  • \$\begingroup\$ @DMGregory I could write a script which instantiates prefabs in an area with some randomness parameters without too much trouble, but then I'd miss the iterative benefits and immediate visual feedback which come from a workflow involving brush scattering. I'm not sure how to write a script which lets me "paint" prefabs with the mouse in the editor though.. \$\endgroup\$ – Thrindil Jul 15 '20 at 14:12
  • 1
    \$\begingroup\$ StackExchange will never provide a full and up-to-date reference of all tools available for a problem, so that's not something we can help you with here. If you just want links to what's out there, web search is a better bet, as it will be up-to-date, more inclusive than any one user's knowledge, and won't fossilize old info like a StackExchange answer. \$\endgroup\$ – DMGregory Jul 15 '20 at 14:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.