Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / LoadImage draws black pixels

Author
Message
BraindeaD
16
Years of Service
User Offline
Joined: 30th Mar 2008
Location:
Posted: 19th Aug 2012 14:16
Hi all,
I'm using TIER 1 and I load all the images with bBlackToAlpha option (last parameter) set to 1.
When I draw an image in windows all works well (black pixels aren't drawn) but in mac black pixels are drawn. Am I doing something wrong?

Attached is one of the graphics.

Thanks in advance.

Attachments

Login to view attachments
Rich Dersheimer
AGK Developer
15
Years of Service
User Offline
Joined: 1st Jul 2009
Location: Inside the box
Posted: 19th Aug 2012 16:52 Edited at: 19th Aug 2012 17:08
Some things to consider...

It's better to use .png files where the part you want transparent is actually transparent. It might be a lot of work to take your images into a paint program and remove the black, but it looks better if you can do it.

Posting a small section of code that shows the problem will help in troubleshooting. When you do post code, be sure to use the code and /code tags, enclosed in brackets.



Are you using Tier 1 or Tier 2? Are you compiling in Xcode? Or are you using the player on the Mac? Or the viewer?

EDIT: okay, I just tested using the bBlackToAlpha flag, and the black is NOT being made transparent on my iPad, so this one is probably an AppGameKit bug.

BraindeaD
16
Years of Service
User Offline
Joined: 30th Mar 2008
Location:
Posted: 19th Aug 2012 17:08 Edited at: 19th Aug 2012 17:11
Hi Rick,
thanks for the tips. I'm using Tier 1. I'm compiling my own app in Xcode 4.3.3 following the Ancient Lady's guide to get the app.
I figure that is better use transparency in transparent parts but I must convert more than 1000 animation frames, it's too hard. I got these frames taking photos from FPSC models with a software I did in DBPro that currently doesn't support alpha channel... so I put black pixels in transparent parts.

I'm using:



and



It works well on windows, so maybe it's a bug of mac version...
Rich Dersheimer
AGK Developer
15
Years of Service
User Offline
Joined: 1st Jul 2009
Location: Inside the box
Posted: 19th Aug 2012 18:48 Edited at: 19th Aug 2012 20:05
Yah, I think it's a bug with both Mac and iOS.

One thing you might try...

In the windows version, load in each image (a for-next loop will work well) with the bBlackToAlpha flag set to 1. Then re-save the image with a new filename structure, as .png files.

That will save them all back out with transparency.

But...

If that file you attached in your first post is an example, you are going to get some fringing pixels that are not true black, so you will still get a much better result with images that are on a transparent background.

There are batch image commands in many paint programs that will let you automate removing the black pixels in large sets of images. If you don't have access to one of those, I'd be happy to do that for you.

Okay, it really is possible to save a .png with transparency in DBPro, so what follows is cool, but not really needed.

Use something like this:




EDIT:

Here's a cool way to roll your own... Render and save an image once in DBPro using



then render and save the same image using



to get a "white on black" version of the pose.

Then, either using 3rd party plugins for DBPro, or in AppGameKit (!), use the second image as a mask for the first.

The command in AppGameKit is



Here's an example...



Attachments

Login to view attachments
BraindeaD
16
Years of Service
User Offline
Joined: 30th Mar 2008
Location:
Posted: 21st Aug 2012 07:54
Hi Rich,
thanks for your advice. I've tried load and saving the pngs from AppGameKit (windows) and works with the correct transparencies in Mac!
When I have some time I'll try implement the masked method in my DBPro tool to get image frames from models.
Thanks for all!!!

Best regards

Login to post a reply

Server time is: 2024-11-23 20:18:38
Your offset time is: 2024-11-23 20:18:38