Question: Input mesh does not have texture coordinates to support the texture #4570
Replies: 2 comments 4 replies
-
You'll need to create a texture mapping on the mesh. Perhaps the following examples will help you to generate these for your mesh:
|
Beta Was this translation helpful? Give feedback.
-
@banesullivan, found this discussion here xref to: cgre-aachen/gemgis#316 The tutorial is about plotting the image data of a geological profile onto a mesh as shown here: https://gemgis.readthedocs.io/en/latest/getting_started/tutorial/12_visualizing_cross_sections_in_pyvista.html This seems to have stopped working and the error above mentioned by @Changwan-planet appears. Using tex = pv.read_texture(file_path + 'profile1.png')
mesh.texture_map_to_plane(use_bounds=False,inplace=True)
p = pv.Plotter()
p.add_mesh(mesh)
p.add_mesh(mesh, texture=tex)
p.show_grid(color='black')
p.set_background(color='white')
p.show()``` |
Beta Was this translation helpful? Give feedback.
-
Hi, @banesullivan
Thank you for making this nice open-source!
I found the nice example for my work.
The example handled just a fence diagram, but in my case I have to deal with multiple fence diagrams, not connected with each other.
In the issue, I found two codes that you and your coworker made.
When I execute those programs, I keep having this message.
I tried to track what the problem was.
This part reported same error in both scripts.
My program environment
python : 3.9.16
pyvista : 0.39.1
vtk : 9.0.3
Please help me out to address this issue.
Beta Was this translation helpful? Give feedback.
All reactions