Author Topic:  Particle Emitter [New Options]  (Read 901 times)

0 Members and 1 Guest are viewing this topic.

TM Charles

  • Supreme Member
  • *****
  • Posts: 2051
  • Awards Was in the top 10 of the forum stats page as of 4/12/15 Donated a giveaway prize. (Must be a prize of cash value.) 2 years on site+300 posts 1 year on site+100 posts
    • View Profile
    • ::)
    • Awards
  • Xbox: ETTP & Mr Zincy
Re: Particle Emitter [New Options]
« Reply #15 on: October 16, 2015, 09:45:44 AM »
Good news the Particle Emitter to script is now a inGame feature thanks for the support and help getting this added.



TM Charles

  • Supreme Member
  • *****
  • Posts: 2051
  • Awards Was in the top 10 of the forum stats page as of 4/12/15 Donated a giveaway prize. (Must be a prize of cash value.) 2 years on site+300 posts 1 year on site+100 posts
    • View Profile
    • ::)
    • Awards
  • Xbox: ETTP & Mr Zincy
Re: Particle Emitter [New Options]
« Reply #16 on: October 17, 2015, 12:20:14 AM »
-Added Set Max Particle Expansion



Craig

  • Developer
  • Extreme Member
  • ******
  • Posts: 6496
  • Dig Deep
  • Awards Developer 3 years on site+600 posts 2 years on site+300 posts Was in the top 10 of the forum stats page as of 4/12/15 Members who have unlocked the robotic avatar 1 year on site+100 posts Day 1 w/25+ posts (4/12/13)
    • View Profile
    • Twitter
    • Awards
Re: Particle Emitter [New Options]
« Reply #17 on: October 17, 2015, 02:17:54 AM »
-Added Set Max Particle Expansion
It's already in the game - End Size.

TM Charles

  • Supreme Member
  • *****
  • Posts: 2051
  • Awards Was in the top 10 of the forum stats page as of 4/12/15 Donated a giveaway prize. (Must be a prize of cash value.) 2 years on site+300 posts 1 year on site+100 posts
    • View Profile
    • ::)
    • Awards
  • Xbox: ETTP & Mr Zincy
Re: Particle Emitter [New Options]
« Reply #18 on: October 17, 2015, 02:30:35 AM »
It's already in the game - End Size.
No i mean say the Emit Position Variance was 10,10,10 and how had the velocity variance at 10,10,10 if you set the max expansion size to 10,10,10 the particles will not be able to got out that area.



Father Dryymas

  • Supreme Member
  • *****
  • Posts: 4119
  • What's yours is mine. ~TM's Resident Master Thief~
  • Awards Members who have unlocked the robotic avatar Awarded to exemplary forum members 2 years on site+300 posts Site art contributions/TPs in-game/Contest winners 1 year on site+100 posts
    • View Profile
    • Awards
  • Xbox: dryym
Re: Particle Emitter [New Options]
« Reply #19 on: October 17, 2015, 07:49:58 AM »
A size and emit time variance would be useful.

Creator of the term "Deathmine "
Jared [19|Oct 07:12 PM]: "It changes everything" Dryym

Ark

  • Sr. Member
  • ****
  • Posts: 477
  • YouTuber
  • Awards 1 year on site+100 posts
    • View Profile
    • YouTube
    • Awards
Re: Particle Emitter [New Options]
« Reply #20 on: October 17, 2015, 06:38:32 PM »
Multiple particles on one emitter would help alot.

Craig

  • Developer
  • Extreme Member
  • ******
  • Posts: 6496
  • Dig Deep
  • Awards Developer 3 years on site+600 posts 2 years on site+300 posts Was in the top 10 of the forum stats page as of 4/12/15 Members who have unlocked the robotic avatar 1 year on site+100 posts Day 1 w/25+ posts (4/12/13)
    • View Profile
    • Twitter
    • Awards
Re: Particle Emitter [New Options]
« Reply #21 on: October 22, 2015, 05:23:02 AM »
Texture Wrapping:
Can't do this. Currently each particle vertex uses 64 bytes of ram. To form a cube particle, we need 8 vertices. For efficiency we need a copy of the particle vertices on both system ram and video ram. So each particle requires 8 x 64 x 2 = 1024 bytes of RAM. The game currently allows for 4000 active particles = 4MB of ram.

