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.

Dark GDK / Transparency on objects without loading the images first?

Author
Message
asdronin
16
Years of Service
User Offline
Joined: 10th Apr 2008
Location:
Posted: 12th Aug 2009 02:52
Hi all,
First I want to let you know that as Im still considered "new member", even though I bought the Dark GDK license (I hope some MOD could fix this soon please), well that means that my posts on this and other threads wont be seen unless you enter into the thread itself pretty frustrating indeed, so if you dont see any new post in this or other threads I started and are interested into the subject please come in and check for new post from myself as my new posts are not listed in the main board, sorry for the inconvenience and thanks for your time.

Now into the subject that Im having some trouble now, I know that if I load an object with png half transparent texture and set its transparency on, this will work, but in some cases (most of them) there is that halo around the object, and I know that this could be fixed by loading the texture all alone and then texturing the object, thats fine, but isnt there a better faster way to do that? I mean, what if I have an object that has many textures and one is the png image? lets say it could be a car, then I should go and split the object isolating the parts that have alpha aplied to them. So I wonder if there is a better method to fix this, any ideas would be greatly appreciated, thanks in advance
BMacZero
18
Years of Service
User Offline
Joined: 30th Dec 2005
Location: E:/ NA / USA
Posted: 13th Aug 2009 07:12
The new member status has nothing to do with what you've bought, it's something every new member has to go through to make sure they aren't a spam bot. After you make a certain number of useful posts, it will go away.

Can you post a picture of the "halo"? I'm not sure what you mean by that.



Lilith
16
Years of Service
User Offline
Joined: 12th Feb 2008
Location: Dallas, TX
Posted: 13th Aug 2009 17:33
I think what he's talking about is the fact that an image has to eliminate the appearance of "jaggies" (jagged edges due to individual dots being noticable by the eye) by anti-aliasing. This is typically done by filling in some of the border or near border pixels with colors that are combinations of the colors around it. If you create a picture with anti-aliasing on a black background you would tend to get slightly darker border pixels to blend with that background. But if the background is transparent and you impose the image on a white background you still see the darker pixels instead of them blending with the new background color.

I honestly don't know if this issue can be dealt with using the A channel of the border pixels or not.

Lilith, Night Butterfly
I'm not a programmer but I play one in the office
BMacZero
18
Years of Service
User Offline
Joined: 30th Dec 2005
Location: E:/ NA / USA
Posted: 13th Aug 2009 17:44
Maybe setting the "texture" parameter in dbLoadImage would stop that?



asdronin
16
Years of Service
User Offline
Joined: 10th Apr 2008
Location:
Posted: 14th Aug 2009 01:06
Quote: "The new member status has nothing to do with what you've bought, it's something every new member has to go through to make sure they aren't a spam bot. After you make a certain number of useful posts, it will go away."


Thanks BMacZero, and yes, thats why I think purchasing certain product should be associated to member approval, after all, spam bots arent buying these kind of products... =)

And sorry, I think my words were not well choosen, its maybe more like an aura effect. And you are right, forcing the gdk to not use the mipmap on the image fix that, but what Im looking for... is to fix this in the moment I load the model, as I said, if I had something like a car with 2 textures, one for the body without alpha and one for glass parts, then Im unable to apply a non mipmapped effect on the model as I cant load the image all alone and then apply it to specific model or limb, so that makes me split the model into body parts and the rest and load 2 models and so on... any idea?


Lilith, thanks for your comment and idea, I have that trouble you mentioned too, and yeah its kind of hard to fix that though, I always get a bad blend feeling but its not too bad after all, the thing is related with the mipmapping that DGDK applies to all images loaded by default.

Attachments

Login to view attachments
BMacZero
18
Years of Service
User Offline
Joined: 30th Dec 2005
Location: E:/ NA / USA
Posted: 14th Aug 2009 03:44
Quote: "Im unable to apply a non mipmapped effect on the model as I cant load the image all alone and then apply it to specific model or limb, so that makes me split the model into body parts and the rest and load 2 models and so on... any idea?"

Ah, I see. I've got a few more ideas for you. Try experimenting with dbSetObjectTransparency (try 1-8 for the transparency mode and see if any of them make a difference). If that doesn't work, try a different image format like DDS or TGA with alpha channels. PNG isn't a very good format for textures, it's great for sprites but problems can occur when using a PNG as a texture.



asdronin
16
Years of Service
User Offline
Joined: 10th Apr 2008
Location:
Posted: 14th Aug 2009 13:55
Thanks for the idea BMacZero, the fact is after trying all the flags you suggested I can see that 4 and 6 work more or less reducing that border a lot, but I can see that making transparency with those value makes also the result totally non-antialiased, so while the border I saw in the beginning is almost not noticeable, now the jaggy edges are there and.... I m wondering isnt there another command to set the antialiasing on this particular object? (reading the help I cant find any appart from that one that tells if its available)

Login to post a reply

Server time is: 2024-11-20 17:41:58
Your offset time is: 2024-11-20 17:41:58