We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.

image texture too dark after playing movie as texture

Home Forums Bug Reports and Feature Requests image texture too dark after playing movie as texture

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #66736
    stefanp
    Customer

    Hi, I have found a strange effect happening when you play a movie as a texture: as in the demo file, i would like to start with an image texture, that gets replaced by a movie texture. so far all works perfectly. now i would like to switch back to the original image with new click (replace texture again with original file).
    -> strangely the original file is now much darker, it looks like wrong gamma?

    i added a few lines to the “video texture” demo file to show the behaviour:

    https://cdn.soft8soft.com/AROAJSY2GOEHMOFUVPIOE:8fb9dda30c/video_texture/video_texture.html

    what’s the reason for this behaviour? is there an easy/ performanc-efficient way to fix it?
    thanks for your help.
    kind regards,

    Attachments:
    You must be logged in to view attached files.
    #66743
    kdv
    Participant

    what’s the reason for this behaviour?

    The reason is inside the replaceTexture() function. They apply a specific code to adjust the color space for video textures (otherwise they are too bright).

    This code affects only node materials. So try to use a PBR material (aka glTF 2.0 compatible) for the tv_screen object. But keep in mind that glTF 2.0 compatible materials support only the Principle BSDF shader. The Emission shader is not supported. Or you can use a black-n-white texture to see no difference. Maybe it will help.

    Puzzles and JS coding. Fast and expensive.

    If you don’t see the meaning in something it primarily means that you just don’t see it but not the absence of the meaning at all.

    #66746
    stefanp
    Customer

    Hi kdv thanks for the quick answer. the glTF solves the issue but it seems to only work properly with a non-emissive BSDF texture – so might not be the perfect solution for a screen as those are in principle emissive. I found a way to correct emissiveness in “set value of material” puzzle but it is very approximative, and the video looks less vivid.

    maybe there could be an option box for the specific code so it can be removed after swapping texture again in future release?

    in the meantime the best option I found is to add second image node as video placeholder and switch it with a value node. this way it can also be animated with a crossfade.

    thanks, sp

    #66747
    kdv
    Participant

    maybe there could be an option box for the specific code so it can be removed after swapping texture again in future release?

    No.

    This particular issue can be completely solved only via modifying the replaceTexture() function in puzzles.min.js.
    https://v3d.net/aqi

    But there are several workarounds. For example, you can use two materials (one for static textures and one for video textures) and switch between them when needed. And it will be even more video memory friendly.

    Puzzles and JS coding. Fast and expensive.

    If you don’t see the meaning in something it primarily means that you just don’t see it but not the absence of the meaning at all.

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.