Apply Texture To Mesh from Photoscan?

I’m using a photogrametry program called photoscan to generate meshes and textures of objects.

Attached is a sample mesh and jpg. How can I apply the jpg to the mesh?

Thanks,
Sam

Boot.zip (19.6 MB)

Hi Sam,

if you import the *.wrl file into Rhino5, it comes in with the texture attached to the mesh material. Note that this mesh also has vertex colors assigned, so even when the texture is muted, it looks like the mesh is still textured. Do you see something different ?

c.

Hi Clement,

I see that if under textures/color, I can turn off the boot texture jpg and then I see the exact same thing. I would have thought that when this option is checked, it would look different (I’ve always thought applied textures looked smoother than when mesh vertices are colored). What might I be missing?

Thanks,
Sam

I see quite a difference between the vertex colors and the texture over here. But it looks better in the new wip compared to rhino 5. I think the vertex colors where just derived from the 22 photos taken of your scan. For comparison, with texture:

And without, using vertex colors:

In case you would like to get rid of the vertex colors without destroying the texture coordinates of the mesh you might use the script: MeshClearVertexColors.py (559 Bytes)

@pascal, i’ve thought that _RebuildMesh can be used here to delete the vertex colors which it does, but it also removes (or changes ?) the texture coordinates. (in RH5 and the wip). I´ve also seen cases where this objects just displays in constant black after paning or rotating, but only in the wip. Hard to reproduce.

btw. Would it be possible that the wip reads in the 22 views from the *.wrl file ?

c.

Hi Clement - yeah- RebuildMesh has a ‘take no prisoners’ approach - you lose everything, pretty much, except the vertices and and vertex normals, which I believe are recalculated to the face normal averages. I have not tested thoroughly, but List on a rebuilt mesh shows no texture or mapping info as far as I can see.

-Pascal

Ok, maybe an enhancement would be an option to keep (vertex colors and textures). Since the helpfile mentions that the command can be used to repair meshes for 3d printing, more and more printers accept colors anyway.

c.

Good point… I’ll add this to the pile.

http://mcneel.myjetbrains.com/youtrack/issue/RH-34940

@clement - this now fixed for V6… thanks.

-Pascal

1 Like

Hi Guys,

I used that python script to remove the vertices’ colors, and seemed to work as the model is all grey now. But I was expecting to be left with the texture as I have texture/color/boot.jpg checked. What might I be missing? Clement’s textured screen shot is what I’m after, just having trouble getting it.

Thanks,
Sam

Hi Sam, after running the script and the model turned gray, switch to Rendered viewport. My screenshot above with textured display was made in Rendered viewport. Any better ?

c.

Worked, thanks!

Sam