The relationship between cell size and tile size

683 views
Skip to first unread message

Jack

unread,
Jul 2, 2015, 12:20:05 AM7/2/15
to recastna...@googlegroups.com
Dear Mikko,
My target is to have a tile size of 30.0 units in x, y directions.
When I specify a tile size of 30.0f and a cell size of 10.0f
I get a total width of 300.0f
tileSize * cellSize

What is the relationship between a cell and a tile?
Why do I need to multiply them to get the actual tile size?
What numbers should I put into that two setting parameters in order to get a tile size of 30*30?
Thanks
Jack

Mikko Mononen

unread,
Jul 2, 2015, 2:56:30 AM7/2/15
to recastna...@googlegroups.com
Tilesize is specified in voxels as we need to have integer number of cells per tile. Cellsize is size of a voxel and specified in world units.


--mikko

--

---
You received this message because you are subscribed to the Google Groups "recastnavigation" group.
To unsubscribe from this group and stop receiving emails from it, send an email to recastnavigati...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Jack

unread,
Jul 3, 2015, 4:41:02 AM7/3/15
to recastna...@googlegroups.com
Hello Mikko,

I use the maximum radius size of all agents as the tilesize which turns out to be 80.0 units.
The world is about 1800x600 units wide.
The navmesh turns out to have only 1 tile? why was that?
When I use a optimal tilesize of 3.0f and cellsize is 10.0f
The CPF subsystem is working on something quite on the right track.
I use this radius because I should allow the largest agent to stand on an unreserved tile.
When the tilesize is 80.0f units and the cell size is 40.0 units (arbitrary chosen)
the tile number is one.
So what values should I choose?
Thanks
Jack


m_tileSize = g_fMaxTileSize;
m_buildAll = true;
m_d3d9device = pDevice;
//m_buildOpts.m_cellSize             = 10.0f; 
m_buildOpts.m_cellSize               = m_tileSize / 2.0f;

Jack

unread,
Jul 3, 2015, 4:43:43 AM7/3/15
to recastna...@googlegroups.com
Sorry the dimension of the scene
should be
1800x1600 units wide

Mikko Mononen

unread,
Jul 3, 2015, 5:22:22 AM7/3/15
to recastna...@googlegroups.com
Sorry, based on your description, I have no idea what you are trying to accomplish, and the values do not make any sense.

You should select your cell size as per these instructions:

Once you have your build settings figured out, you can start thinking about the tile size. If your target tile size is, say 50 units, then you will get the size in voxels by 50 / cellSize, and choose the closest integer. Tile size during bake with Recast is in voxels (integer value!), Detour assumes tile size in world units.


--mikko


Reply all
Reply to author
Forward
0 new messages