Announcement: Be excellent to each other.


Caravel Forum : DROD Boards : Bugs : Shading Characters with custom GFX
New Topic New Poll Post Reply
Poster Message
skell
Level: Legendary Smitemaster
Avatar
Rank Points: 3734
Registered: 12-28-2004
IP: Logged

File: Drod Bug.JPG (2.4 KB)
Downloaded 387 times.
License: Public Domain
icon Shading Characters with custom GFX (0)  
When I have custom character in not fully lit room, it looks weird (Look at Attached screen). Instead of only the graphic being shadded, the transparent part is shaded too.

The Image:
Click here to view the secret text


The graphic of character is in PNG, with Alpha channel shading. I think I tried every combination of transparency in PNG format, but nothing seemed to work - that's why I post about it here.

____________________________
My website | Facebook | Twitter

[Last edited by skell at 01-29-2012 08:27 PM : Going to the keep]
04-06-2007 at 08:29 PM
View Profile Send Private Message to User Send Email to User Visit Homepage Show all user's posts High Scores This architect's holds Quote Reply
skell
Level: Legendary Smitemaster
Avatar
Rank Points: 3734
Registered: 12-28-2004
IP: Logged

File: Test Hold.hold (3.2 KB)
Downloaded 36 times.
License: Public Domain
icon Re: Shading Characters with custom GFX (0)  
And here I post a test hold if you want to see it for yourself.
All I did here was to create new character, import graphic, and put them around level.

____________________________
My website | Facebook | Twitter

[Last edited by skell at 01-29-2012 08:27 PM : Going to the keep]
04-06-2007 at 08:34 PM
View Profile Send Private Message to User Send Email to User Visit Homepage Show all user's posts High Scores This architect's holds Quote Reply
vittro
Level: Smiter
Avatar
Rank Points: 479
Registered: 04-17-2005
IP: Logged
icon Re: Shading Characters with custom GFX (0)  
Oh,yes I noticed this. It's very boring, because all the invisible walls you make are visible with darkness...

____________________________
http://vittorioromeo.info
04-06-2007 at 09:11 PM
View Profile Send Private Message to User Send Email to User Visit Homepage Show all user's posts This architect's holds Quote Reply
skell
Level: Legendary Smitemaster
Avatar
Rank Points: 3734
Registered: 12-28-2004
IP: Logged
icon Re: Shading Characters with custom GFX (+1)  
*Thud* 'Our only witness confirmed, that he saw Skell hitting his desk using his head, or to be more precise his forehead...Or else!'

Anyway, I've managed to fix the problem with custom shading. The background has to be rgb 192,192,192 - I've found something about this while reading Forum.

Though I think this should be in help file, so people won't get anymore problems with this. And adding help link, in character menu, to the designated part of help file.

____________________________
My website | Facebook | Twitter

[Last edited by skell at 01-29-2012 08:27 PM : Going to the keep]
04-09-2007 at 08:22 AM
View Profile Send Private Message to User Send Email to User Visit Homepage Show all user's posts High Scores This architect's holds Quote Reply
coppro
Level: Smitemaster
Rank Points: 1308
Registered: 11-24-2005
IP: Logged
icon Re: Shading Characters with custom GFX (0)  
skell wrote:
Anyway, I've managed to fix the problem with custom shading. The background has to be rgb 192,192,192 - I've found something about this while reading Forum.
Wrong. As of version 3.0, DROD now supports PNG transparency as well. This is documented.
04-09-2007 at 08:25 AM
View Profile Show all user's posts Quote Reply
skell
Level: Legendary Smitemaster
Avatar
Rank Points: 3734
Registered: 12-28-2004
IP: Logged
icon Re: Shading Characters with custom GFX (0)  
This IS documented but doesn't work well with shadows, darkness and all that new candy-eyes. Look at the screenshot I've made:


You see the problem?

It however works fine if the background is RGB 192,192,192.

____________________________
My website | Facebook | Twitter

[Last edited by skell at 01-29-2012 08:27 PM : Going to the keep]
04-09-2007 at 09:12 AM
View Profile Send Private Message to User Send Email to User Visit Homepage Show all user's posts High Scores This architect's holds Quote Reply
mrimer
Level: Legendary Smitemaster
Avatar
Rank Points: 5058
Registered: 02-04-2003
IP: Logged
icon Re: Shading Characters with custom GFX (0)  
skell wrote:
This IS documented but doesn't work well with shadows, darkness and all that new candy-eyes. Look at the screenshot I've made:


You see the problem?

It however works fine if the background is RGB 192,192,192.

Keep Going
-Maurice Z.
Yeah...it's safe to say that alpha transparency isn't supported for operations like darkness shading. Maybe it'll get patched some day, but just use 192-gray for the transparency mask at this point.

____________________________
Gandalf? Yes... That's what they used to call me.
Gandalf the Grey. That was my name.
I am Gandalf the White.
And I come back to you now at the turn of the tide.
04-10-2007 at 05:10 PM
View Profile Send Private Message to User Send Email to User Show all user's posts High Scores This architect's holds Quote Reply
vittro
Level: Smiter
Avatar
Rank Points: 479
Registered: 04-17-2005
IP: Logged
icon Re: Shading Characters with custom GFX (0)  
I tried 192 192 192 but it doesn't work... It shows up as gray in the game.

