Jump to content
  • Advertisement
Sign in to follow this  
xexuxjy

svg no-anti aliasing / xna colour mask

This topic is 1718 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Not sure if this is the best place  to ask , but was looking to get some advice /recommendations on how to do this :

 

I've created a number of selection cursors as svg images in Inkscape, this allowed me to play around with them a lot and gave me a nice editing system, I gave them all a magenta background as my aim was to use the colour masking in the XNA content exporter to convert those sections ot the image to full alpha. 

 

This all works fine, apart from the fact that when I then export them to bitmaps (png's) for use in my content project then the images are created with anti-aliasing, which means that when they're used in game there are some 'almost magenta' sections where it's tried to alias the colour mask.

 

I've tried opening the svg files in a few different editors and get the same issue (understandable as creating smooth images is one of the key points of svg) but does anyone know of a tool or system that allows you to export the image without anti-aliasing being applied? 

 

Failing that , does anyone have a better approach to this way of generating content?

 

Thanks.

 

Share this post


Link to post
Share on other sites
Advertisement
It does. I consider this color-keying a relic, you really should use a proper alpha.

Not sure if Inkscape can disable anti-aliasing for the alpha if you really want to. You probably need a different tool (try Paint.NET).

Share this post


Link to post
Share on other sites

Thanks, haven't had much luck messing round with Alpha images in inkscape but agree I'm better focusing on that rather than trying to bodge things with colour masks.

Share this post


Link to post
Share on other sites

Ok, could test it now. Easier than I remembered. Use a blank background (nothing drawn), export, done. Here with two different resolutions, alpha looks fine on both.

 

Share this post


Link to post
Share on other sites

Yup, redid them in inkscape thanks, of course I then ran into another issue where inkscape objects that had no outline  and full alpha fill were not selectable (apart from in outline view) which caused me a few issues in exporting at first :)

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!