Hi All.

I’m so humble that rather using Unity or Unreal, I still spend my spare time on poking my rendering whatever as I still have a Starcraft like RPG idea. Which will never be released if I progress as good as I do right now

BUT, I’m at least learning and posting here.

The problem is a common one. I have AABB boxes around my models. If I rotate or scale the models, the AABB boxes rotate and scale as well, which is not good. I removed then the rotation and scaling part from the transformation matrix, hence the AABB boxes only move without scale and rotation, but obviously it’s not perfect as the bounding box will not be accurate if the model is high and thin at the same time.

I found a great solution that I should store the original AABB and when a model is rotated or scaled, I should recalculate the AABB itself from the original AABB using the translation matrix. This is good, but the problem is that I not just use AABBs for calculations like ray tracing, but also for visualizing it with a renderer and I have problem there.

The rendering logic is based on batches and instanced rendering. Of course, I can change to simple draw calls per model when I render AABBs, but then I have to render AABBs per model, which will be slow if I have too much models.

I agree, that if I want a game ASAP out, I must skip this or choose an alternative path. The thing is that currently I’m more interested at solving this math-like problem instead of releasing anything.

So any idea?