Repository navigation
Closed
Labels
QuestionGlobal flag to mark questions from users
Description
Hello!
I'm new to working with assimp, so my question may seems very simple. Assimp I use to import models in the Unity engine, which has a limit on the maximum number of verticies per mesh, it is 65000. How can I use assimp for split the file into stand-alone objects, the number of vertices of which will not exceed the set (65 000)?
Obj file should look like this
input obj source:
# File produced by Open Asset Import Library (http://www.assimp.sf.net)
# (assimp v3.1.28522525)
mtllib modelResult.obj.mtl
#126978 vertex positions
v -1.51537 5.03191 -0.149251
v ......
#126928 vertex normals
vn -0.3027 0.9527 -0.0275
vn ......
# Mesh 'Sphere_None' with 126976 faces
g Sphere_None
usemtl None
f 1//1 2//1 3//1 4//1
f ......
out obj source:
# File produced by Open Asset Import Library (http://www.assimp.sf.net)
# (assimp v3.1.28522525)
mtllib modelResult.obj.mtl
o Sphere_none_mesh01
#65000 vertex positions
v -1.51537 5.03191 -0.149251
v ......
#65000 vertex normals
vn -0.3027 0.9527 -0.0275
vn ......
# Mesh 'Sphere_None_mesh01' with 65000 faces
g Sphere_None
usemtl None
f 1//1 2//1 3//1 4//1
f ......
o Sphere_none_mesh02
#65000 vertex positions
v -1.51537 5.03191 -0.149251
v ......
#65000 vertex normals
vn -0.3027 0.9527 -0.0275
vn ......
# Mesh 'Sphere_None_mesh02' with 65000 faces
g Sphere_None_mesh
usemtl None
f 1//1 2//1 3//1 4//1
f ......
o Sphere_none_mesh03
#1235 vertex positions
v -1.51537 5.03191 -0.149251
v ......
#1235 vertex normals
vn -0.3027 0.9527 -0.0275
vn ......
# Mesh 'Sphere_None_mesh03' with 1235 faces
g Sphere_None
usemtl None
f 1//1 2//1 3//1 4//1
f ......
Perhaps, in dst obj source I made some mistakes, but I think common sense should be clear.
Thanks for answers and sorry for my english.
Metadata
Metadata
Assignees
Labels
QuestionGlobal flag to mark questions from users
Activity
kimkulling commentedon Nov 11, 2015
During the preprocessing you can use the SplitLargeMeshesProcess_Triangle-process. Please check the documentation of code/SplitLargeMeshesProcess_Triangle .h .
Update CMakeLists.txt
Update CMakeLists.txt (#5379)
Update CMakeLists.txt (#5379)