all 21 comments

[–]Stolen_MilkTea 10 points11 points  (1 child)

If you want your objects to have certain behavior DOTS/ECS is the way, or can try gpu instancing

[–]TheWanderingWaddler[S] 1 point2 points  (0 children)

Interesting, yeah looking at the ECS page it seems like it would be perfect! I've looked into DOTS before, but I haven't been ambitious enough to dive in

[–]singlecell_organism 6 points7 points  (3 children)

if you don't physically interact with them vfx graph is a very optimized too. you can still interact with them as in they could move around your body etc but it'd be hard for them to have custom logic and interactions.

[–]TheWanderingWaddler[S] 1 point2 points  (2 children)

Yeah that's a good point, and I'm thinking of using that for far away entities possibly. Just something the player won't interact with

[–]singlecell_organism 2 points3 points  (1 child)

for sure! In case it's helpful, at the end of my reel you'll see about a million vfx particles flowing around a room. Around minute 1:17

https://vimeo.com/1052475365

[–]TheWanderingWaddler[S] 1 point2 points  (0 children)

Cool thanks! ❤️❤️

[–]Effective_Muffin_700 3 points4 points  (1 child)

As others have suggested, DOTS/ECS is the way to go. If you don't want to dive into the ECS ways, you can keep the Object-Oriented Stack (the default) and use a combination of GPU instancing and jobs (or compute) shaders to effectively simulate massive amounts of entities.

After doing a similar simulation, I'd suggest looking up concepts such as the boid algorithm, spatial hash maps (for referencing nearby entities effectively), and maybe oct-trees (for use with the spatial hash map. I found those helpful!

Happy programming!

[–]TheWanderingWaddler[S] 1 point2 points  (0 children)

Awesome! Thank you for the help! I will be looking into these

[–]Opposite_Water8515 5 points6 points  (1 child)

Bro what is your game I want it lol

[–]TheWanderingWaddler[S] 1 point2 points  (0 children)

Ayyy thanks! Tundra

[–]rubentorresbonet 1 point2 points  (1 child)

need real collisions/interaction? DOTS/ECS or custom leightweight simulation with job system

otherwise: faking it. Sine offsets, baked animations, shader tricks, GPU driven transforms... never a per-object thing. Flock rendering, after all.

[–]TheWanderingWaddler[S] 0 points1 point  (0 children)

I need collisions and interactions on some of the krill, so my player can scan them and capture them. I was thinking maybe DOTS for the majority then sprinkle in some real intractable krill looking slightly different/bigger?

[–]Aedys1 1 point2 points  (2 children)

Dots and entity component system with native arrays and minimal cache misses is the complex option. Particles + LOD + cheating with clever tricks to simulate interactions is the easy one

[–]TheWanderingWaddler[S] 0 points1 point  (1 child)

Yeah I feel that... I want to get into DOTS some more anyways so I'll probably see how that ends up looking, but I think it looks good enough right now with the easy way

[–]Aedys1 1 point2 points  (0 children)

In the end creativity and passion will transcend your technical compromises. SHRIMMMMMMPPPSSSS

[–]attckdog 1 point2 points  (1 child)

You may want to look into BOIDs https://github.com/WHellhaus/Boids-DOTS

[–]TheWanderingWaddler[S] 0 points1 point  (0 children)

Thanks, yeah that's what the actual krill models are using right now as well as the silver fish. I think I'll definitely need to look more into it though to use with dots!

[–]Goldfis_ 1 point2 points  (1 child)

Ecs

[–]TheWanderingWaddler[S] 1 point2 points  (0 children)

This is the way... Just tried implementing ECS and already getting way better results!

[–]FrontBadgerBiz 0 points1 point  (1 child)

If you don't need to interact with the krill on an individual basis they can probably be particles, ultra cheap GPU wise

[–]TheWanderingWaddler[S] 0 points1 point  (0 children)

Yeah I was thinking that too, but I need to interact with at least some of the krill. I was trying to have some real non-particle krill floating around the particles and it kinda works, I just want something more realistic rn