Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feature request] - light effect : drones color based on mesh formation vertex colors #20

Open
NelloF opened this issue Mar 22, 2024 · 3 comments

Comments

@NelloF
Copy link

NelloF commented Mar 22, 2024

would be useful to have a light effect mode that inherit the color of the drones from the vertex colors attribute of the formation (if a mesh is used in the formation).
So for example if you have a formation mesh with shape of a bird you could have the bird colors on the drones without need of keyframe them

image

@NelloF NelloF changed the title [feature request] - light effect : drones color based on mesh formation vertec colors [feature request] - light effect : drones color based on mesh formation vertex colors Mar 22, 2024
@ntamas
Copy link
Member

ntamas commented Mar 24, 2024

This could work (I did not know that Blender meshes can have vertex colors). But we need to clarify a few things:

  1. What shall we do if a vertex has different colors in different faces of the mesh? I believe this was a possibility with the old vertex_colors attribute in Blender, not sure how the new attribute system works. Does a vertex always have a single color only in the new system?
  2. It looks like we have "Color" and "Byte Color" data types -- I guess we would need to handle both, right?
  3. What if there are multiple color attributes for a mesh, how do we decide which one to use?
  4. What if there are no color attributes for the mesh but the user selects this coloring mode? Shall we use white unconditionally? Or black?
  5. What shall the color of a drone should be in frames when it is transitioning from one formation to another and it does not belong to any of the formations?

From the implementation side, I think this should be a separate "Effect Type". Right now we have "Color Ramp", "Image" and "Function". In the output of this mode, neither the color ramp nor the image would take any part, and it would not involve a custom function either, so I think a new effect type named "Vertex Color" would be appropriate.

@NelloF
Copy link
Author

NelloF commented Mar 25, 2024

this is my opinion
about 1: i think the color could be the average value for all the color data from that vertex

about 2: not sure but maybe the old "Face Corner + Byte Color" is more compatible if you import a colored mesh from an external software. In any case i think one data type is sufficient to handle this kind of effect even without too many options

about 3: maybe only the first mesh color attribute could be used only (at least for a first version of this feature)

about 4 and 5: i think black should be used to avoid any undesired light both if color info is missing or during transitions. If someone needs another color can add another light effect in the stack for that moment

@n1ente
Copy link

n1ente commented Mar 25, 2024

We have been asking for this possibility for well over a year! And it opens up many new possibilities, two important aspects I would like to be sure can be integrated:

  1. If I have a mesh with X vertices, this approach must be able to retrieve X individual colors

  2. Vertex colors on the mesh can be animated, so color retrieval must be evaluated on each new frame

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants