Forum

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - Paulov

Pages: [1] 2
1
Feature Requests / Import point cloud without normals compute
« on: December 14, 2023, 01:15:03 PM »
Hi.

Ocasionally I need to recolor a mesh using the point cloud that was used originally, but this time the point cloud has received some color corrections in Cloud Compare.

The import process takes very long in big data files of several GB. For a color transfer I believe normals would not be needed so my request would be to add the option checkbox to import a point cloud without computing the normals to have a quick loading instead fo 20-30 minute wait.

2
Feature Requests / Gaussian Splatting
« on: September 23, 2023, 05:50:46 PM »
Hello,

Do you plan to introduce hability to generate Gaussian Splatting?

3
Bug Reports / Cancel fbx model export--> freeze
« on: May 24, 2023, 05:56:23 PM »
Hi,

If I accidentally export a very high face count model, like 23M into FBX and I cancel the save, it does not cancel the save it keeps going, not sure if it keeps saving or just stalls but it won´t cancel.


4
Feature Requests / Export model autonaming
« on: May 24, 2023, 05:54:59 PM »
Hi,

It would be very convenient if when exporting the mesh instead of blank name it had the same exact name that the mesh has inside the chunk.

Keep int mind that some of us are meshing point cloud scans that are already named so having the name already in place would be very convenient.

5
Hello,

I think there may be a bug since I'm trying to get the count of points in a .las file and I'm getting this error.

    points = point_cloud.points #collection of points
AttributeError: 'Metashape.Metashape.PointCloud' object has no attribute 'points'

that is what It is printed,

and poitn cloud is defined as 

point_cloud = chunk.point_cloud #current cloud

and is properly read since I get the logs on screen.

I checked the forums and the code seems corrrect, I checked python reference just in case this had changed, yet seems correct

"class PointCloud.Points
Collection of 3D points in the point cloud"

Could you please check?

version 2.01 build 16069

6
Bug Reports / Build mesh face count stimations totally off
« on: May 09, 2023, 10:42:31 AM »
Hi,

When meshing a point cloud, the preset low, med, high, by the name have a face count stimate when building a mesh out of a point cloud (.las import).

This stimation is completelly off.

Lets say in low stimates are 2.5M, the outcome is 28M. And so on.

Also I've noticed this has worsen from 2.0 beta. Where medium would output a 10,5M and medium now outputs 56M mesh.

Also noticed that for same face count, input manually via "custom"  face count, the latest version seems a bit noisier than in beta, yet I've to say it captures better hard edges.

7
Hi.
I managed to do this using the UI, the ressults are fine, and operation is fast. Yet I was trying to automate such task but I'm having a hard time procesing a folder.

My idea is , I've low resolution meshes in one folder, hi res meshes in another folder. I manage to load the meshes but it seems like the hi res mesh is not loaded, yet I can read the vertex and face count of both in the log, may be not in the same chunk? I found no python reference like chunk.moveTo or similar.

Here is the code at the point I gave up.

Code: [Select]
import os
import Metashape

# Set the paths to the folders containing the low and high resolution meshes
low_res_folder = r'E:/LIDAR_JAPAN/MMS8_Prototype_3/MMS/03_RoadMesh/04_Texturing/01_DATA_SOURCE_POINT_CLOUDS/00_a_mesh_real_coords'
high_res_folder = r'E:/LIDAR_JAPAN/MMS8_Prototype_3/MMS/03_RoadMesh/04_Texturing/01_DATA_SOURCE_POINT_CLOUDS/03_Normals'

# Set the output folder for the normal map texture
output_folder = r'E:/LIDAR_JAPAN/MMS8_Prototype_3/MMS/03_RoadMesh/04_Texturing/02_Texture_Outputs/04_NORMAL'

# Get a list of all the files in the low resolution mesh folder
file_list = os.listdir(low_res_folder)

# Create a new document and chunk
doc = Metashape.Document()
chunk = doc.addChunk()

# loop through low res meshes
for file_name in file_list:
    # Import low res model
    low_res_file = os.path.join(low_res_folder, file_name)
    print("low_res_file path:", low_res_file)
    low_res_model = chunk.importModel(low_res_file)

    chunk.resetRegion()

    # Import high res model
    high_res_file = os.path.join(high_res_folder, file_name)
    print("high_res_file path:", high_res_file)
    high_res_model = chunk.importModel(high_res_file)

    if high_res_model is not None:
        high_res_model.move(chunk.model)

        chunk.resetRegion()

        chunk.addReference(high_res_model)

        # Generate the normal map texture
        chunk.buildTexture(texture_size=4096, texture_type=Metashape.Model.NormalMap)

        # Save the texture to the specified output folder
        texture_file = os.path.join(output_folder, os.path.splitext(file_name)[0] + "_normal_map.jpg")
        chunk.exportTexture(texture_file)

        # Print the type of the high res model after it's defined
        print(type(high_res_model))

        doc.remove(chunk)
        print("normal map bake for file = " + file_name)

    else:
        print("No high resolution mesh found for file:", file_name)

8
Texture De-Lighter / tutorial where
« on: May 05, 2023, 04:21:37 PM »
the documentation link points nowhere specifically, what about a clear manual/tutorial link?

9
Texture De-Lighter / sepparate fbx and texture import
« on: May 05, 2023, 04:07:39 PM »
I find crazy that you can´t import the mesh and the texture separatelly. If the fbx has no texture asigned won´t import! neither the texture alone...

10
Hello.

With the aid of GPT did setup a simple script.

I whant to import a folder that is full of point clouds in .ply format. I whant to process them one by one, so import 1 .ply mesh it and save it as .fbx. No colors, just a mesh with normals.

