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.

Is it possible to make the viewer have transparent background?

See original GitHub issue

You can change background color with scene.color but is there a way to remove the background color / make it transparent? I thought scene.alpha = true would do the job but it might be used for something else. I did a Hail Mary and changed the gl.clearColor alpha argument to 0 in the startFrame() function of scene.ts and it didn’t also work (still black).

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
flowtsohgcommented, Feb 1, 2021

So I was searching around for a solution to the general problem here - removing the background (whichever color) from an image that has alpha in it, and I happened on this stack question. I’ve tried the suggested “Greenfish Icon Editor Pro” just because it’s tiny and easier to get than GIMP/Photoshop/whatever big editor, and the results are actually good. For example, I did most of the testing with the water elemental, because that’s a fairly complex model when it comes to transparencies, and could never get to something remotely satisfying, while a simple button click got this:

0_WaterElemental_1250 0_WaterElemental_1250_noblack So clearly the right solution here is not to enable alpha, but rather to either use an external tool that knows the proper cleaning algorithm, or implementing this algorithm in the code if automation is needed. I could ask someone I know who knows about image filters and manipulations, maybe they could help, but no promises.

This also means that I’ll probably remove ModelViewer.alpha and maybe also the WebGL parameters entirely, because it doesn’t really make sense for WC3 models.

0reactions
flowtsohgcommented, Apr 5, 2021

I’ll close this for now. Maybe this experiment will help in some way in the future, who knows.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Make an Image Background Transparent
On the right side of the screen, right-click on your image and select Add Alpha Channel. This will provide a transparent background. Transparent ......
Read more >
Make a picture's background transparent or opaque in ...
Select the picture that you want to create transparent areas in. Click Picture Tools > Recolor > Set Transparent Color. In the picture,...
Read more >
Top 9 Transparent Background Makers to Make Image ...
Best 10 Transparent Background Makers on Desktop [Online/Windows/Mac] · 1. Wondershare Filmora · 2. Media.io PNG Maker · 3. Online PNG Tools ·...
Read more >
How to Make a Transparent Background For Your Images in ...
If you have the need to make the background of an image transparent then you can use Microsoft Paint 3D that comes built...
Read more >
Free Transparent Background Maker | Adobe Express
How to make an image background transparent. · 1. Select. For best results, choose an image where the subject has clear edges 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