Split the mesh on the basis of UDIM using AssImp - assimp

I have a model with single mesh which contains multiple UDIMs. I was looking for a way to split a mesh on the basis of UDIM in AssImp. I searched on the web and also in their documentation but couldnt find any way to do it. Is there any known way to do this using AssImp ? Also Can we differentiate a model that contains UDIMs ?

Related

How to have continuous features for a shapefile and get rid off the wrapdateline?

How to have continuous features for a shapefile ?
I mean NOT cut by the dateline to respect [-180:180] longitude excursion that I do not
want to respect.
Here is an example where I display the Russia shapefile in a leaflet map.
In fact I would like to have continuous continent.
Shapefile comes from
https://gadm.org/about.html
Any command from gdal or ogr2ogr to merge separated features ?
Thanks
If you load the GADM level-0 layer into QGIS and toggle Show Feature Count, you'll see that, even though the shape seems split, the actual layer only has a single feature:
Your shape gets cut off because the polygon crosses the boundary in the projection you are using and gets wrapped around. This doesn't mean the features get actually split.
If you want to display it as a continuous feature, you need to specify an appropriate projection. For instance, using the example here gives me this:
This is just one way, there might be different projections that fit your purpose better. Also, getting this done in leaflet is a different question.

Primitive ID, not unique if the same mesh is used more than once

I working on a thermal tool using OptiX.
I started with the "meshviewer" example which uses syoyo's tinygltf loader.
Basically I want to import a file, get the number of primitives and then add up the intersections.
Now I imported a file containing two cubes, which should consist of 12 triangles each, so 24 in total. When I start my program the loader only recognizes 12 triangles, but it renders 2 seperate cubes. The primitive IDs seem to be identical for both cubes.
Is there a workaround when I export from blender? If I understood the documentation directly the separate cubes are treated as two "identical" instances of the same mesh and thus share the primitive IDs.
I am using the v2.81 of Blender with the gltf exporter.
Do I understand the problem correctly? And is there an easy workaround? If not it seems I will have to modify the tinygltf loader.
Thank you for help in advance!
It's possible the two cubes share the same mesh. In the screenshot below, there are two Blender "objects", Left-Cube and Right-Cube. Both objects use the same Blender mesh, called Shared-Cube-Mesh.
The glTF exporter recognizes this pattern and mirrors it in the glTF file. There will be two glTF nodes, corresponding to the two Blender objects that use the mesh. But there will only be a single glTF mesh, with a single cube.
You can click the "number of users" button, shown below with a white arrow pointing to it, to make the second object use its own unique mesh. But be warned, this doubles the amount of mesh data being exported to glTF in this simple example. A complete copy of the mesh would be made in both Blender and the glTF binary payload.

Using Pyradiomics to calculate shape features on meshes instead of matrices?

I am trying to compute some mesh features for 3D models that I created using numpy-stl. I would like to compute all of the features given within pyradiomics, but I am not sure how to use them on just the meshes without them having all of the extra binary image, and matrix information? Unless there is a better program t use for shape feature extraction? Also, in the documentation, it says that there are some features you need to enable C extensions for. How can you do that in your python script?
C extensions are enabled by default. As of PyRadiomics 2.0, the python equivalents for those functions have been remove (horrible performance).
As to your meshes. PyRadiomics is build to extract features from images and binary labelmaps. To use meshes you would have to first convert them.
What features do you want to extract? PyRadiomics does use a sort of on-the-fly built mesh to calculate surface area and volume, which are also used in the calculation of several other shape features.
If you want to take a look at how volume and SA are calculated, the source code for that is in C (radiomics/src/cshape.c). The calculation of the derived features (e.g. sphericity) is in shape.py

Kinect Fusion - data format - object segmentation

I have started working with Kinect Fusion recently for my 3D reconstruction project. I have two questions in this field:
What is inside .STL file? is it the vertices for different objects in the scene?
How can I segment a specific object (e.g. my hand) in the reconstructed file? Is there a way to do so using Kinect Fusion ?
Thank you in advance!
Yes, there is a Wikipedia article on the STL format:
http://en.wikipedia.org/wiki/STL_format
Firstly, you would want your hand to be fixed, because Kinect Fusion will only reconstruct static scenes. Secondly, you could use the min and max depth threshold values to filter out the rest of the scene. Or if that does not work too well, you could reconstruct the whole scene, get the mesh, and then filter out the vertices that are beyond a certain depth for example.

How to create a .mesh file with OGRE?

I'm relatively new to OGRE graphics engine, so my question may seem too obvious, but searching for relevant information was not successful.
Given:
I have an OGRE application with a scene created of some meshes, lights, cameras and textures. It is rather simple, I think. That all is represented by a tree of scene nodes(internal object).
The goal:
To save the full tree of scene nodes or, preferably, an indicated branch of nodes of the tree to a ".mesh" file. To be able load it later as any other mesh. The ".mesh.xml" format is also fine. How it could be done?
If not:
If the desired thing is not possible, what is normal way to create those ".mesh" files? And where I could find some guides for it?
I think you're a bit confused: OGRE mesh file is a file that stores only geometric data of a given 3D model like positions, normals, texture coordinates, tangents, binormals, bone index, bone weights and so on. It also can store a subdivision of a single mesh in submeshes (generally based on the material), and each of them can have a reference to the proper material. In essence a mesh file only contains data on the models you would like to load on your game, nothing about the scene structure.
If you want to save (serialize) your scene, you have two choice:
Write your own scene serializer.
Using some library already provided by the OGRE community: for example DotScene format.
There are Ogre .mesh exporters for programs like Blender. A quick google for Ogre .mesh exporters should help you.