I've two errors, one from license other specific to the script. I've activated a 30 day demo.

"(base) E:\LIDAR_JAPAN\MMS8_Prototype_3\zz_Batch_commands\MMS>python 04_e_NormalTexture_Mesh_Metashape.py
No response from license server
2.0.1
Traceback (most recent call last):
  File "E:\LIDAR_JAPAN\MMS8_Prototype_3\zz_Batch_commands\MMS\04_e_NormalTexture_Mesh_Metashape.py", line 24, in <module>
    import_task = doc.chunk.importPoints()
AttributeError: 'Metashape.Metashape.Chunk' object has no attribute 'importPoints'

"

According to the documentation importPoints is part of the Chunk namespace so not sure why that raises, is it because of license?

importPoints(path=’‘, format=PointsFormatNone, calculate_normals=True[, crs][, shift][,
progress])
Import point cloud from file.
Parameters
• path (string) – Path to point cloud.
• format (PointsFormat) – Point cloud format.
• calculate_normals (bool) – Calculate point normals.
• crs (CoordinateSystem) – Point cloud coordinate system.
• shift (Vector) – Optional shift to be applied to point coordinates.
• progress (Callable[[float], None]) – Progress callback.



Finally, my script:
Code: [Select]
import Metashape
print(Metashape.app.version)
import os

# Set the folder path containing the point clouds
point_cloud_folder_path = "E:/LIDAR_JAPAN/MMS8_Prototype_3/MMS/03_RoadMesh/04_Texturing/01_DATA_SOURCE_POINT_CLOUDS/00_color"

# Create a new Metashape document
doc = Metashape.Document()

# Loop over each file in the folder
for file_name in os.listdir(point_cloud_folder_path):

    # Check if the file is a .ply file
    if file_name.endswith(".ply"):

        # Create a new chunk for the current file
        chunk = doc.addChunk()

        # import all point clouds in the folder
        import_points = doc.chunk.importPoints()
        import_points.path = point_cloud_folder_path + "/*.ply" # or replace with appropriate file extension


        # Get the first chunk in the document
        chunk = doc.chunk[0]

        # Create a new mesh for the chunk
        mesh = chunk.model

        # Set the source data for the mesh generation
        mesh.source_data = Metashape.DataSource.PointCloudData

        # Set the surface type
        mesh.surface_type = Metashape.SurfaceType.Arbitrary

        # Set the face count of the mesh
        mesh.face_count = Metashape.FaceCount.MediumFaceCount

        # Disable vertex color calculation
        mesh.enableColors(False)

        # Set the interpolation
        mesh.interpolation = Metashape.Interpolation.EnabledInterpolation

        # Generate the mesh
        chunk.buildModel()

        # Export the mesh as a .ply file
        mesh_file_name = os.path.splitext(file_name)[0] + ".fbx"
        chunk.exportModel(os.path.join(point_cloud_folder_path, mesh_file_name))

        # Clear the point cloud and remove the chunk to free up memory
        point_cloud.clear()
        doc.remove(chunk)


hopefully is a silly thing :\

11
Feature Requests / [already solved] Filter by Confidence - MESH
« on: February 27, 2023, 03:10:07 PM »
I was trying the new version, I meshed a point cloud form a scan, It does a great job but there is a lot of junk edges. Theese are red when displaying confidence but I find no way to filter theese out like it is possible with points. This seems like a must.

12
Feature Requests / Workspace navigation improvements
« on: November 21, 2022, 12:50:22 AM »
Hi,

So, I made a test photoset, I did put a camera on a car, camera is action camera with GPS and accelerometer.

So after alignments, from the 4 passes I made it matches 2+2 camera paths so I need to place markers to try to align.

So to make it easyer I select a group of cameras in the model and I move theese images to a separate group.

If I double click on one image in the grou opens up as scpected. BUT as I advance in the images with PAGE UP  _ PAGE DOWN. It does not move withing the group in the workspace, what it does is that follows the order in the image folder!! this is sad because otherwise would make it much more convenient to place the markers.

Also, the highlight of the selected images is dark gray, over lighter gray background, this is horrible, is almost bisible and I found no preference options to chage. It should be something like organte or yellow, something with high contrast!.

Also as you move page up down, and the highlighted item is shown the scroll does not follow)


13
Feature Requests / meshed LIDAR texture from LIDAR COLOR
« on: November 19, 2022, 02:02:32 AM »
II'm sure it is logical in a photogrammetry software taht the main data input be photos, but with the new LIDAR import hability, you may be able to import already coloured clouds from which the photos used to colorized you may not have. I was meshing a dataset tile and I found that I could not create texture form the dense cloud and I feel its lacking this feature.

14
Feature Requests / Automatic geotag.
« on: November 18, 2022, 06:35:04 PM »
I wish I could import GPX, then the images, and have option to merge GPX data into images without having to do so in an external program.

Also, ideally allow to input a shift for distance and orientation since the camera or cameras could be some distance away from the GPS and with different orientation.

15
Feature Requests / multiple tabs for same data type
« on: November 18, 2022, 06:33:16 PM »
Hi,

So I was attempint to place markers and its a pain.

I've an street where I did a test and I did like 4 passes and when I whant to add markers I select the image in the model space, then I look for it in the Workspace (It should simply be double click in model space) Open it in a tab, add marker, and hten I've to open the other image with same process.
It would be much more convenient to have two tabs, both with images this way would be ideal to place the markers.
When I say 2 it could be 4, no don´t put limits, this way each window move up and down in the image datasets at different points of the list.

Pages: [1] 2