My fun with RawParticles Author Message
RedcrowProd
Bronze Supporter

12-22-2016 07:04 AM
Zervox
Silver Supporter

 Post: #2 RE: My fun with RawParticles I'd love to test it, but I think it would be easier to upload an EsenthelProject file to dropbox so that you just have to execute the project to open it in the Editor.(christmas laziness)
12-22-2016 07:26 AM
RedcrowProd
Bronze Supporter

 Post: #3 RE: My fun with RawParticles ahah yeah got cha added a project file for this http://www.filedropper.com/rawparticles (This post was last modified: 12-22-2016 07:53 AM by RedcrowProd.)
12-22-2016 07:45 AM
Zervox
Silver Supporter

 Post: #4 RE: My fun with RawParticles Code: void SetRandom(RawParticles.Particle &p) // used at creation / respawn. can be improve to create particles where rain drop down.    {       Vec cpos=Cam.matrix.pos;       p.pos.set(RandomF(cpos.x-100, cpos.x+100)       , RandomF(cpos.y+50 , cpos.y+100)       , RandomF(cpos.z-100, cpos.z+100));       int randomLight=Random(150, 200); int randombrightness=Random(150, 255);       p.color=Color(randomLight, randomLight, randomLight, randombrightness);       p.radius=RandomF(0.3, 1);    }    void SetLinear(RawParticles.Particle &p) // linear update of the particle    {       p.pos.y-=Time.rd()*50;       p.pos.x-=0;       p.pos.z-=0;    } REP(MyRawParticleArrayNumber)    {       RawParticles.Particle &pp=particleArray[i];       SetLinear(pp);       if(pp.pos.y<=Game.World.hmHeight(pp.pos.xz()) || pp.pos.y<=0)       {          SetRandom(pp);       }              pp.vel = Vec(0, 0, 0); // do not care about vel    } I just wrote it like this, mostly since I hate having duplicate arrays wasting memory instead of having a proxy being a basically a copy of the actually used structure.
12-22-2016 08:14 AM
Zervox
Silver Supporter

 Post: #5 RE: My fun with RawParticles Was really fun upping it to 100k. overall nice job, this might let others learn very easily how to use the RawParticles.
12-22-2016 09:15 AM
RedcrowProd
Bronze Supporter

 Post: #6 RE: My fun with RawParticles Hah yes this could use some polishing. (This post was last modified: 12-23-2016 02:49 AM by RedcrowProd.)
12-22-2016 09:38 PM
Esenthel

 Post: #7 RE: My fun with RawParticles It looks cool. But for rain effect, you'd have to set particle 'angle' member too, so for example when looking up and down, the rain drops rotate correctly. Remember that particles rotate only in 2D space, so for true 3D rotation, you'd have to forget particles, and use VI with faces (quads).
12-23-2016 12:15 AM
RedcrowProd
Bronze Supporter

 Post: #8 RE: My fun with RawParticles it is true, this was more of an exemple, and i was immitating rain as for this, but i believe this system could work fine for snow or other effect like that. as for the problem of the rotation of the particles, you could bypass this problem , just modifying the image used after a certain camera angle, and even more, setting up different layer based on how closed it is from the camera. i havent tried vi much atm, is the perf would be comparable to using raw particles, using vi with quads faces ? (This post was last modified: 12-23-2016 03:01 AM by RedcrowProd.)
12-23-2016 02:46 AM
Zervox
Silver Supporter

 Post: #9 RE: My fun with RawParticles if you are first going to use VI then I'd take the step towards Geometry-Compute shader to offload everything onto the gpu and not stroke your GPU bandwidth along with it. of course that would require source access. (This post was last modified: 12-23-2016 03:05 AM by Zervox.)
12-23-2016 03:04 AM
 « Next Oldest | Next Newest »