Support Website Contact Support Blog

LoD mesh outputs and VR

Hi!

I am trying to use the LoD mesh for input to a VR games engine (Unity)

I can generate the mesh in osgb, and I can then convert these files to obj and associated mtl files. I can see that there is data there and it loads into a mesh viewer as a set of triangle meshes. I can also see the hierarchy of detail, so I can rearrange the outputs ready for Unity.

My issue is that there are no textures associated with any of the submeshes. Usually the files will refer to the file ‘project_name.jpg’ where this is the texture file generated at Step 2.

Here, the reference for usemtl is ‘material_x’ where x is a number unique to each LoD submesh…so I can never ‘see’ the submesh as a textured entity.

Am I doing something wrong?..I know this works in Photoscan under the ‘tiled model’ option…

If you can, please respond to pnwright68@hotmail.com

Thanks

Hello Kevin,

Pix4D generates directly the .obj file with its .mtl material file with a link to the texture (in jpg). It is stored at: …\2_densification\3d_mesh

Sorry if I do not understand your explanation, you are exporting the mesh into osgb to convert it into obj and mlt. Why don´t you use the direct obj export:

 

Thank you very much.

Regards.

 

Hi Daniel

I think one of us is confused…and it is more than likely me!

I have someone who wants to take my mesh and import it into Unity. They also want LoD so that the nearer you get to an object in the game the detail is preserved, but as you walk away you can lose the detail and the game processes better (or at least that’s what I understand!!)

Agisoft (which some people have used) gives a tiled mesh model - which I assumed is the same as your LoD function. However, it outputs into every finer levels of detail as submeshes in associated obj, mtl and texture files (the texture seems to just relate to the bit of mesh that it is associated with)

However Pix output its LoD meshes (if they are the same thing!!) as osgb or splk formats, which are unreadable by the Unity games engine. Converting the osgb files does not generate the associated textures (although I have discovered that the osgb files are textured!).

Your solution above just gives one obj file…are you saying that the LoD is preserved within that? If so, that’s easy!!

Sorry if that’s confusing - it isn’t an area of processing I tend to get involved with

Hi Kevin,

You are correct, the LoD meshes have multiple tiles generated that are then loaded based on the zoom level used. On the other hand, .obj does not contain multiple level of details and only one mesh is exported. 

More about the formats available for export in Pix4D can be found in How to export the Triangle Mesh article.

From what I understand, the .splk is a format supported only by ArcGIS and .osgb is compatible with software that can handle the OpenSceneGraph files.

At this point, we do not have additional information about the compatibility with the Unity engine and I would recommend contacting them directly in order to get more information about the compatibility with the LoD mesh generated in Pix4D. Let us know if you get some information from them.