Fri, Nov 29, 7:04 PM CST

Renderosity Forums / Poser - OFFICIAL



Welcome to the Poser - OFFICIAL Forum

Forum Coordinators: RedPhantom

Poser - OFFICIAL F.A.Q (Last Updated: 2024 Nov 29 7:57 am)



Subject: Transparency in Gaming Bitmaps


Acumen ( ) posted Wed, 20 November 2002 at 3:46 PM · edited Fri, 29 November 2024 at 6:29 PM

This should probably go in the Game Development section, but this forum is clearly where the action is. :) Excuse me if I over-explain my point, but I know this isn't a programmer's forum and I want to make myself clear. I'm using Poser 4 to create pre-rendered bitmaps of character sprites in a non-commercial game demo I'm developing in VC++. I have to specify a particular RGB value as a transparency mask, in much the same way as a particular tint is filtered out in chromatography (I'm currently using a magenta background (255:0:255), as it's a pretty rare colour). This works fine if I don't anti-alias the render (but obviously there's a substantial drop in image quality, which I'd like to avoid). But if I use anti-aliasing, the edge of the character becomes smoothed against the magenta background, and I wind up with a one pixel thick purple outline around the character. So, ultimately: is it possible to anti-alias a model in Poser without anti-aliasing the backdrop? Or can you think of another way of getting around this? Unfortunately, cleaning up after myself in postwork isn't an option, because I need to create a vast number of different character animations, and touching up each file manually would be enormously time-consuming (we are, after all, talking 30fps). I already paste a silhouette of the figure onto the background before rendering, so that I can keep the fake foot shadow that Poser produces in my final render, so adapting this silhouette figure is probably my best option. I've experimented with adjusting the camera settings to perhaps create an artificial outline by making a slightly larger background figure, but this gives rather mixed results. Anyone have any other ideas? Oh, and while I'm here (this is my first post to the forum, despite owning Poser for several months), I'd like to thank the community for their endless generosity. It's a pleasure to come home from work and find all sorts of cool new quality goodies in the freestuff section. And while I'm on the subject, I've seen an excellent set of bracelets/collar credited to BlackGazza in a number of gallery shots, which were apparently freely available at some stage (presumably long before I got started here, as I can't find them anywhere), which looked ideal for one of my punk characters. Apparently he made a whole set of those? Would anyone know where I might be able to get hold of them now? As they're apparently bondage items, I've even risked dipping into more "exotic" sites like Thralldom and Renderotica in my search, but they don't seem to be available there either. Could anybody shed some light on this please?


VIDandCGI ( ) posted Wed, 20 November 2002 at 5:18 PM

use the mask channels either in Tiff format or if you check some codecs also support this.


ToolmakerSteve ( ) posted Wed, 20 November 2002 at 6:46 PM

I haven't quite thought through your situation, but here is how I sometimes anti-alias for still shots: Render at 2x or larger. Reduce to desired size in Photoshop. -- ToolmakerSteve


ToolmakerSteve ( ) posted Wed, 20 November 2002 at 6:48 PM

Sorry, just to make that clear: Do a 2x render WITHOUT anti-alias, so that you will have sharp separation from background. Then you can do whatever you want using some external tool such as Photoshop :) -- ToolmakerSteve


Ajax ( ) posted Wed, 20 November 2002 at 11:12 PM

I know exactly what you're talking about since I've tried to make game graphics too. If the backgrounds of your game are mostly going to be dark, render over a black background. You can replace the pure black with magenta later with a paint bucket operation. Your sprite will have a blackish outline, but it won't be so noticable against the dark background. If your backgrounds are going to be varied colours then you may just have to put up with pixelation. I'm not sure, but I think the way proffessional game programers most often do it is they use fast advanced anti-aliasing operations to smooth the pixelated sprite against the background during gameplay. Some such operations may be related to alpha blending. Of course, not so many years ago, game graphics just weren't anti-aliased at all.


View Ajax's Gallery - View Ajax's Freestuff - View Ajax's Store - Send Ajax a message


Taylor4 ( ) posted Thu, 21 November 2002 at 10:35 AM

I've had the same problem you have. I don't think many games are anti-aliased now. You can force the video card to do it but at the expense of speed. I generally don't antialias character sprites. But if you do, I suggest rendering over a dark grey background. Then make the sprites transparent part (the background) black which will leave a dark grey outline around the character, however against most backgrounds it won't be very noticable. If I'm creating a multi-layerd screen with transparentcy I render the layered part against a color that closely matches what its going to be in front of that seems to work quite well. But if your character is going to be in front of many different colors it won't work. It would be nice if we could just anti-alias the inside of the characters, and not the outer edges.


bikermouse ( ) posted Sat, 23 November 2002 at 7:50 AM

Use Green(0,255,0) instead of magenta. AntiAlias OFF! LLLLArge resolution render. done - simple!


Acumen ( ) posted Sat, 23 November 2002 at 3:40 PM

Thanks for all the ideas, guys. I posted a reply a couple of days ago, discussing the pros and cons of each suggestion in turn. But it seems to have gone AWOL, so I'll give you the short version. A number of the same ideas were repeated in different ways, so here's the summary: * Render non-antialiased at an increased resolution, then scale in postwork: I've had a crack at this, but came up against a bit of a wall. How would I reduce the image size without using antialiasing the document, as it seems to blend the edges anyway when I reduce the image? Unfortunately I use PSP rather than PhotoShop. While it's effective, it does mean I have to rescale each frame manually, which could be rather time-consuming. * Use a different transparent colour, like black, and then let the edges blend naturally: I originally started off using pure black (0,0,0) as my transparent colour, but this proved to be a very bad idea, as the game uses a gothic/noir setting, very dark and shadowy. So making black a forbidden colour wasn't very effective. Bikermouse, why do you advocate green over magenta? * Use hardware anti-aliasing: Not only do I have no clue how to do it, but my code is currently so badly optimised that I don't think it could take the strain at run-time. :) One other idea that works well is to use the Cartoon w/ Line for the backdrop picture instead of Silhouette. This creates an outline around the figure (in addition to dropping the foot shadows), thus separating the magenta background and the figure from within Poser, while still allowing me to anti-alias. The only drawback is that I'm then stuck with the outline itself. I can edit this out in postwork quite easily, but the ideal would be if I could turn the outline colour to magenta, and then it would blend seamlessly with the background. Unfortunately, its colour seems to be fixed to a dark grey (15,15,15), and doesn't seem to adjust if any of the configurable colours (foreground, background, shadow or floor) are modified. I don't suppose there's any other way to tweak this outline colour from within Poser? If so, this would be the perfect solution. But thanks again for the brainstorming session. This has given me a lot of tactics to try out. As for those requested props, I thought it might help if I gave you an example of what I was looking for. If you do a search for BlackGazza in the 'Rosity Poser Art Gallery, the first three images that come up show off the items to good effect. It looks like it was originally released as one free package (collar, two bracelets, belt, not sure what else). I presume that, based on typical terms of redistribution, it wouldn't be legal for someone else who's previously downloaded the props to email them to me, if the original author has moved on and can't be contacted?


bikermouse ( ) posted Sun, 24 November 2002 at 11:46 AM

Acumen, %100 Green is the recommended color as it is seldom used. As for the shrinkage problem. As I said TURN ANTIALIASING OFF. Also - try a smaller image - it's a freebe at PC Plus. I think you're trying to make something simple into something hard. Why do we all do this? The answers are out there and most of them are simple. You should do a google on OpenGL and find the OpenGL Homepage. Many of your answers are there. You should also read the works of Dave Roberts and Andre Le Mothe regarding game programming before you proceed too much further. good luck with your project, - TJ


Acumen ( ) posted Sun, 24 November 2002 at 1:44 PM

Shrinkage: Sorry, I didn't explain myself very well. What I meant was that anti-aliasing was off for the render, but it was being antialiased by the graphic editor when I scaled the image. Posting that issue was pure laziness on my part. I should have just pulled out my PSP manual to find out how to toggle this. Thanks for the OpenGL link. I'll check it out. I've been reading articles in gamedev.net and gamasutra, so I can add this to the list. I know it sounds like I'm making a mountain out of a molehill with this topic, but I've had to re-render my animations a couple of times already due to new ideas I came across, so I thought I'd finetune my technique before getting any further, and spend the minimum amount of time fixing up images after rendering. I've been learning DirectX programming from Andre La Mothe's TOTWGP book over the last few months. Unfortunately, advice on Poser was curiously absent. :)


Privacy Notice

This site uses cookies to deliver the best experience. Our own cookies make user accounts and other features possible. Third-party cookies are used to display relevant ads and to analyze how Renderosity is used. By using our site, you acknowledge that you have read and understood our Terms of Service, including our Cookie Policy and our Privacy Policy.