____________________________
http://vittorioromeo.info
04-10-2007 at 06:48 PM
View Profile Send Private Message to User Send Email to User Visit Homepage Show all user's posts This architect's holds Quote Reply
eytanz
Level: Smitemaster
Avatar
Rank Points: 2708
Registered: 02-05-2003
IP: Logged
icon Re: Shading Characters with custom GFX (0)  
Is at least one of the corners transparent? Transparency doesn't work if none of the 4 corners are the transparent color.

____________________________
I got my avatar back! Yay!
04-10-2007 at 06:51 PM
View Profile Send Private Message to User Show all user's posts This architect's holds Quote Reply
vittro
Level: Smiter
Avatar
Rank Points: 479
Registered: 04-17-2005
IP: Logged
icon Re: Shading Characters with custom GFX (0)  
What do you mean by corner? I made one pixel transparent in the NW corner of the image, but it doesnt work...

____________________________
http://vittorioromeo.info
04-10-2007 at 06:56 PM
View Profile Send Private Message to User Send Email to User Visit Homepage Show all user's posts This architect's holds Quote Reply
eytanz
Level: Smitemaster
Avatar
Rank Points: 2708
Registered: 02-05-2003
IP: Logged
icon Re: Shading Characters with custom GFX (0)  
That should work, in principle at least. Not sure what the problem is, then.

(note - I meant one corner or each tile, not of the image that contains them, just in case that was not obvious).

____________________________
I got my avatar back! Yay!

[Last edited by eytanz at 04-10-2007 07:07 PM]
04-10-2007 at 07:07 PM
View Profile Send Private Message to User Show all user's posts This architect's holds Quote Reply
vittro
Level: Smiter
Avatar
Rank Points: 479
Registered: 04-17-2005
IP: Logged
icon Re: Shading Characters with custom GFX (-1)  
Here's the image, sorry for the copyright, after you see it, delete it.

____________________________
http://vittorioromeo.info
04-10-2007 at 07:12 PM
View Profile Send Private Message to User Send Email to User Visit Homepage Show all user's posts This architect's holds Quote Reply
mrimer
Level: Legendary Smitemaster
Avatar
Rank Points: 5058
Registered: 02-04-2003
IP: Logged
icon Re: Shading Characters with custom GFX (0)  
vittro wrote:
Here's the image, sorry for the copyright, after you see it, delete it.
Please stop posting Caravel sprites. It should be just as easy for you to report a bug using your own, hand-drawn images as it is to show it with ripped images.

____________________________
Gandalf? Yes... That's what they used to call me.
Gandalf the Grey. That was my name.
I am Gandalf the White.
And I come back to you now at the turn of the tide.
04-10-2007 at 07:40 PM
View Profile Send Private Message to User Send Email to User Show all user's posts High Scores This architect's holds Quote Reply
vittro
Level: Smiter
Avatar
Rank Points: 479
Registered: 04-17-2005
IP: Logged

File: image.png (392 bytes)
Downloaded 67 times.
License: Public Domain
icon Re: Shading Characters with custom GFX (+1)  
Here's the image. When I put it in game ( as a custom npc ) the 192 192 192 shows up as gray.

____________________________
http://vittorioromeo.info
04-10-2007 at 07:51 PM
View Profile Send Private Message to User Send Email to User Visit Homepage Show all user's posts This architect's holds Quote Reply
mrimer
Level: Legendary Smitemaster
Avatar
Rank Points: 5058
Registered: 02-04-2003
IP: Logged
icon Re: Shading Characters with custom GFX (0)  
eytanz wrote:
Is at least one of the corners transparent? Transparency doesn't work if none of the 4 corners are the transparent color.
By the way, it doesn't work this way in 3.0.0. DROD now checks whether any of the pixels are 192-gray, not just the four corners.
vittro wrote: When I put it in game ( as a custom npc ) the 192 192 192 shows up as gray.
Thanks. I've fixed it so DROD will now display 192-gray pixels in your alpha-layered image transparently (in 3.0.2).

____________________________
Gandalf? Yes... That's what they used to call me.
Gandalf the Grey. That was my name.
I am Gandalf the White.
And I come back to you now at the turn of the tide.

[Last edited by mrimer at 04-24-2007 03:44 AM]
04-24-2007 at 03:43 AM
View Profile Send Private Message to User Send Email to User Show all user's posts High Scores This architect's holds Quote Reply
vittro
Level: Smiter
Avatar
Rank Points: 479
Registered: 04-17-2005
IP: Logged
icon Re: Shading Characters with custom GFX (0)  
Mike, you did a really good work, but, the images with alpha background don't work anymore! I had an hold with 22 custom tiles imported... And I lost some of the source files...

____________________________
http://vittorioromeo.info
04-27-2007 at 02:47 PM
View Profile Send Private Message to User Send Email to User Visit Homepage Show all user's posts This architect's holds Quote Reply
New Topic New Poll Post Reply
Caravel Forum : DROD Boards : Bugs : Shading Characters with custom GFX
Surf To:


Forum Rules:
Can I post a new topic? No
Can I reply? No
Can I read? Yes
HTML Enabled? No
UBBC Enabled? Yes
Words Filter Enable? No

Contact Us | CaravelGames.com

Powered by: tForum tForumHacks Edition b0.98.8
Originally created by Toan Huynh (Copyright © 2000)
Enhanced by the tForumHacks team and the Caravel team.