Applying a texture changes the size of the mesh
See original GitHub issueDescribe the bug, what’s wrong, and what you expected.
When applying a texture (image of a seismic line), the cross section/mesh the image is supposed to be put on has shrunk. I would expect the image to be stretched across the entire mesh.
Steps to reproduce the bug.
import pyvista as pv
p = pv.Plotter(notebook=False)
tex = pv.read_texture('1.png')
# Adding or removing the texture is the only thing that is changed
p.add_mesh(mesh, texture=tex,cmap=odt_petrel)
p.show_grid(color='black')
p.set_background(color='white')
p.set_scale(1,1,1)
p.show()
System Information
--------------------------------------------------------------------------------
Date: Sun Nov 20 20:19:23 2022 Mitteleuropäische Zeit
OS : Windows
CPU(s) : 16
Machine : AMD64
Architecture : 64bit
RAM : 15.2 GiB
Environment : Jupyter
GPU Vendor : ATI Technologies Inc.
GPU Renderer : AMD Radeon(TM) Graphics
GPU Version : 4.5.14761 Core Profile Context 21.30.40.09 30.0.13040.9001
Python 3.8.5 (default, Sep 3 2020, 21:29:08) [MSC v.1916 64 bit (AMD64)]
pyvista : 0.33.3
vtk : 9.0.1
numpy : 1.19.2
imageio : 2.13.1
appdirs : 1.4.4
scooby : 0.5.12
matplotlib : 3.3.2
PyQt5 : 5.12.3
IPython : 7.22.0
colorcet : 3.0.0
scipy : 1.6.2
tqdm : 4.50.2
meshio : 4.4.6
Intel(R) Math Kernel Library Version 2020.0.2 Product Build 20200624 for
Intel(R) 64 architecture applications
--------------------------------------------------------------------------------
Screenshots
Mesh without texture
Mesh with texture
Issue Analytics
- State:
- Created 10 months ago
- Comments:8 (3 by maintainers)
Top Results From Across the Web
How to Change Material Size in Blender the EASY WAY!
In this video, learn to use nodes in Blender to quickly change the ... 0:13 - Example Texture Location 1:04 - Adding Mapping...
Read more >How to keep texture size whatever the size of the object?
To change the scale of the textures, add Mapping and a Texture Coordinate node in the Shader Editor. Connect the UV output (or...
Read more >Texture Size/Resolution vs Mesh Size/Blender Units
Hi I am currently trying to texture an image on a flat plane in blender by uvmapping the texture to the plane and...
Read more >How do you move and resize textures in Blender?
Move and resize a texture using the shader editor · Press Shift+A and go to Input->Texture coordinate, place it to the left of...
Read more >Applying Textures — Blender Manual - UV
Applying Textures to UVs The UV Editor allows you to map textures directly to the mesh faces. The 3D Viewport shows you the...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
So, after adjusting the z_spacing and the z position, it is also possible to like change the clims of the mesh.
That is amazing 😃![image](https://user-images.githubusercontent.com/45469915/205380776-e10accf6-24ca-4b67-98cb-a3cd8ef1064b.png)
Here’s what the image looks like in my image viewer:
Note the checkerboard strips at the top and bottom. Isn’t it just that your image has transparent parts, and those don’t get rendered on your mesh?