particle-system

libgdx particleEffect rotation

a 夏天 提交于 2019-12-22 05:26:39
问题 I draw fire on my android device with libgdx: ParticleEffect effect; ParticleEffectPool fireEffectPool; Array<PooledEffect> effects = new Array<PooledEffect>(); @Override public void create() { ... effect = new ParticleEffect(); effect.load(Gdx.files.internal("particles/fire01.p"), Gdx.files.internal("image")); effect.setFlip(true, false); fireEffectPool = new ParticleEffectPool(effect, 1000, 3000); PooledEffect myEffect = fireEffectPool.obtain(); myEffect.setPosition(200, 400); effects.add

Most performant image format for SCNParticles?

我怕爱的太早我们不能终老 提交于 2019-12-22 04:12:16
问题 I've been using 24bit .png with Alpha, from Photoshop, and just tried a .psd which worked fine with OpenGL ES, but Metal didn't see the Alpha channel. What's the absolutely most performant texture format for particles within SceneKit? Here's a sheet to test on, if needs be. It looks white... right click and save as in the blank space. It's an alpha heavy set of rings. You can probably barely make them out if you squint at the screen: exaggerated example use case: https://www.dropbox.com/s

Z-buffer issue with BufferGeometry in ParticleSystem

浪子不回头ぞ 提交于 2019-12-19 12:05:34
问题 In my application I'm having troubles with the z-buffer. I have a ParticleSystem in which the dots have a texture to look like spheres. But there are two problems which I can't solve at the same time.... Either the spheres were sorted right in z-buffer but aren't transparent or they are transparent but not right sorted! Please have a look at my JSfiddle. (based on this example from mrdoob) In the original example all looks well. But as you can see in my fiddle, the texture is not transparent,

why Particle system with shader doesn't work? three.js

…衆ロ難τιáo~ 提交于 2019-12-19 10:32:18
问题 Hi can anyone help me whith this? I have this shader, it works with THREE.Mesh but doesn't with THREE.Particlesystem? I want each particle to have a portion of a given map(texture) and change their positions accordingly, something like this http://www.chromeexperiments.com/detail/webcam-displacement/?f=webgl <script id="vs" type="x-shader/x-vertex"> uniform sampler2D map; varying vec2 vUv; void main() { vUv = uv; vec4 color = texture2D( map, vUv ); float value = ( color.r + color.g + color.b

How do I draw 1000+ particles (w/ unique rotation, scale, and alpha) in iPhone OpenGL ES particle system without slowing down the game?

主宰稳场 提交于 2019-12-18 12:44:39
问题 I am developing a game for iPhone using OpenGL ES 1.1. In this game, I have blood particles which emit from characters when they are shot, so there can be 1000+ blood particles on the screen at any one time. The problem is that when I have over 500 particles to render, the game's frame rate drops immensely. Currently, each particle renders itself using glDrawArrays(..) , and I know this is the cause for the slow down. All particles share the same texture atlas. So what is the best option to

Three.JS - Particles orbiting a point in random directions forming a sphere

半腔热情 提交于 2019-12-14 03:42:36
问题 I have a particle system where all the particles are positioned at the same coordinates and one after another, in random directions, they (should) start orbiting the center of the scene forming a sphere. What I managed to achieve until now is a group of Vector3 objects (the particles) that one after another start orbiting the center along the Z axis simply calculating their sine and cosine based on the current angle. I'm not that good at math and I don't even know what to look for precisely.

Properly play Particule System component?

本小妞迷上赌 提交于 2019-12-13 13:23:44
问题 How can I properly play the particle system component, which is attached to a GameObject? I also attached the following script to my GameObject but the Particle System does not play. How do I fix this? public Transform gameobject1; public Transform gameobject2; public ParticleSystem particules; void Start() { float distance = Vector3.Distance(gameobject1.position, gameobject2.position); } void Update() { if(distance == 20) { particules.Play(); } } 回答1: I don't see you declaring distance in

how to do particles texture mapping with three.js shaderMaterial?

我与影子孤独终老i 提交于 2019-12-13 06:14:09
问题 what I'm trying to achieve is having a particle system where each particle have a portion of a given texture. Below is a example of a particles's buffergeometry using a shader material. so far I can make it look almost as it should, nonetheless, I dont know how to properly program the fragment shader in order to have the correct offset of the texture on each particle. the texture is 500x500px which is the same amount of particles. http://www.pruebasmemo.co.nf/ fragment shader code: uniform

How to control particles directly while preventing the particle system from doing the same?

試著忘記壹切 提交于 2019-12-13 04:44:32
问题 I have lots of same simple objects that are affecting gameplay, thousands of them! Well, not thousands, but really many. So if I make them GameObjects, the FPS decreases, especially when spawning them. Even with pooling. I should try a different approach. You know that particle system in Unity3D can render many particles very fast. It also automatically controls particles, emits and removes them. But in my case, positions and lifetimes of objects are managed by game logic, and particle system

CUDA C/C++: Calculate the average of inverse of distance per point (interaction energy, perhaps?)

半世苍凉 提交于 2019-12-12 13:08:08
问题 I've been trying to write a kernel in that calculates the sum of the inverse of the distance between N given points over N. A serial coda in C would be like average = 0; for(int i = 0; i < Np; i++){ for(int j = i + 1; j < Np; j++){ average += 1.0e0f/sqrtf((rx[i]-rx[j])*(rx[i]-rx[j]) + (ry[i]-ry[j])*(ry[i]-ry[j])); } } average = average/(float)N; Where rx and ry are the x and y coordinates, respectively. I generate the points via a kernel that uses random number generator. For the kernel, I