Add octant visualization to GridMap#118583
Conversation
Calinou
left a comment
There was a problem hiding this comment.
Tested locally, it works as expected. Code looks good to me.
Some feedback:
- Lines use an opaque material, which means they cast shadows and their opacity can't be reduced:
- This works at runtime, even in projects exported in release mode.
- I suggest putting the code inside the new methods behind
#ifdef DEBUG_ENABLEDto ensure the binary size of release export templates isn't impacted as much by this PR. The methods would still exist and be exposed to scripting, but would be no-op in release export templates.
- I suggest putting the code inside the new methods behind
c370141 to
4721ffe
Compare
4721ffe to
157b16f
Compare
|
@Calinou Changes made. |
BastiaanOlij
left a comment
There was a problem hiding this comment.
LGTM, cool feature,
I can see how you can use this to optimise the scene, for instance in @Nodragem sample scene you can see that we have two additional octants with only one or two pieces in it:
Just moving everything over 1 cell would help here.
Seeing it visualised I do wonder if octant is the right term here, we're basically just dividing the gridmap up in sectors. That also lead to wondering if it makes sense for these to be cubes, I can see a scenario with multiple floors where you would want each sector to not be so high. Anyway, that's a discussion totally separate from this PR.
|
I totally agree with being able to use boxes rather than cubes ! 😊 |
Salvaging of #105333, with some modifications. Such as:
debug_show_octantsanddebug_octant_color.