Jump to content

Problem with transparent material


Andy90
 Share

Recommended Posts

According to the discord talk here the bug report. If you take the model i sended you last time and drag it into the scene you can see some "circle" appearing within the windos. It also happens in the scene editor. Within the model viewer everything works fine.

 

image.png?ex=665b4a5d&is=6659f8dd&hm=0fd7a811753c12172d7c15ff12e613374c97ffc08d4f7c31996fa616781e1e27&

image.png?ex=665b4ac6&is=6659f946&hm=ab1ccde9639994a5ad03568e8049e68acfda0cbd5df1ee8d86e1aed713ee5dbc&

image.png?ex=665b4b3a&is=6659f9ba&hm=5b713c95a4ccfc42bd90e072a54ebf6e005c17aaf36f4531926394e5bdbd4cca&

 

Link to comment
Share on other sites

There is something strange happening. It doesn't even have to be transparent. It has something to do with the diffuse PBR reflection and the metal/roughness map I think...

image.thumb.png.f3fe35701a10d11edb02454c8d3a0884.png

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

There appears to be some small error with very low values near zero in the linear to srgb conversion...

image.thumb.png.614263add9d8e809e160242a852cf855.png

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

Before modifying the sRGB / linear equations I think we should try storing cubemaps in linear color space. I was already planning this, but wanted to talk about it this weekend with you guys and explain the reasons for it, before making any further changes. Let's see what the result of that is after we try it, as it may eliminate this problem.

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

It's definitely being caused by the final linear to sRGB conversion. If we leave everything in linear color space it looks fine:

image.thumb.png.1832abc0c8f49806b7839c685d31937f.png

Curved lines are visible after the linear to sRGB conversion.

image.thumb.png.1c8a4816e3004a48da18152fd6724909.png

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

If I ignore values below a threshold the lines go away:

vec3 linearTosRGB(vec3 color, float invgamma)
{
    const float lower = 0.001f;
    if (color.r > lower && color.r < 1.0f) color.r = pow(color.r, invgamma);
    if (color.g > lower && color.g < 1.0f) color.g = pow(color.g, invgamma);
    if (color.b > lower && color.b < 1.0f) color.b = pow(color.b, invgamma);
    return color;
}

 

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...