Login
Register
WARNING :
This site is outdated and the PopcornFX team will no longer answer your questions here.
For all support questions please go to our
Discord server
Questions
Unanswered
Tags
Users
Ask a Question
Documentation (Wiki)
PopcornFX's Website
Most popular tags
unity
popcornfx
ue4
editor
mesh
unity3d
script
shape-sampler
plugin
unreal
attribute
rendering
particle
collision
pk-unityplugin
animation
spawn
import
crash
bug
unreal-4
ribbon
meshsampling
rotation
camera
error
position
effects
baking
android
fbx
sampler
unreal-engine-4
events
image
spawner
hh-unityplugin
ios
curve
velocity
particles
compile-error
-
vr
bake
billboarding
shader
emitter
attributes
atlas
evolver
axis
fx
time
sampler-shape
distortion
audiospectrum
blueprint
projection
builder
physics
material
audio
api
issues
event
id
localspace
billboard
build
trail
offlinecache
spatial-layers
projector
unreal-collision
dll
animtrack
ui
lighting
attractor
preferences
console
delay
flux
scale
scaling
parent-field
shape
infinite
color
sprites
texture
planaralignedquad
model
backdrop
local
folder
runtime
2
popcorn
Categories
All categories
How to cull particles that get too close to the camera?
0
like
0
dislike
297
views
The only way I have managed to do this is using a shape sampler and .kill()
I only need to kill particles that get within a constant distance of the camera so this seems like a poor solution.
ue4
culling
unreal
asked
Oct 5, 2020
by
metalayer
(
410
points)
Please
log in
or
register
to add a comment.
Please
log in
or
register
to answer this question.
1
Answer
2
like
0
dislike
Best answer
Hi ! Which version of popcorn are you using ?
Using V2 :
You can access the position of the camera inside PopcornFX graph. We also have a template that takes a particle position as input and returns its distance to the camera. Here is how I used it to kill particles within a range of 1 unit (view.distance computations must be set to "evolve"):
https://i.ibb.co/LnkdmxV/Untitled.png
You might also want to disable particle render without killing it. You can use the "Enabled" pin for that purpose:
https://i.ibb.co/Q8s9CBz/Untitled2.png
Let me know if you're using V1.
answered
Oct 6, 2020
by
paulhub
(
980
points)
Hi, sorry we are on version 1.13
Using V1, you should be able to use the view.distance() function in an evolver script. Here's how I did it :
function void Eval()
{
int isInRange = view.distance(Position) < 1.0f;
kill(isInRange);
}
Please
log in
or
register
to add a comment.
...