Tastenkunst / brfv4_javascript_examples

BRFv4 - HTML5/Javascript - examples project. Reference implementation for all other platform example packages.
463 stars 148 forks source link

Color-libs : Change of color on the lips. #61

Closed akshajb closed 5 years ago

akshajb commented 5 years ago

Hey. So I am using the color-libs example, and changing the colour from orange to something else on the lips. But the colour that I give and the colour being rendered have minuscule difference. Any idea how to fix that?

akshajb commented 5 years ago

Even the default example doesn't match the EXACT colour that's being rendered.

MarcelKlammer commented 5 years ago

That has nothing to do with the tracking, I guess. It's canvas related if anything else.

akshajb commented 5 years ago

Thank you for the quick response, stuck in a pinch situation here.

draw.drawTriangles( face.vertices, libTriangles, false, 1.0, color, opacity); draw.fillTriangles( face.vertices, libTriangles, false, color, opacity);

this "color" and the color that renders, are slightly off. Even the oranges in the default example are off " 0x00a0ff".

I am using Eye Dropper chrome extension to check the values

MarcelKlammer commented 5 years ago

And the opacity is set to 1? If not, the color is transparent.

akshajb commented 5 years ago

Yes. The opacity is hardcoded right now to 1.

MarcelKlammer commented 5 years ago

Well then it's most likely the antialised drawing I guess. Try to draw a large rect, eg. 100x100 and take the color from the center... I think you will have to live with canvas not rendering perfect colors

akshajb commented 5 years ago

Oh so the colors won't be perfect? also what is the clear parameter used for ?

MarcelKlammer commented 5 years ago

clearing the canvas I guess.

akshajb commented 5 years ago

clearing the canvas before every draw? the changing it from false to true does not really affect anything visually, so was curious

MarcelKlammer commented 5 years ago

I have no idea, the code is 2 years old and I'm currently working on the release of BRFv5.

akshajb commented 5 years ago

Thank you for your help.