You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The first thing we need for particles is a set of geometries. Each element of this set will represent a particle. You can use any geometry in the set; a built-in geometry primitive provided by Away3D or an external geometry loaded from a file.
This seems to indicate that each Geometry corresponds to a single particle, but ParticleGeometryHelper instead creates a new particle per subgeometry. This isn't intuitive as a user, and it also makes ParticleGeometryHelper that much more complicated.
The text was updated successfully, but these errors were encountered:
So the reason to preserve a particle's subgeometries is to allow you to set multiple materials later on. Interesting.
Edit:
When drawing objects, the gpu needs to be told to use a different program every time for every material. Unfortunately, this switch is typically very expensive and something you’d want to prevent as much as possible. To this end, Away3D sorts all the objects that need to be rendered (the so called “renderables”) primarily according to their materials so all objects with the same material will be rendered consecutively. If you’re using different material instances for things that look exactly the same, it means more programs need to be switched needlessly.
Maybe ParticleGeometryHelper should sort the subgeometries it creates, so Away3D doesn't have to.
Away3D was never particularly well-documented, so perhaps this shouldn't be a surprise. Documentation on particles seems to be limited to one article that doesn't even mention subgeometries.
This seems to indicate that each
Geometry
corresponds to a single particle, butParticleGeometryHelper
instead creates a new particle per subgeometry. This isn't intuitive as a user, and it also makesParticleGeometryHelper
that much more complicated.The text was updated successfully, but these errors were encountered: