question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

saving colored mesh to .png

See original GitHub issue

Hi Marco, thanks for this wonderful package!

We are working on a project very similar the pic below. However, after we use the .pointColors to successfully add colors to the region, is there any way to automatically take a 2d snapshot with it and save as .png/.jpg by script?

image(resource from: https://github.com/mikedh/trimesh/issues/966)

To put it into code, it works well if doing this way:

vtk_diff.pointColors(scal, cmap='rainbow').addScalarBar()
vtkplotter.show(vtk_diff, bg="white", axes=0, interactive=True)

However, when we are trying to get the 2d snapshot in the way below, it does not work:

plt = vedo.Plotter(shape=custom_shape)
vtk_diff.pointColors(scal, cmap='rainbow').addScalarBar()
plt.show(vtk_diff.c('lb'), interactive=False, at=0)

May we know what we should modify based on the current code? Thx!

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:19 (9 by maintainers)

github_iconTop GitHub Comments

2reactions
marcomusycommented, Feb 26, 2022

you must have an older version, do pip install vedo -U

1reaction
hhoanggcommented, Feb 26, 2022

you must have an older version, do pip install vedo -U

Updating vedo (2022.0.1 -> 2022.1.0)

thank you a lot, it’s work I hope it will work with my docker Linux (no interface)

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to quickly change the color of a PNG file in Adobe Illustrator
Did you know Illustrator has a way to quickly change the color of a PNG file (similar to Photoshop)? Learn how in this...
Read more >
Export a PNG with transparent background from Blender
By default, Blender doesn't include transparency within a render. Enabling transparency is very easy and is done so via a single checkbox.
Read more >
Exporting a PNG File - the Inkscape Beginners' Guide!
Open the dialog Export PNG Image with Shift + Ctrl + E , or by going to File ... of the background color...
Read more >
save as: .obj no color in .mtl file - MeshLab - SourceForge
Hi; when I save a mesh as an obj, it does include a mtl file. ... (knot) also has the png map in...
Read more >
Keep models color after turning into mesh - DevForum | Roblox
i built a model in roblox studio and want to turn it into a mesh instead ... is a png image along with...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found