how to import colored mesh from meshlab to unity!(may thouth 3ds max) - unity3d

I'm very new.I have a ply file,with some faces and colored point cloud.My finial aim is use unity to import this mesh with color!
I find some way ,it seems need 3ds max.But i even make mesh have color in 3ds max.
I tried :
1 In mashleb,filters-texture-per vertex texture function and convert PerVertex UV into perwedge UV.And i get a obj with mtl(only 1KB).Of courese ,it doesn't works.
2 I try filters-texture-transefer Vertex color to texture .and i get i png.But it seems only a side color of mesh.
3 I try filters-color creation and prcession-transfer color:vertex to face.And i get a obj with a little large mtl file.This action make it is very slow to open this obj file in meshlab and 3ds max and unity.And it doesn't works.
I think the color system of 3ds max and unity is different from meshlab.But i have no idea how to do!Any suggesion is OK !Thanks!
It seems after filters-texture-transefer Vertex color to texture,and save it .It can have some texture but wrong like this: pictures here
error 1
I think some thing wrong with getting texture.Any suggestion?

I found ansner in youtube:
https://www.youtube.com/watch?v=6wP_e37t7PI
3. Filters -> Texture -> Parametrization: Trivial Per-Triangle
Save project
Filters -> Texture -> Transfer Vertex Attributes to Texture
Export mesh as obj. file
I don't know reason but it really works.

Related

RenderSettings customReflection texture has invalid type, 2D given while only CUBE is supported. Custom reflection texture will not be used

so I started an unity project w ps1 graphics style, and it been smth like 2 days I have this error but the game still working kinda fine, can someone explain me why this happening? Thanks!
(Im not using URP)
Full error :
RenderSettings customReflection texture has invalid type, 2D given while only CUBE is supported. Custom reflection texture will not be used in UnityEditor.EditorApplication:Internal_RestoreLastOpenedScenes ()
In the Texture 2D Import Settings, change Texture Shape from 2D to CUBE.
In your project, click on your texture. Import settings are found in the inspector.
Cube defines the Texture as a cubemap. You could use this for Skyboxes or Reflection Probes
, for example. This type is only available with the Default, Normal Map, and Single Channel Texture types.
From the Texture Shape Reference of Texture Importer Documentation.

Unity Shader Graph Odd Tiling

I'm trying to create a shader that tiles a texture on an object, But I am Running into an issue. When trying to tile with this Shader Graph, It looks good from the front but looks wrong from the side. this is a 3x3x1 object and all of the squares should be the same size. Thanks in advance
I think it's because you're trying to input a Vector3 into a UV input node, which only takes a Vector2, so it's not using the Z component, which is the dimension that isn't working for you.
I haven't looked too deeply into it, but maybe this script will let you accomplish tiling in all three dimensions? https://github.com/Dsphar/Cube_Texture_Auto_Repeat_Unity/blob/master/ReCalcCubeTexture.cs

Unity Point-cloud to mesh with texture/color

I have a point-cloud and a rgb texture that fit together from a depth camera. I procedurally created a mesh from a selected part of the point-cloud implementing the quickhull 3D algorithm for mesh creation.
Now, somehow I need to apply the texture that I have to that mesh. Note that there can be multiple selected parts of the point-cloud thus making multiple objects that need the texture. The texture is just a basic 720p file that should be applied to the mesh material.
Basically I have to do this: https://www.andreasjakl.com/capturing-3d-point-cloud-intel-realsense-converting-mesh-meshlab/ but inside Unity. (I'm also using a RealSense camera)
I tried with a decal shader but the result is not precise. The UV map is completely twisted from the creation process, and I'm not sure how to generate a correct one.
UV and the mesh
I only have two ideas but don't really know if they'll work/how to do them.
Try to create a correct UV and then wrap the texture around somehow
Somehow bake colors to vertices and then use vertex colors to create the desired effect.
What other things could I try?
I'm working on quite a similar problem. But in my case I just want to create a complete mesh from the point cloud. Not just a quickhull, because I don't want to lose any depth information.
I'm nearly done with the mesh algorithm (just need to do some optimizations). Quite challenging now is to match the RGB camera's texture with the depth camera sensor's point cloud, because they of course have a different viewport.
Intel RealSense provides an interesting whitepaper about this problem and as far as I know the SDK corrects these different perspectives with uv mapping and provides a red/green uv map stream for your shader.
Maybe the short report can help you out. Here's the link. I'm also very interested in what you are doing. Please keep us up to date.
Regards

Unity adds vertices to the original mesh

I have a simple teapot mesh and a point cache animation that matches that mesh.
Everything is exported from 3DS Max.
When I try to load it into unity, and load the point cache into the mesh, there is a vertices mismatch.
Upon further debugging I saw that indeed unity adds more vertices than there is in the original mesh, which means I cannot match the point cache animation to the mesh now.
I saw on the RecalculateNormals page and it say's:
Imported Meshes sometimes don't share all vertices. For example, a
vertex at a UV seam is split into two vertices, so the
RecalculateNormals function creates normals that are not smooth at the
UV seam.
So, unity adds more vertices to the original mesh.
What can I do to fix that so my point cache match the mesh? there is no documentation how unity does that, nor is there a way to turn it off.
Note: I tried changing the import setting (and export setting on max) like:
Mesh compression -> Nothing
Optimize mesh -> Nothing
Keep Quads -> ON
Weld Vertices -> OFF
Smoothness Source -> None
And more...
Everything is set and tested separately & together. Nothing seem to lower the vertex count.
Vertex duplication is generally unavoidable.
Turning off split per-vertex normals in the fbx exporter settings in max is supposed to solve this problem, but it will remove all seams from your model.
Personally, I would work around this in maxscript by exporting the entire mesh as fbx at each $t instead of writing out the point cache.
I found this tool, the Oasis Mesh Editor, that can Split Vertices and Merge Vertices back together, https://assetstore.unity.com/packages/slug/166155
The Merge Verts tool also has a Max Tolerance setting so that only verts that are closer than this distance will be merged.
Hope this helps anyone looking =)

UNITY Vertex Color from obj or dae (fdx)

I have been googling hard for days to find a solution for this without luck.
I am basically trying to import vertex colours from.one of the above formats and interpolate between them to get a smooth Color profile across the surface.
The obj and dae file have a vertex (xyz) as well as 3 other values (I assume RGB) associated with each vertex (when viewed in an text editor). However when I import the asset, it comes in without any Color. The material is set and uneditable by default and I just can't work out how to get these colours displayed.
Any help is greatly appreciated
OK, I found a way around it.
Basically, if you import a dae file with vertex colors a Vertex Shader (Standard) is available which seems to work very well.
Initially I was messing around with objs and it looks like that does not work as well but I will have to try that again tonight!