To do texture mapping, we need 24 vertices per particle to correctly map the textures to each face, and another 4 bytes per vertex to hold the UV (texture) coords. So we would now require 24 * 68 * 2 * 4000 = 13MB of RAM. We can't afford that.

The particle shader would now have to process 3 x more vertices, and do a texture lookup for every pixel. So it's not just an extra RAM cost, but also a shader processing cost.

On top of that, we can't mix and match texture and non texture particles in the same particle system / shader, so I'd have to split it into 2 particle systems.

In short, not going to happen, the cost is too high.


Shapes Selector & Particles modeler:
We can't mix and match particle shapes, we'd need a different particle system per shape type. Plus shapes such as spheres and toruses require a lot more vertices than a cube, dramatically increasing the RAM usage and particle shader processing time.

Not going to happen.


Orbit, Vertical Rotation, Set Max Particle Expansion:
All of these are possible, but come at a cost.

Verticle rotation is the cheapest, it only requires another 2 bytes per vertex - 8 * 2 * 2 * 4000 = 128kb of RAM and the additional processing required in the shader is not too bad.

Set Max Particle Expansion:
This would require an extra 12 bytes of RAM per vertex = 8 * 12 * 2 * 4000 - 768kb of RAM. Quite a cost for something I think can be controlled well enough with the current options. There is also a cost for the shader as it has to calculate and react if a particle has reached the expansion limit.

Orbit:
Probably the most useful of all of the options here, but also the most costly. To handle Orbit we need an origin (12 bytes) and a 3D rotation vector (12 bytes) - So the RAM cost is 8 * 24 * 2 * 4000 = 1.5MB. Signficant. Also the shader cost is significant - it requires several matrix operations. The only way I could add this is to reduce the number of active particles.

Pitch & Yaw:
This is possible with little cost, because it does not require any new vertex data - the pitch and yaw can be calculated and set on the vertices when the particle is spawned - because it's a fixed value.


« Last Edit: October 22, 2015, 05:26:26 AM by Craig »

.ok

  • Supreme Member
  • *****
  • Posts: 2191
  • Awards Members who have unlocked the robotic avatar Donated a giveaway prize. (Must be a prize of cash value.) 3 years on site+600 posts 2 years on site+300 posts Week 1 members w/25+ posts (4/13/13-4/20/13) 1 year on site+100 posts
    • View Profile
    • Awards
Re: Particle Emitter [New Options]
« Reply #22 on: March 04, 2016, 05:13:18 PM »
Texture Wrapping:
Can't do this. Currently each particle vertex uses 64 bytes of ram. To form a cube particle, we need 8 vertices. For efficiency we need a copy of the particle vertices on both system ram and video ram. So each particle requires 8 x 64 x 2 = 1024 bytes of RAM. The game currently allows for 4000 active particles = 4MB of ram.

To do texture mapping, we need 24 vertices per particle to correctly map the textures to each face, and another 4 bytes per vertex to hold the UV (texture) coords. So we would now require 24 * 68 * 2 * 4000 = 13MB of RAM. We can't afford that.

The particle shader would now have to process 3 x more vertices, and do a texture lookup for every pixel. So it's not just an extra RAM cost, but also a shader processing cost.

On top of that, we can't mix and match texture and non texture particles in the same particle system / shader, so I'd have to split it into 2 particle systems.

In short, not going to happen, the cost is too high.


Shapes Selector & Particles modeler:
We can't mix and match particle shapes, we'd need a different particle system per shape type. Plus shapes such as spheres and toruses require a lot more vertices than a cube, dramatically increasing the RAM usage and particle shader processing time.

Not going to happen.


Orbit, Vertical Rotation, Set Max Particle Expansion:
All of these are possible, but come at a cost.

Verticle rotation is the cheapest, it only requires another 2 bytes per vertex - 8 * 2 * 2 * 4000 = 128kb of RAM and the additional processing required in the shader is not too bad.

Set Max Particle Expansion:
This would require an extra 12 bytes of RAM per vertex = 8 * 12 * 2 * 4000 - 768kb of RAM. Quite a cost for something I think can be controlled well enough with the current options. There is also a cost for the shader as it has to calculate and react if a particle has reached the expansion limit.

