A method for encoding points of a mesh model using a hierarchical tree, wherein the method comprises steps of - encoding a value being the total number of points; - defining a bounding box around the points of the mesh model; - recursively dividing the bounding box, wherein each dividing step divides a current parent cell into a pre-defined number of child cells, and for each dividing step performing the steps of - determining a current parent cell and a total number of points included in the current parent cell; - determining if the current parent cell includes at least a minimum number of points, the minimum number being at least four; - if the current parent cell includes not at least said minimum number of points, encoding a code word that comprises a number of points within a pre-defined one of the child cells, and otherwise - determining a point distribution, wherein it is determined whether all points of the current parent cell are within a single child cell according to the current dividing step; and - encoding a code word, wherein the code word begins with an indication, and wherein if not all points of the current parent cell are in a single child cell according to said determined point distribution, the indication has a first value and remaining bits of the code word denote a number of points, the number being the number of points in a pre-defined one of the child cells decremented by one, and otherwise, if all points of the current parent cell are in a single child cell according to said determined point distribution, the indication has a different second value and remaining bits of the code word denote an index identifying said single child cell that includes all the points of the parent cell. - encoding a value being the total number of points; - defining a bounding box around the points of the mesh model; - recursively dividing the bounding box, wherein each dividing step divides a current parent cell into a pre-defined number of child cells, and for each dividing step performing the steps of - determining a current parent cell and a total number of points included in the current parent cell; - determining if the current parent cell includes at least a minimum number of points, the minimum number being at least four; - if the current parent cell includes not at least said minimum number of points, encoding a code word that comprises a number of points within a pre-defined one of the child cells, and otherwise - determining a point distribution, wherein it is determined whether all points of the current parent cell are within a single child cell according to the current dividing step; and - encoding a code word, wherein the code word begins with an indication, and wherein if not all points of the current parent cell are in a single child cell according to said determined point distribution, the indication has a first value and remaining bits of the code word denote a number of points, the number being the number of points in a pre-defined one of the child cells decremented by one, and otherwise, if all points of the current parent cell are in a single child cell according to said determined point distribution, the indication has a different second value and remaining bits of the code word denote an index identifying said single child cell that includes all the points of the parent cell.