Jump to content

  • Log In with Google      Sign In   
  • Create Account

svg no-anti aliasing / xna colour mask


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
5 replies to this topic

#1 xexuxjy   Members   -  Reputation: 653

Like
0Likes
Like

Posted 30 October 2013 - 04:46 PM

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.

 



Sponsor:

#2 phil_t   Crossbones+   -  Reputation: 4109

Like
4Likes
Like

Posted 30 October 2013 - 11:13 PM

Does Inkscape not allow you to export them as PNGs with a valid alpha channel?



#3 unbird   Crossbones+   -  Reputation: 6021

Like
1Likes
Like

Posted 31 October 2013 - 04:23 AM

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).

#4 xexuxjy   Members   -  Reputation: 653

Like
0Likes
Like

Posted 31 October 2013 - 05:54 AM

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.



#5 unbird   Crossbones+   -  Reputation: 6021

Like
0Likes
Like

Posted 01 November 2013 - 04:12 AM

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.

 

Attached Thumbnails

  • smiley2.png
  • smiley3.png

Attached Files



#6 xexuxjy   Members   -  Reputation: 653

Like
0Likes
Like

Posted 01 November 2013 - 07:30 AM

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 :)






Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS