Page 1 of 2 12 LastLast
Results 1 to 10 of 20

Thread: Particle engine and billboarding

  1. #1

    Particle engine and billboarding

    I'm currently working on a small particle engine. I have to billboard the particles, so I gotta get them perpendicular to the camera. How do I best do that?

    When the particle rendering procedure is called, the camera is already translated and rotated. I know the coordinated and the rotation matrix of the camera. How can I get the particles perpendicular?

  2. #2

    Particle engine and billboarding

    If you use OpenGL then you can use GL_Point_Sprite_ARB extension which does all work for you. Take a look at this sample.

  3. #3

    Particle engine and billboarding

    I don't think that's a good idea. Without that I have FPS at 60, with that extension I have FPS of 3.

  4. #4

    Particle engine and billboarding

    Alright, I got it running with that. One problem: How can I do the blending stuff? I mean, my particles should be rendered additive or subtractive, but the background should never shine through.

  5. #5

    Particle engine and billboarding

    How about glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA)?

  6. #6

    Particle engine and billboarding

    Hmm I get the feeling that my site is not as visible as it should be..

    I've written a tutorial on how to get billboard sprites in OpenGL.
    Get it here: http://www.nitrogen.za.org/viewtutorial.asp?id=12
    My site: DelphiTuts.com (coming soon)...

    Download Font Studio 4.21 here.

  7. #7

    Particle engine and billboarding

    Billboarding works fine now, thank you. I think I would have never figured that out without your help.

    But, blending still doesn't work as it's supposed to. I have about 10 quads overlapping each other and I want them to be blended additively, but I don't want the background to shine through. I got the same problem with subtractive blending.

  8. #8

    Particle engine and billboarding

    Seems to be the order in which you draw things... if you don't want to shine things through, draw in reversed order, saying from camera to the back.
    <a href="http://www.greatgamesexperiment.com/game/Valgard/?utm_source=gge&amp;utm_medium=badge_game"><img border="0" alt="GGE" title="GGE" src="http://static.greatgamesexperiment.com/badge/game/valgard/gge400x56.png"></a>

  9. #9

    Particle engine and billboarding

    I'm drawing the background first, then the particles. Doing it the other way round, all particles are black.

  10. #10

    Particle engine and billboarding

    I can imagine 2 reasons why the particles are black:
    - you multiply the colors (multiply with black is black)
    - you disable zbuffer when rendering the particles... then the background will be drawn "over" the particles.

    hmmm... I don't really know what kind of effect you want to achieve... any chance you post a screenshot and explain it a bit clearer?
    <a href="http://www.greatgamesexperiment.com/game/Valgard/?utm_source=gge&amp;utm_medium=badge_game"><img border="0" alt="GGE" title="GGE" src="http://static.greatgamesexperiment.com/badge/game/valgard/gge400x56.png"></a>

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •