Ambrosia Garden Archive
    • making Masks


      i was making sprites for a ship in my upcoming TC Nova plugin the other day, but when i tried to make the masks, i found out that i could not do it by just making every texture in the scene pure white and re-rendering, as it still shaded some areas gray because of the auto light. turning the auto light off does not work either, it makes a black scene with two white engineflares. does anyone here know an effective way of making masks for a ship? thanks!

      ------------------
      Don't go to school to learn that 2+2=4. If you do you're missing the point. Go to school to learn how to add, then figure out that 2+2=4.
      (url="http://"http://clix.to/planetvortex")The Vortex Web Page!(/url) My upcoming TC plugin for EV Nova. (url="http://"http://pub65.ezboard.com/bthevortex1240")The Vortex Forum(/url)--Everyone is welcome to come, register, and post here.

    • yes. complete your ships sprite, load it up in photoshop or some program like it. Then use the magic wand tool, set the tolerance to 0, and select the black area with it...copy this and paste it into a new image(make sure anti aliasing is off) with a white background. Save as a pict and you're done.

    • ok... an idea, but i happen to be exceptionally crappy at using the magic wand tool... plus i dont particularly want to do it 252 times per ship.

      ------------------
      Don't go to school to learn that 2+2=4. If you do you're missing the point. Go to school to learn how to add, then figure out that 2+2=4.
      (url="http://"http://clix.to/planetvortex")The Vortex Web Page!(/url) My upcoming TC plugin for EV Nova. (url="http://"http://pub65.ezboard.com/bthevortex1240")The Vortex Forum(/url)--Everyone is welcome to come, register, and post here.

    • To clarify KlngArthur's statement...

      1. Open your comleated sprite in photoshop.
      2. Select All, and copy and past into a new layer.
      3. Use the magic wand tool to delete the black(or whatever color it may be) background part of the layer.
      4. Go to Layers, Effects, Color Fill. Fill the layer with pure white.(this should turn all your ships white)
      5. Go back to the first layer and go to Layers, Effects, Color Fill. Fill it pure black.
      6. Save as PICT resource and you have your mask.

      ------------------
      It's time for a new challenge.
      (url="http://"http://homepage.mac.com/benedwards/.cv/benedwards/Public/Ares1.2/StarsAreFire%3AC4.sit-binhex.hqx")The Stars Are Fire(/url)-A TC for Ares
      ...And so the human race reached for the stars, unknowing of the dangers that awaited them...

    • Here's my procedure; it's very similar to Skyfox's but he left out a couple things that I normally do.

      1. Copy your sprite and paste it into a Photoshop document.
      2. Take the magic wand tool, turn off anti-aliasing, and set the tolerance to 0. Click a black region of your sprite.
      3. Go to the "Select" menu and choose "Similar." This will select all of the black in your image.
      4. Go to the "Select" menu again and choose "Inverse." This will select the ship in your image.
      5. Go to the "Edit" menu and choose "Fill." In the pull-down menu, choose "White" as your fill color. Click OK.
      6. Deselect.
      7. If you end up with white spots (often found in the cockpit) inside a ship in any or all of your frames, use the pencil tool set to black and fill them back in.
      8. You now have a completed mask! Save it if you wish, then copy it into your plug-in.

      Hope this helps.

      ------------------
      Mike Lee (Firebird)

    • well that helps some, but when i do this, i get a bunch of extra black space that i dont want--not just little dots, big chunks of black. anybody got any ideas?

      ------------------
      Don't go to school to learn that 2+2=4. If you do you're missing the point. Go to school to learn how to add, then figure out that 2+2=4.
      (url="http://"http://clix.to/planetvortex")The Vortex Web Page!(/url) My upcoming TC plugin for EV Nova. (url="http://"http://pub65.ezboard.com/bthevortex1240")The Vortex Forum(/url)--Everyone is welcome to come, register, and post here.

    • Quote

      Originally posted by Planet_Buster:
      **well that helps some, but when i do this, i get a bunch of extra black space that i dont want--not just little dots, big chunks of black. anybody got any ideas?

      **

      Hmm, I don't think these are actually black -- they're probably reeely reeely dark shades of gray and other colors. You could probably fix this by increasing the tolerance level on your magic wand. If all else fails, you can always zoom in and use the pencil (that's what I used to do).

      Also, one thing I'd make sure of is that your graphic is at 256 colors before you make your mask, if you haven't already, as that might help prevent (but not eliminate) your obtaining of some of the colors that are a fraction of a shade lighter than black.

      ------------------
      Mike Lee (Firebird)

    • I just use the magic wand tool on the black area in claris/apple works and voila!

    • Quote

      Originally posted by Firebird:
      Also, one thing I'd make sure of is that your graphic is at 256 colors before you make your mask, if you haven't already, as that might help prevent (but not eliminate) your obtaining of some of the colors that are a fraction of a shade lighter than black.
      (/B)

      Actually, I find that it's easier to make the mask before you convert to 256 colours. I mean, if you have a ship that is very dark, when you convert it to 256 colours some of the darkest shades on the ship might be converted to black: the same black as the background. On the other hand, when the image is in thousands or millions of colours, they'll be very dark shades but not quite the same as the background, so a magic wand with 0 tolerance ought to be able to distinguish between the two.
      I've had many times when I've rendered and assembled all the sprites for a ship, only to find myself selecting half of the &^%*! thing when I try to make the mask, usually because I forgot to do it before I reduced the colours. 🙂

      ------------------
      "Only two things are infinite -- the universe and
      human stupidity, and I'm not sure about the universe."
      Albert Einstein

    • Quote

      Originally posted by Sephyr:
      **Actually, I find that it's easier to make the mask before you convert to 256 colours. I mean, if you have a ship that is very dark, when you convert it to 256 colours some of the darkest shades on the ship might be converted to black: the same black as the background. On the other hand, when the image is in thousands or millions of colours, they'll be very dark shades but not quite the same as the background, so a magic wand with 0 tolerance ought to be able to distinguish between the two.
      I've had many times when I've rendered and assembled all the sprites for a ship, only to find myself selecting half of the &^%*! thing when I try to make the mask, usually because I forgot to do it before I reduced the colours. 🙂

      **

      Let's not forget step "0":

      Render without background. No star fields, no floor, no backdrop, no sky dome (however your ap handles it). There are always ways of rendering a pure black background -- but it depends on the application how to achieve it.

      ------------------
      everywhere else, it's --
      "Nomuse"

    • Quote

      Originally posted by Sephyr:
      **Actually, I find that it's easier to make the mask before you convert to 256 colours. I mean, if you have a ship that is very dark, when you convert it to 256 colours some of the darkest shades on the ship might be converted to black: the same black as the background. On the other hand, when the image is in thousands or millions of colours, they'll be very dark shades but not quite the same as the background, so a magic wand with 0 tolerance ought to be able to distinguish between the two.
      I've had many times when I've rendered and assembled all the sprites for a ship, only to find myself selecting half of the &^%*! thing when I try to make the mask, usually because I forgot to do it before I reduced the colours. 🙂

      **

      Hmm, I disagree. Though it might be easier, if you do it before conversion, it's not as accurate. With the kinds of colors we're talking about, it probably doesn't matter, but I'll explain what I mean anyway.

      Say we take an example -- like if you remade the Rapier for example. You render your images and assemble them into sprites. If you make your mask before converting to 256 colors, you only take the stuff that's pure black. Then you convert to 256 colors and some of the really dark stuff turns black. So there's a bit of extra material outlining the ship when you're done (it's not visible unless your ship decides to go around a planet; then you'll see a black outline).

      Now if you took that same sprite and converted it to 256 colors beforehand, now that really dark stuff around the ship oes away, but then portions of your cockpit turn black. You make your mask. Your outline goes away, but now you have white spots in your cockpit. Personally, I don't find this difficult to fix; you just have to fill in a few white spots in the middle of your image. I guess it depends on how you feel about the task -- if you want to take an extra minute to fill stuff in (if you need to fill stuff in) in exchange for a more accurate sprite, you might as well convert to 256 colors first. And there's no guarantee that, if you don't convert to 256 colors, that stuff in the middle of your ship isn't black already.

      ------------------
      Mike Lee (Firebird)

    • Quote

      Originally posted by Firebird:
      **I guess it depends on how you feel about the task -- if you want to take an extra minute to fill stuff in (if you need to fill stuff in) in exchange for a more accurate sprite, you might as well convert to 256 colors first. And there's no guarantee that, if you don't convert to 256 colors, that stuff in the middle of your ship isn't black already.
      **

      I think it depends more on what colour your ship is. With something like the rapier, as you were using as an example, there's not a lot of black or very dark colours on the ship apart from the cockpit. With something like that you can easily get away with doing the mask after converting to 256. With a ship that's darker (like one of the Polaris vessels from EVN, for example), you'd end up converting a lot of the ship to the same black as the background if you did that, and manually fixing all 36 images in the mask would be a royal pain in the a$$. 🙂

      ------------------
      "Only two things are infinite -- the universe and
      human stupidity, and I'm not sure about the universe."
      Albert Einstein

    • Quote

      Originally posted by Firebird:
      **Hmm, I disagree. Though it might be easier, if you do it before conversion, it's not as accurate. With the kinds of colors we're talking about, it probably doesn't matter, but I'll explain what I mean anyway.

      Say we take an example -- like if you remade the Rapier for example. You render your images and assemble them into sprites. If you make your mask before converting to 256 colors, you only take the stuff that's pure black. Then you convert to 256 colors and some of the really dark stuff turns black. So there's a bit of extra material outlining the ship when you're done (it's not visible unless your ship decides to go around a planet; then you'll see a black outline).

      Now if you took that same sprite and converted it to 256 colors beforehand, now that really dark stuff around the ship oes away, but then portions of your cockpit turn black. You make your mask. Your outline goes away, but now you have white spots in your cockpit. Personally, I don't find this difficult to fix; you just have to fill in a few white spots in the middle of your image. I guess it depends on how you feel about the task -- if you want to take an extra minute to fill stuff in (if you need to fill stuff in) in exchange for a more accurate sprite, you might as well convert to 256 colors first. And there's no guarantee that, if you don't convert to 256 colors, that stuff in the middle of your ship isn't black already.

      **

      Well, I set my selection tool at the lowest tolerance I can get away with, and that takes care of most of it. Is a non-issue, mostly, tho; if there is a thin dark line around your ship that isn't masked, it will only be briefly visible as you cross on top of other objects. Against the black game background it doesn't show at all.

      In all honesty, tho, I disliked the look of my ships vanishing into the background on the "shadow" side so I always hit them with a rimlight when I rendered. (Dark blue or purple, nearly parallel to picture plane, opposite main light source).

      ------------------
      everywhere else, it's --
      "Nomuse"

    • Personally I take the model and use brightness and contrast and the curves tools to make the definition really good then I change to black and white, do it a bit more and use that.

      ------------------
      --sitharus
      (url="http://"http://www.damnsw.net/~triplet/forums/")Carracho Help - Updated, upgraded and better!(/url)
      EV Development IRC channel: #evdev on irc.ambrosia.net
      Insults are the arguments employed by those who are in the wrong. Jean-Jacques Rousseau

    • Quote

      Originally posted by blackhole:
      **Personally I take the model and use brightness and contrast and the curves tools to make the definition really good then I change to black and white, do it a bit more and use that.

      **

      Oops. I've gotten so into the habit of hitting those levels I forgot that was part of my work-process. I just looked over the early posts in this thread -- why is someone doing this to 256 images? Should be 36 per ship, and moreso, I only once made the mistake of creating the masks first. Is much easier to put together the sprite first, then make a mask for the whole mess.

      ------------------
      everywhere else, it's --
      "Nomuse"

    • Quote

      Originally posted by Commander Arashi:
      **Oops. I've gotten so into the habit of hitting those levels I forgot that was part of my work-process. I just looked over the early posts in this thread -- why is someone doing this to 256 images? Should be 36 per ship, and moreso, I only once made the mistake of creating the masks first. Is much easier to put together the sprite first, then make a mask for the whole mess.

      **

      Uh, who's making 256 images? No developer in his right mind would make a 256-image sprite.

      As far as the levels go, yes, that's another good way; I just prefer the magic wand way because I know it's 100% accurate. It can get to be a pain sometimes though, so it's probably not as good in that regard.

      ------------------
      Mike Lee (Firebird)

    • I think he means this:

      Quote

      Originally posted by Planet_Buster:
      **ok... an idea, but i happen to be exceptionally crappy at using the magic wand tool... plus i dont particularly want to do it 252 times per ship.
      **

      Don't ask me why you need to do it 252 times per ship, though: you only ever need to do it once, on the assembled 6x6 sprite.

      ------------------
      "Only two things are infinite -- the universe and
      human stupidity, and I'm not sure about the universe."
      Albert Einstein

    • Um, I don't mean to sound like a smartass or anything, but why not just render with an alpha channel? It is an option in every 3d application I have ever come across, and will make a perfect mask every time.

      Here is another cute little trick (you might know this one): Render your ship's complete rotation at 30fps to a targa sequence or quicktime movie. Open it in premiere and export it as a filmstrip at the same frame rate. Whoila, instant sprite. Although, you may need to rearange them slightly, I don't remember exactly how EV views sprites.

      -tm

    • Quote

      Originally posted by tumblemonster:
      **Um, I don't mean to sound like a smartass or anything, but why not just render with an alpha channel? It is an option in every 3d application I have ever come across, and will make a perfect mask every time.

      Here is another cute little trick (you might know this one): Render your ship's complete rotation at 30fps to a targa sequence or quicktime movie. Open it in premiere and export it as a filmstrip at the same frame rate. Whoila, instant sprite. Although, you may need to rearange them slightly, I don't remember exactly how EV views sprites.

      -tm**

      I'm not sure why we didn't bother mentioning this. Probably for the same reason we didn't mention P2S and M2S -- which make a mask automatically when converting pict sequence/QuickTime movie to sprites. Oh; and I believe they also do the color depth correction automatically.

      Myself, I get the best results in PhotoShop and it take about 30 seconds. Plus I'm there anyway, tweaking the image.

      ------------------
      everywhere else, it's --
      "Nomuse"

    • Render your ship with the color you want, save the movie, go back, render again, don't change anything, except increase the ambient light to 100% and maybe add another light source if you somehow still have dark areas, render this as a movie, make both movies into sprites, but use the color from the first one and the mask from the second one.