You can choose emission shape in particle material. Choosing anything other than point will make particles randomly spawn within this shape. Now You can convert particle material to shader material, find the piece of code connected to emission_shape uniform ( it is near the top ) and rewrite mathematical formula, so particles will only be spawned on the edges of shape. Be aware, that shader code for emission shape will not exist in shader if You don’t choose emission shape before converting particle material into shader material.
I have set emission shape to sphere, and made a new Shader Material for the particle, but I don’t see the code which I need to edit. When I make the shader material, the ‘Shader’ property (which seems to be the script file) is empty. Do I need to make a Shader script file?
Primero | 2022-04-08 03:04
No no, You are supposed to create new particle material like normally, next choose emission shape to sphere, and then go back to material options and choose “convert to shader material”. This option appears after creating particle material. It will give You access to shader code behind particle material.
I changed emission shape back to point,
and then under ‘Materials’ tab, I created a ‘NewCanvasItemMaterial’.
Then changed emission shape to sphere, and converted the material to ‘ShaderMaterial’.
Did I do it correctly?
I see there is a script attached this time, but when I open it there are only two lines of code, which are
I don’t see ‘emission shape uniform’. Did I go wrong somewhere?
Primero | 2022-04-11 01:25
there are 3 types of materials : canvas, spatial and particle. All of them are shader materials with code hidden from the user. Yet every material can be converted into shader material with script. Here we just want to convert particle material into shader material
When You use Particles node, You have to choose particle material. Only this material has all these options like emission shape and starting velocity, gravity. So only change emission shape to sphere, and convert it whole into shader material. No canvas material inbetween. You will see a large shader script attached
So you mean I should make a ‘New ParticleMaterial’ in the Material tab of the particle node? I don’t have that option… I only get ‘New CanvasItemMaterial’ and ‘New ShaderMaterial’. Am I looking in the wrong place?
Screenshot: Imgur: The magic of the Internet
Primero | 2022-04-13 05:53
Particles2D and Particles3D node don’t have material property, they have
Process Material. There You have only 2 options to choose from - particle material and shader material. And at this point I realised You are working with CPUParticles haha
But what is the point ? can’t You use normal particles ?
I see it has process materials as well though
I’ll try it right now
Primero | 2022-04-15 03:21
I made sure that I created a NewParticlesMaterial, set emission shape to sphere and converted it into ShaderMaterial. But I can’t find code related to emission_shape… Imgur: The magic of the Internet
Primero | 2022-04-15 03:30
images don’t load
Did You menage to get access to huge shader script ? Ctrl + F to find which part of code is connected to uniform emission_shape_radius, You will easily find mathematical formula with sinuses and cosinuses near the upper part of the code