OpenGl: 2D particle simulation to 3D? -
right have working particle simulation program can render several hundred thousand particles smoothly. way have used cuda compute positions of particles in parallel. then, since i'm not familiar cuda-opengl interop, cpu used put particles on screen using opengl.
my problem convert program 3d can give shadows. right now, i'm putting particles screen gl_points, using following command:
gldrawarrays(gl_points, 0, numparticles);
i have tried converting points spheres using glusolidsphere. however, result slow - @ 10k, program crying uncle. able render smoothly @ least 100k.
any advice useful. thanks.
best fake 3d particles they're far / small enough not visible in detail.
depending on size , distance of particles viewer, plot them either point, textured quad sprite (or point sprite), or full rendered sphere close enough see details.
and shadow can same , draw them shadow texture either point or sprites depending on size.
Comments
Post a Comment