How to judge a chunk in Frustum?

hello ,
The game like minecraft, every frame should check many chunks.

I want to create and check chunks only in my view, in frustum.
how I get the matrix or infomatin about frustum to judge , when I use Urho3D.
thanks.

1 Like

Don’t really understand your question.

Would it be enough to iterate through chunks and test wheter they are in the Frustum? Maybe add some grouping for speed, like Octree does.

I am so sorry for my bad english.
There is a abstract picture I draw:
temp

describe : red line box is chunk,
And the chunks in blue area ,should be create and check .

the game dynamic generation chunks around camera.
those chunks on back of camera should not be create.
how I judge that.

sorry for my bad english again.

1 Like

Then… Frustum gives you an ability to check arbitrary box volume.
So you should just iterate through chunks and create the chunks inside/intersecting the Frustum.

oh, it may be I’m too persistent in performance .
thanks a lot.

Well, performance issues could be solved later by grouping chunks hierarchically, smth like 3D-quadtree.

1 Like

This is a good idea.

Also check Drawable::IsInView() to see if it meets what you need.

2 Likes