Filling up an object with spawned ones!

Hello world!
Let’s assume I want to generate a volumetric cloud with billboard or halo planes with texture on the fly. So I have this sphere or shape that determines the spce the cloud must occupy, and have 2 planes for different densities.
So the center of the cloud must be filled with N planes of denser texture, and the space close to the faces of the cloud space have n of the less denser objects.
Obviously, a bit of randomness can be added.

I can maybe do the add objects part, but I’ll be stuck when it comes to the number of objects to add, for I’d use a logic brick setup to determine the interval at which the script will run!
The volume part is even worse, I don’t know where to start…
If someonehas an idea, please give me a hand!

Can only think of solutions involving python. If You start with a ‘swarm’ of empties in stead of a shaped mesh You might get away with logic bricks.

It has to be python, I was refering to logic bricks in the case I was doing it myself. It would be a hybrid btween logic bricks and python.
And the script is meant to run only once.

Thank you SolarLune, I’ll give it a shot!
1.A Cube? Not so good!
2… Vertices? So if I need thousands of of planes, I’ll need thousands of vertices (I want to avoid too many polies before the rendering), a file size issue!
I’ll explore the system, I might learn a lot form it!
Once again thank you!

You’re welcome.

  1. The cube method might not work that well, but as long as you don’t fill the cube completely with particles, the resulting cloud wouldn’t look cubic in nature, so it should be alright.
  2. That also shouldn’t be a problem since vertices are just points in space. I just tested this out - The default cube scene was 300 KB, and another scene in which the cube was subdivided to over 24000 vertices results in 1,885 KB. That’s not too much. Also, you probably wouldn’t use thousands of planes, but just the shape that you want the cloud to appear in. Make it a few layers thick, and people probably won’t be able to see through, preventing wasted rendering time on unnecessarily drawn particles.

Of course, I won’t know until I actually try this method, but it should work alright.

EDIT: You won’t even need to animate the particles - once you’ve spawned them, you can parent them to the emitter and just shove the emitter around, thereby moving the entire cloud.

Yes, the idea is to keep the planes static. So 1. might work if I place various cubes next to each other.
This might just work, I’ll explore it more and run some tests!
Great system BTW, I’m using it for sure, Both banners shall be used! Edit: Forgot to mention that I need a seed included, so I can get the same results whenever needed. For example, 2 players in he same place, must see the same cloud!

Thanks. Hm, I see. If you’re talking about implementing this online, I would just send the second player the first player’s cloud, rather than using a seed, though that can be implemented. I’ll see about implementing this sometime this week.

It’s not just about the online part. I’ll use it for other things, more controlled generation is required for other things. You see, the ability to spawn particles on the vertex position can help add things like vegetation, or just specific items on an object. I’d like to have exactly the same result for specif emitters. In any case, that might not be a problem, is just a possibility I’m invoking, so if it’s too much trouble, just leave it!

No, it’s definitely a feature that I could add. I’ll probably be able to work on this sometime this week.

OK then, I appreciate it! Thank you!