Aliased transparency for transparent background of iframe


(Termagroup) #1

Hello,

We observe that anti-aliasing is not working well for transparency background (transparent parameter set to 1) as you can see:

with some background color you will see it more precisely:

and the same model without transparency (transparency parameter is 0):

You can see more models like that at our page: http://www.termaheat.pl/pl/3dvisual

It look's like that for transparency background the anti-aliasing for edges is not enabled or it is working just at 8 bit mask. Could you check it ? Please.


#2

Hello,

This is a know issue, but it cannot be fixed. When you use a transparent background, we can't anti-alias because the background color is outside the viewer/webgl context - we can't blend pixels if we don't know the color :confused:

James


(Termagroup) #3

Thank You for response. At begging of new Year I will try to do workaround for it by using cube/sphere environment object for changing background solid color.

Jan


#4

I solid color background is probably the easiest solution.


(Realvu) #5

Hi,
We are experiencing same issue here.
We are using transparent background and changing overlayed background according to annotations and we are experiencing aliasing.
So at transparent background sketfab disables aliasing filter by default?
Is there a way fo force it on assuming some solid color background?
Otherwise, is there a way to toggle transparent background with viewer api with button? (not re initializing viewer)
Regards,
Justin


#6

Hi Justin,

I'm afraid not at the moment. There some speculation that it might be possible, but as far as I know, the background color of the page is outside the scope of the iframe, so we cannot anti-alias. @tuan_kuranes would know more.

An interesting solution could be to allow changing the background with the Viewer API (specifically color, but I suppose image or environment could work, too) - @mauricesvay ?


(Mauricesvay) #7

Providing an API to change the background could be interesting workaround, but we need to lay some groundwork before we add that I think.


(Klaasnienhuis) #8

I think this AA discussion is still very relevant. It would be a fantastic addition to be able to change the background image and color through the API. A key requirement for my clients is to have responsive websites with 3D content. This means we need to be able to modify the background image depending on screen size and orientation. This is currently not possible, which limits us to using static background colors only.
Also, looking at the recent Nike ad Sketchfab created (https://pr.ybp.yahoo.com/pr/secure/true/crid/909469), using a transparent iframe results in bad AA at the edges of the model. This is known. But it seems the AA within the model, e.g. where the white sole meets the upper part of the shoe, is very apparent as well. Does this mean that having a transparent background in the iframe disables AA altogether?


(Stephomi) #9

Yes if there’s no background, taa, fxaa and supersample will be disabled.

Edit: After taking a look it’s possible we might add soon support for taa/fxaa/supersampling even if background is not present.


(Stephomi) #10

@klaasnienhuis Actually it’s already live, you should have taa/fxaa/supersampling enabled on transparent background.


(Termagroup) #11

That’s great, thanks!


(Klaasnienhuis) #12

By the way, this feature is quietly amazing. It will help us design better experiences with sketchfab. Thanks!