Home › Forums › Bug Reports and Feature Requests › image texture too dark after playing movie as texture
Tagged: image texture, video texture
- This topic has 3 replies, 2 voices, and was last updated 1 year, 3 months ago by kdv.
-
AuthorPosts
-
2023-09-10 at 12:29 pm #66736stefanpCustomer
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.2023-09-11 at 4:48 am #66743kdvParticipantwhat’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 thePrinciple BSDF
shader. TheEmission
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.
2023-09-11 at 8:51 am #66746stefanpCustomerHi 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
2023-09-11 at 8:55 am #66747kdvParticipantmaybe 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 inpuzzles.min.js
.
https://v3d.net/aqiBut 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.
-
AuthorPosts
- You must be logged in to reply to this topic.