Skip to content

Conversation

@Ji-Rath
Copy link
Contributor

@Ji-Rath Ji-Rath commented Jul 15, 2022

Simple example showcasing LOD capabilities with both Visualization and Processor logic.
Edit: This PR should only have changes in the Plugins/LODExample but I made a few oopsies and initially made the mistake of making changes in main. (the reason for a lot of commits listed below, those changes have since been moved to another branch)

  • Transitions between actor visualization and ISM visualization using various meshes (Essentially simulating HISM)
  • Performs different processor logic based on LOD
  • Performs logic at different tick rates based on LOD
  • Stops processor logic when culled by frustum
MassSample-LODExample.mp4

Some additional notes

  • This addresses entities disappearing/defaulting to OffLOD with >100 entities, my guess is due to the fact that the LODCollectorProcessor is not on by default
  • OffLOD appears to fluctuate between Off and High for some strange reason, I can only guess that it is a bug or possibly a fault in my logic.

stefan-zimecki and others added 30 commits June 3, 2022 00:45
Added a sample & demo on how to handle per instance ISM data.
Additional clarification of a processor
Per instance Material data from a Processor to Instanced Static Meshes sample
Add basic square formation with x amount of units
Add shared fragment to modify formation sizes
Add some additional comments
Refactor RTSAgentTraits so that traits/fragments are separate from processors
Streamline logic so readability is more of a focus over performance
Update RTSFormationExample map
Add simple actor visualization for entity destruction
Experimental changes for resolving Visualization
Add simple check for entitysubsystem
Allows player to create entities to add to the unit
Optimize adding and removing entities from unit (unit index of swapped unit still needs to be resolved)
RTSFormationUpdate still takes ~22.2ms with 5000 units. My guess right now is division/remainder calculations taking up processing time.
Add RTSFormationDestroyer for handling entity destructtion (still needs testing)
Fix destroyed entity not being properly filled in
@Ji-Rath
Copy link
Contributor Author

Ji-Rath commented Jul 15, 2022

I think im being a big doofus and need to relearn git lol
My guess is that im paying the price for committing my formations PR in my main branch, then switching it over.

@Megafunk
Copy link
Owner

If you have to put them both in one PR, that's fine... May as well!

@Ji-Rath
Copy link
Contributor Author

Ji-Rath commented Jul 15, 2022

Ah gotcha, in hindsight i should have done separate branches for my work from the start. I just didn't expect to create multiple PRs so soon. I'll definitely get it right for next time lol

@Ji-Rath Ji-Rath mentioned this pull request Jul 16, 2022
@Ji-Rath
Copy link
Contributor Author

Ji-Rath commented Jul 16, 2022

Just wanted to post a quick discovery on the bug I mentioned earlier:
OffLOD appears to fluctuate between Off and High for some strange reason, I can only guess that it is a bug or possibly a fault in my logic.

This appears to be caused by a conflict between LOD Distance calculations and LOD Max Count calculations (In SimulationLOD trait) as can be visualized below. (50% speed)

MassSample-LODTest.mp4

I can't exactly say whether or not this is intended logic. In my opinion, if an entity receives OffLOD from LOD Max Count, it should not be overridden by LOD Distance
This also highlights another 'bug' where frustum culling is not considered unless LOD Max Count calculations determine it to be OffLOD.

It should be noted that VariableTicking appears to be unaffected and is solely based on LOD Max Count.

TL;DR LOD Max Count determines LOD. Anything currently in OffLOD gets passed to LOD Distance and frustum culling

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

Successfully merging this pull request may close these issues.

4 participants