Author Topic:  question about loading in stuff  (Read 285 times)

0 Members and 1 Guest are viewing this topic.

Palladeonix

  • Jr. Member
  • **
  • Posts: 25
    • View Profile
    • Awards
  • Xbox: ReaperZz176
question about loading in stuff
« on: December 18, 2016, 12:52:34 PM »
Is there anyway to load particles in only when they're close enough, and they're in your view.
Personally, I use the proximity detector to activate the particles when you get in a certain distance. Is there any way for them to only activate if they're also in my FOV?

crazytater94

  • Supreme Member
  • *****
  • Posts: 2561
  • Mastering TM since 2011
  • Awards Awarded to exemplary forum members Members who have unlocked the robotic avatar 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 Former MotM winners Week 1 members w/25+ posts (4/13/13-4/20/13) 1 year on site+100 posts
    • View Profile
    • Awards
  • Xbox: crazytater94
  • PSN: crazytater94 (Inactive)
  • Steam: crazytater94
Re: question about loading in stuff
« Reply #1 on: December 18, 2016, 01:05:00 PM »
Particle blocks have a proximity option. Set them to like 100

AlienizdPixel

  • Tester
  • Supreme Member
  • *****
  • Posts: 2588
  • Hallo
  • Awards 3 years on site+600 posts Members who have unlocked the robotic avatar Awarded to exemplary forum members 2 years on site+300 posts Was in the top 10 of the forum stats page as of 4/12/15 1 year on site+100 posts
    • View Profile
    • Awards
  • Xbox: A1ienizdPixe1
  • Steam: Alienizd
Re: question about loading in stuff
« Reply #2 on: December 18, 2016, 01:15:11 PM »
Particle blocks have a proximity option. Set them to like 100
The question was if there is a way to activate both when close enough and within a players vision.
-Alionz

Platinum Dryym

  • Supreme Member
  • *****
  • Posts: 4185
  • 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 3 years on site+600 posts Site art contributions/TPs in-game/Contest winners 1 year on site+100 posts
    • View Profile
    • Awards
  • Xbox: dryym
Re: question about loading in stuff
« Reply #3 on: December 18, 2016, 01:57:57 PM »
Yes, This is possible. But it would take some advanced scripting to make it work, And it wouldn't be efficient or accurate for everyone due to differences in their FOV.


This is honestly not worth it for the amount of script latency you would receive by having a looping script constantly checking the view directions of every player in proximity.


If you are curious, You could probably get away with this by first creating a vector from the player's eyes to the proximity detector block, Then you would extend the player's view vector to the same length as the other vector you created. Then you would create another vector from the end point of the first vector to the second and measure the distance between them.


Then you just need to check if that distance is less than a certain value. The problem with this is that because you are checking a set distance, And not just whether or not it's in your FOV, This will make the particle still spawn if you get close enough to it.


I may try to work out a solution for this, But it's honestly not worth it for the small efficiency bonus you would get by removing particles that aren't on screen.

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

Craig

  • Developer
  • Extreme Member
  • ******
  • Posts: 6497
  • Dig Deep
  • Awards Developer 4 years on site+1000 posts 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: question about loading in stuff
« Reply #4 on: December 18, 2016, 03:35:50 PM »
Like Tater said, for distance you don't need to use a Proximty block, there is a Proximity field directly on the Particle Emitter block.

For Field of View, I considered adding this in 2.5 but decided against it because it caused popping to the point it wasn't useful.

i.e. The particles only start emitting once the emit position is in view, so what happens is you can see them start to emit (they pop in), then you look away, they stop, then you look back, they start again. This causes popping. And in the case of say a smoke stack, it leaves holes in the stack. The immersion was constantly being broken.

Platinum Dryym

  • Supreme Member
  • *****
  • Posts: 4185
  • 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 3 years on site+600 posts Site art contributions/TPs in-game/Contest winners 1 year on site+100 posts
    • View Profile
    • Awards
  • Xbox: dryym
Re: question about loading in stuff
« Reply #5 on: December 18, 2016, 04:17:05 PM »
Particle blocks have a proximity option. Set them to like 100

