Hi,
I'm wondering if i can use a bitmap to set alpha channel of a cone in wpf 3d :
Black = > alpha = 0 %
white => alpha = 100 % (more probably 80 % to see inside alpha difference ...)
Hi,
I'm wondering if i can use a bitmap to set alpha channel of a cone in wpf 3d :
Black = > alpha = 0 %
white => alpha = 100 % (more probably 80 % to see inside alpha difference ...)
WPF doesn't have any built-in mechanism for this. I think the easiest way is to:
Steps 2-4 are all extremely easy. Step 1 may be difficult from the standpoint of selecting an appropriate third-party bitmap tracing library and figuring out any P/Invoke or COM Interop required to call it from C#. Use BitmapSource.CopyPixels to get the bits to pass to the libraray and construct the Geometry from the result by drawing on an open StreamGeometry (StreamGeometry.Open).
Hi,
I've found a way to do what i want ...
I take each pixel of a bitmap and make a solidbrushcolored polygon with it (only if the pixel is not black to see color or white better ) !
But because of performance issue i've choose to rezize it to 32 x 32 !
To give a light effect i've use a emmitive material.
But it looks a bit pixellized .. and i'm afraid of using so much polygon to just one bitmap ... any idea ???