Megafunk / MassSample

My understanding of Unreal Engine 5's experimental ECS plugin with a small sample project.
MIT License
681 stars 112 forks source link

Per instance Material data from a Processor to Instanced Static Meshes sample #36

Closed PreyK closed 1 year ago

PreyK commented 1 year ago

Added a sample & demo on how to handle instanced static mesh entities with per-instance custom data. https://github.com/Megafunk/MassSample/issues/35 Every entity gets a random float it can use in its material. image

Megafunk commented 1 year ago

Cool!! I'll merge it now, but I will move it around shortly when I make the whole Mass Sample into a plugin. I might do something a bit like your original usecase of a farm of sorts as an example in the future. What kind of crop do you think we should grow?

PreyK commented 1 year ago

Yeah, I agree, a practical example would be so much better just wanted to make something quick in the meantime in case anyone looking for a sample on this. On the crop side, I couldn't really find animated growing crop models with a CC license but it would be super cool!

We could figure out the anim to texture plugin in unreal, bake the animation to a texture and play it back via Mass ISM-s as they grow. For example https://sketchfab.com/3d-models/watermelon-f0b612f9b91e4ef29aa6665e86ea3898 I usually use this model for testing my plant systems/stuff, sadly it's a paid one. But I could make something simple like wheat, corn, or sunflower via material animation, I'm currently mostly researching mass anyway :D

dabuliuww commented 4 months ago

image Hello, I used your gesture in 5.2 and found that when I add custom data, I get an error. Could you please take a look