To add on to this, 100 will not always be ideal depending on what you are doing.

For the ideal particle proximity you have to figure out what the max distance that you can actually see the particles and make them out is.

If you have the particles in a sealed room, The emitter proximity should be set high enough that it can be activated from anywhere in the room where you can see the particles, And then set ever so slightly higher so you don't see the particles pop into existence when you enter the room.



Like Tater said, for distance you don't need to use a Proximty block, there is a Proximity field directly on the Particle Emitter block.

For Field of View, I considered adding this in 2.5 but decided against it because it caused popping to the point it wasn't useful.

i.e. The particles only start emitting once the emit position is in view, so what happens is you can see them start to emit (they pop in), then you look away, they stop, then you look back, they start again. This causes popping. And in the case of say a smoke stack, it leaves holes in the stack. The immersion was constantly being broken.

To be fair though, Particle emitters will occasionally skip particles when the particle limit isn't even close to being reached. This isn't so much a bother with things like smoke stacks, But it's super annoying with anything that has a long emit frequency.


It does ruin immersion when you know something should be there, But it either isn't, Or just looks broken.

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

crazytater94

  • Supreme Member
  • *****
  • Posts: 2561
  • Mastering TM since 2011
  • Awards Awarded to exemplary forum members Members who have unlocked the robotic avatar 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 Former MotM winners Week 1 members w/25+ posts (4/13/13-4/20/13) 1 year on site+100 posts
    • View Profile
    • Awards
  • Xbox: crazytater94
  • PSN: crazytater94 (Inactive)
  • Steam: crazytater94
Re: question about loading in stuff
« Reply #6 on: December 19, 2016, 12:51:29 AM »
Particle blocks have a proximity option. Set them to like 100

To add on to this, 100 will not always be ideal depending on what you are doing.

For the ideal particle proximity you have to figure out what the max distance that you can actually see the particles and make them out is.

If you have the particles in a sealed room, The emitter proximity should be set high enough that it can be activated from anywhere in the room where you can see the particles, And then set ever so slightly higher so you don't see the particles pop into existence when you enter the room.



Like Tater said, for distance you don't need to use a Proximty block, there is a Proximity field directly on the Particle Emitter block.

For Field of View, I considered adding this in 2.5 but decided against it because it caused popping to the point it wasn't useful.

i.e. The particles only start emitting once the emit position is in view, so what happens is you can see them start to emit (they pop in), then you look away, they stop, then you look back, they start again. This causes popping. And in the case of say a smoke stack, it leaves holes in the stack. The immersion was constantly being broken.

To be fair though, Particle emitters will occasionally skip particles when the particle limit isn't even close to being reached. This isn't so much a bother with things like smoke stacks, But it's super annoying with anything that has a long emit frequency.


It does ruin immersion when you know something should be there, But it either isn't, Or just looks broken.

Well, yeah, that's what I was thinking when typing, but I'm lazy and had to rush to work

Palladeonix

  • Jr. Member
  • **
  • Posts: 25
    • View Profile
    • Awards
  • Xbox: ReaperZz176
Re: question about loading in stuff
« Reply #7 on: December 19, 2016, 05:48:18 AM »
I know there's a proximity parameter on the particle block, but I thought the particle block only allowed 1 particle to emit at a time, which is useless in my case.

.ok

  • Supreme Member
  • *****
  • Posts: 2211
  • Awards Site art contributions/TPs in-game/Contest winners 4 years on site+1000 posts 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: question about loading in stuff
« Reply #8 on: December 19, 2016, 05:54:11 AM »
I know there's a proximity parameter on the particle block, but I thought the particle block only allowed 1 particle to emit at a time, which is useless in my case.
just make a script for each particle/effect that you wanna use and tie them all to a main script,then use a prox detector to the script block if you wanna have multiple particles to happen




Palladeonix

  • Jr. Member
  • **
  • Posts: 25
    • View Profile
    • Awards
  • Xbox: ReaperZz176
Re: question about loading in stuff
« Reply #9 on: December 19, 2016, 06:14:36 PM »
yeah that's what i do, thanks man :D