[LOGGED] Picture Viewer Alters Data?
-
Hey, all–
I'm trying to do some resampling of a live feed using a UV map stored in a png. I've got some simple GLSL adapted from 'TouchDesigner that should work. However, when I import the UV map with picture viewer, the GLSL actor seems to see many of the pixels zeroed out. I thought it may be something wrong with the code, but when I syphon in the same image from TD, it works as expected, which leads me to believe something is happening inside picture viewer.
Wondering if anyone has encountered something like this before? There's an easy workaround, but it's silly and cumbersome. I've attached the UV map image I'm using for reference, as well as the shader.
Thanks,
: j
------ GLSL ------
uniform sampler2D tex0;
uniform sampler2D tex1;void main(void) {
vec3 uv = texture2D(tex1, gl_TexCoord[0].xy).rgb;
vec3 c0 = texture2D(tex0, uv.xy).rgb;
// for debugging //
if (uv.y == .0){
c0 = vec3(1.,0.,0.);
}
//
gl_FragColor = vec4(c0, 1.0);
} -
hi I tried converting you pic into a video file .mov and put it in movie player, and same result...
-
@jg said:
when I syphon in the same image from TD, it works as expected, which leads me to believe something is happening inside picture viewer.
Very strange, I see this same behavior. I'll log this.
Best wishes,
L Wilson-Spiro
-
@jg said:
I've got some simple GLSL adapted from 'TouchDesigner that should work. However, when I import the UV map with picture viewer, the GLSL actor seems to see many of the pixels zeroed out.
You are right, I can see this too. We use the standard Mac routines for reading pictures, and it should be respecting the color profile, but maybe there's something going wrong with that. I'm investigating.
Best Wishes,
Mark -
@jg said:
I've got some simple GLSL adapted from 'TouchDesigner that should work. However, when I import the UV map with picture viewer, the GLSL actor seems to see many of the pixels zeroed out.
Alright, you have indeed discovered a bug. Pictures imported from disk may contain a color profile, and Isadora wasn't correctly locating that color profile and using it when converting the picture to a bitmap. I've fixed this in our current beta, which is the only way for you to get your hands on a fix before we release -- which is still a ways away.
Please ask @Woland to join our beta tester program and get this fix from us.
Best Wishes,
Mark -
-
@woland said:
Please send in a ticket using the link in my signature if you'd like to go this route.
FYI, the fix is in b21.
-
Great- thanks so much for looking into it! I've submitted a ticket requesting access to b21.
I'm a little nervous switching to a beta for production- would another workaround be to alter the color profile of the image?
Thanks!
: j
-
@jg said:
I'm a little nervous switching to a beta for production- would another workaround be to alter the color profile of the image?
After some additional poking around, I did find a solution.
You can see this the current color profile in Photoshop by opening the document and choosing Document Profile" from the popup menu at the bottom of the window.
The current color profile of your image is sRGB 61966 2.1 (8bpc)
You need to change this profile to Generic RGB.
Photoshop:
1) Open your image in Photoshop
2) Choose "Assign Color Profile" from the Edit menu
3) Choose "Generic RGB Profile"
4) Save the filePreview:
1) Open your image in Preview
2) Choose "Assign Profile" from the Tools menu
3) Choose "Generic RGB Profile" from the popup in the dialog and click OK
4) Save the fileHere's my test file showing this works.
Best Wishes,
Mark