[vtkusers] Creating billboard particle effects (e.g., smoke, fire)

Milef, Nicholas Boris milefn at rpi.edu
Thu Sep 28 16:53:36 EDT 2017


I was able to get something looking decent with the vtkPointGaussianMapper, but how do I change the blend mode? Right now it looks to be additive.
________________________________
From: Milef, Nicholas Boris
Sent: Tuesday, September 26, 2017 4:53 PM
To: Ken Martin
Cc: vtkusers at vtk.org
Subject: RE: [vtkusers] Creating billboard particle effects (e.g., smoke, fire)

Thanks Ken! I'll give vtkPointGaussianMapper a try. It seems to be closest to what I want to do.
________________________________
From: Ken Martin [ken.martin at kitware.com]
Sent: Tuesday, September 26, 2017 12:37 PM
To: Milef, Nicholas Boris
Cc: vtkusers at vtk.org
Subject: Re: [vtkusers] Creating billboard particle effects (e.g., smoke, fire)

It depends on the specifics of the implementation but as a start

1) vtkPointGaussianMapper  will draw billboard triangles and execute a possibly user defined sharer on them. This can be used to draw translucent splats/discs/squares/etc. based on the shader  provided.

2) if you are thinking more as point sprites (fixed pixel size as opposed to world coord size) you can use the regular polydata mapper with a point size and then shade it/texture it

3) If you have 3D elements (as opposed to billboards) then you could use vtkGlyph3DMapper which under the hood uses opengl instancing to replicate geometry.

4) if you mostly want spheres or cylinders then there are dedicated mappers for those which is what the molecule mapper uses under the hood. Those mappers have the code to properly compute z values based on sphere/cylinder equations so they are not exactly billboards but more impostors.





On Tue, Sep 26, 2017 at 12:12 PM, Milef, Nicholas Boris <milefn at rpi.edu<mailto:milefn at rpi.edu>> wrote:
What would be the best way to create billboard particle effects such as smoke or fire? Should I use the vtkMoleculeMapper?

Example:
http://www.opengl-tutorial.org/intermediate-tutorials/billboards-particles/particles-instancing/

_______________________________________________
Powered by www.kitware.com<http://www.kitware.com>

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtkusers




--
Ken Martin PhD
Distinguished Engineer
Kitware Inc.
28 Corporate Drive
Clifton Park NY 12065

This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee.  Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the original message.  Thank you.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20170928/3ab3ca45/attachment.html>


More information about the vtkusers mailing list