Jump to content

Best options: Bitmap masks?


soulhuntre
 Share

Recommended Posts

Hey guys!

 

So... I have a image (a render of a 3D object) and I also have some mask images from the 3D renderer - these are black and white images that silhouette part os the render (a specific object, for instance). I can turn those into alpha channel masks if that helps.

 

What I need to do is show the render, then handle two cases...

  • When a user clicks on the image, determine what part of it he clicked on by using the masks (the masks do not overlap).
  • Have the option to overlay graphics on an object, again by clipping it with the mask.

Pixi seems to have masks - but of course those are vector masks. I could see about getting a tool to trace my bitmaps to a vector mask (svg maybe) but that seems fraught with potential errors and single pixel problems etc as all tracing can have.

 

My other option is to render each part of the image out separately to a PNG - and then composite each of those to build up the image - maybe treating each as a sprite. Would that be a better choice?

 

Ken

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...