The scatter addon is like in blender only on Babylon.js!

I wanted to find this on Babylon.js so that there was a scattering of objects in a random radius like the scatter addon in blender, but I didn’t find anything, so I had to make my own version, and that’s what I did.

When the ball is moved, OBJ objects are created.

The scatter addon is like in blender only on Babylon.js! (Version 0 - Precise ball scattering of objects) | Babylon.js Playground

Random explosive generation of randomly rotated OBJ objects in space.

The scatter addon is like in blender only on Babylon.js! (Version 1 - Random explosive generation in space) | Babylon.js Playground

Random twisted explosive generation of randomly rotated OBJ objects in space.

The scatter addon is like in blender only on Babylon.js! (Version 2 - Random the twisted explosive generation in space) | Babylon.js Playground

When the ball is moved, OBJ objects are created but XYZ version.

The scatter addon is like in blender only on Babylon.js! (Version 3 - Precise ball scattering of objects XYZ version) | Babylon.js Playground

By clicking on a single object placement.

The scatter addon is like in blender only on Babylon.js! (Version 4 - Mouse-click placement of a single object) | Babylon.js Playground

Only with the disappearance of objects after a certain time.

The scatter addon is like in blender only on Babylon.js! (Version 5 - With objects disappearing after a set time) | Babylon.js Playground

One-time movement of gizmo OBJ structures when creating structures on the plane with a mouse click.

The scatter addon is like in blender only on Babylon.js! (Version 6 - Disposable relocation of gizmo OBJ structures) | Babylon.js Playground

Create an object with a click and manage them all with one single gizmo in one.

The scatter addon is like in blender only on Babylon.js! ((Version 7 - Creating an OBJ and gizmo in one click) | Babylon.js Playground

Each OBJ structure is given its own gizmo when clicked.

The scatter addon is like in blender only on Babylon.js!(Version 8-Each OBJ structure is given its own gizmo when click) | Babylon.js Playground

All gizmos repeat all the actions of the first gizmo.

The scatter addon is like in blender only on Babylon.js! (Version 9 - All gizmos repeat all the actions of all gizmos) | Babylon.js Playground

All gizmos change all gizmos, and not just the first gizmo changes all the others, and the rest cannot be changed in any way.

The scatter addon (Version 10 - All gizmos change all gizmos, not just the first gizmo that changes all the others) | Babylon.js Playground

Hey !

I have tons of bugs on your playgrounds, since :

  • You should only provide the createScene() function (you shouldn’t create engine, set render loop, etc)
  • There is an infinite loop on the sphere being moved while picked, ending up with sphere in camera

Also, you can work with NGE where the node Instantiate on Face could be usefull as well… Did you try it ? :slight_smile:

I can’t imagine any other way to do this without a sphere.

I found an interesting example for myself with the placement of an atlas on which it could be done as a radius, but I don’t have such a goal.

Image Projection | Babylon.js Playground

You can keep a sphere, but I was speaking about not having it pickable.
For example have a look at the PG I had given in this topic : :slight_smile:

(Click and paint object with the sphere)

1 Like

What does that have to do with it? I don’t need generation based on XZ coordinates on the object, I need it for the XYZ version.

Although your version is also suitable, but only with the disappearance of objects after a certain time.

The scatter addon is like in blender only on Babylon.js! (Version 5 - With objects disappearing after a set time) | Babylon.js Playground

Now I have created a new version.

I added another new version:

The scatter addon is like in blender only on Babylon.js! (Version 7 - Creating an OBJ and gizmo in one click) | Babylon.js Playground

I added a new version. All gizmos repeat all the actions of the first gizmo.

The scatter addon is like in blender only on Babylon.js! (Version 9 - All gizmos repeat all the actions of all gizmos) | Babylon.js Playground

I added a new version. All gizmos change all gizmos, and not just the first gizmo changes all the others, and the rest cannot be changed in any way.

The scatter addon (Version 10 - All gizmos change all gizmos, not just the first gizmo that changes all the others) | Babylon.js Playground

In general, I liked your version of scatter, and I decided to continue it.

I added a new version. It randomly moves the scatter ball with linear scattering of objects.

The scatter addon (Version 11 - random movement of the scatter ball with a linear spread) | Babylon.js Playground

I added a new version. Great, but I need to randomly scatter a ball with a radius with a timer.

The scatter addon (Version 12 - Randomly scattering a ball with a radius with a timer) | Babylon.js Playground