Orbit:
Probably the most useful of all of the options here, but also the most costly. To handle Orbit we need an origin (12 bytes) and a 3D rotation vector (12 bytes) - So the RAM cost is 8 * 24 * 2 * 4000 = 1.5MB. Signficant. Also the shader cost is significant - it requires several matrix operations. The only way I could add this is to reduce the number of active particles.

Pitch & Yaw:
This is possible with little cost, because it does not require any new vertex data - the pitch and yaw can be calculated and set on the vertices when the particle is spawned - because it's a fixed value.
idk if it was listed on my topic http://totalminerforums.net/index.php?topic=16502.msg172697;topicseen#msg172697

but my question is(if it hasnt been) would it be doable to be able to turn particles clockwise?




PWRBTTN

  • Legendary Member
  • *****
  • Posts: 1143
  • Professional Expert, Comrade
  • Awards Awarded to exemplary forum members 2 years on site+300 posts Site art contributions/TPs in-game/Contest winners 1 year on site+100 posts
    • View Profile
    • Awards
  • Xbox: PWRBTTN
  • Steam: PWRBTTN
Re: Particle Emitter [New Options]
« Reply #23 on: March 04, 2016, 07:33:02 PM »
Do you mean rotation on a vertical axis? Clockwise and counter-clockwise rotations are already possible. Only on a horizontal axis, though.
/snail       /snail    /snail         /snail /snail      /snail   /snail                /snail         

.ok

  • Supreme Member
  • *****
  • Posts: 2191
  • Awards Members who have unlocked the robotic avatar Donated a giveaway prize. (Must be a prize of cash value.) 3 years on site+600 posts 2 years on site+300 posts Week 1 members w/25+ posts (4/13/13-4/20/13) 1 year on site+100 posts
    • View Profile
    • Awards
Re: Particle Emitter [New Options]
« Reply #24 on: March 04, 2016, 07:36:50 PM »
Do you mean rotation on a vertical axis? Clockwise and counter-clockwise rotations are already possible. Only on a horizontal axis, though.
what i mean by that,or an example,is this


i wanted to add the bullet like the actual sign,but you cant w/o 10x more work,to where the origional one is this



does it make sense now? :P
« Last Edit: March 04, 2016, 07:38:49 PM by Ugh ThatZ NaZty »




PWRBTTN

  • Legendary Member
  • *****
  • Posts: 1143
  • Professional Expert, Comrade
  • Awards Awarded to exemplary forum members 2 years on site+300 posts Site art contributions/TPs in-game/Contest winners 1 year on site+100 posts
    • View Profile
    • Awards
  • Xbox: PWRBTTN
  • Steam: PWRBTTN
Re: Particle Emitter [New Options]
« Reply #25 on: March 04, 2016, 07:53:34 PM »
Do you mean rotation on a vertical axis? Clockwise and counter-clockwise rotations are already possible. Only on a horizontal axis, though.
what i mean by that,or an example,is this


i wanted to add the bullet like the actual sign,but you cant w/o 10x more work,to where the origional one is this



does it make sense now? :P
refer to Craig's quote on pitch and yaw at the bottom of his post explaining the likelihood and such of each function.
/snail       /snail    /snail         /snail /snail      /snail   /snail                /snail         

.ok

  • Supreme Member
  • *****
  • Posts: 2191
  • Awards Members who have unlocked the robotic avatar Donated a giveaway prize. (Must be a prize of cash value.) 3 years on site+600 posts 2 years on site+300 posts Week 1 members w/25+ posts (4/13/13-4/20/13) 1 year on site+100 posts
    • View Profile
    • Awards
Re: Particle Emitter [New Options]
« Reply #26 on: March 04, 2016, 07:55:26 PM »
pitch and yaw
oh alright so thats what that is

from /gk 's post on my thread i thought it was something diff




.ok

  • Supreme Member
  • *****
  • Posts: 2191
  • Awards Members who have unlocked the robotic avatar Donated a giveaway prize. (Must be a prize of cash value.) 3 years on site+600 posts 2 years on site+300 posts Week 1 members w/25+ posts (4/13/13-4/20/13) 1 year on site+100 posts
    • View Profile
    • Awards
Re: Particle Emitter [New Options]
« Reply #27 on: January 07, 2017, 02:47:10 AM »
bump