Map Database  •  FAQ  •  RSS  •  Login

Shadow converter

<<

GreatWhiteBear

Knight

Posts: 578

Joined: 13 Sep 2011, 22:00

Location: The Netherlands

Post 12 Jan 2012, 16:52

Re: Shadow converter

yeah, not a hot summer, not a cold winter.
I think the average is about 13degrees Celsius.
<<

Krom

User avatar

Knights Province Developer

Posts: 3280

Joined: 09 May 2006, 22:00

KaM Skill Level: Fair

Location: Russia

Post 13 Jan 2012, 05:30

Re: Shadow converter

@Lewin: You right.

Although it would be interesting to test, with fuzziness gong from 0 to e.g. 5px (as on screens)
Knights Province at: http://www.knightsprovince.com
KaM Remake at: http://www.kamremake.com
Original MBWR/WR2/AFC/FVR tools at: http://krom.reveur.de
<<

Lewin

User avatar

KaM Remake Developer

Posts: 3822

Joined: 16 Sep 2007, 22:00

KaM Skill Level: Skilled

ICQ: 269127056

Website: http://lewin.hodgman.id.au

Yahoo Messenger: lewinlewinhodgman

Location: Australia

Post 13 Jan 2012, 12:24

Re: Shadow converter

Although it would be interesting to test, with fuzziness gong from 0 to e.g. 5px (as on screens)
I still think it would end up looking tacky, but I'm happy to look at an example screenshot and reconsider.
<<

kocsis1david

Crossbowman

Posts: 204

Joined: 12 Mar 2011, 23:00

KaM Skill Level: Skilled

Location: Hungary

Post 22 Jan 2012, 11:46

Re: Shadow converter

I've updated it (http://dl.dropbox.com/u/28475953/KaM/Ka ... nverter.7z):
ImageImage

Now there are 3 settings in "settings.txt":
1st: Shading level
2nd: Blurness
3rd: Sharpness in low distances, if you set it to 0, there won't be distance-dependent shadows
<<

Krom

User avatar

Knights Province Developer

Posts: 3280

Joined: 09 May 2006, 22:00

KaM Skill Level: Fair

Location: Russia

Post 22 Jan 2012, 13:39

Re: Shadow converter

Tree looks great :)
Is it possible to smooth out house outlines, so they would be not as jaggy?
Knights Province at: http://www.knightsprovince.com
KaM Remake at: http://www.kamremake.com
Original MBWR/WR2/AFC/FVR tools at: http://krom.reveur.de
<<

kocsis1david

Crossbowman

Posts: 204

Joined: 12 Mar 2011, 23:00

KaM Skill Level: Skilled

Location: Hungary

Post 22 Jan 2012, 14:34

Re: Shadow converter

Yes, but I don't find it jaggy with 1280×720 display resolution. Which house is jaggy?
<<

Krom

User avatar

Knights Province Developer

Posts: 3280

Joined: 09 May 2006, 22:00

KaM Skill Level: Fair

Location: Russia

Post 22 Jan 2012, 14:59

Re: Shadow converter

The Store house - see the shadow edge and line I put next to it.
You do not have the required permissions to view the files attached to this post.
Knights Province at: http://www.knightsprovince.com
KaM Remake at: http://www.kamremake.com
Original MBWR/WR2/AFC/FVR tools at: http://krom.reveur.de
<<

Siegfried

User avatar

Knight

Posts: 494

Joined: 24 Jul 2009, 22:00

Post 22 Jan 2012, 16:00

Re: Shadow converter

I'm not sure if Krom meant the same, but the diagonal edge on the lower right still shows pixels. Maybe it's possible to apply antialiasing?
<<

kocsis1david

Crossbowman

Posts: 204

Joined: 12 Mar 2011, 23:00

KaM Skill Level: Skilled

Location: Hungary

Post 22 Jan 2012, 16:56

Re: Shadow converter

I thought you indended the house itself. I made a little shadow shape correction:
ImageImageImage

The sharp edges are still not perfect, but it might not visible in the game.
<<

Lewin

User avatar

KaM Remake Developer

Posts: 3822

Joined: 16 Sep 2007, 22:00

KaM Skill Level: Skilled

ICQ: 269127056

Website: http://lewin.hodgman.id.au

Yahoo Messenger: lewinlewinhodgman

Location: Australia

Post 27 Jan 2012, 07:56

Re: Shadow converter

We've done most of the work to add alpha-shadows to the game, here's a new screenshot:

Image

As you can see it looks great, and believe me it looks even better when you see the units walking and the shadows animating!

@kocsis1david: To make it easier for us I was wondering whether you could change the output to not have .new. (so MyFile.bmp becomes MyFile.png rather than MyFile.new.png) That will save me using a batch renamer every time. I modified the BMX file to not have .new, but it didn't make any different so I assume the script is compiled not interpreted and you just provided the BMX file so we can see what it is doing.
I guess you used .new so it could load PNG files without overwriting the input file, but we're only loading BMPs at the moment and if it overwrote the input file that wouldn't matter anyway.
Thanks for all your help :)
<<

kocsis1david

Crossbowman

Posts: 204

Joined: 12 Mar 2011, 23:00

KaM Skill Level: Skilled

Location: Hungary

Post 27 Jan 2012, 13:25

Re: Shadow converter

I've changed it to use the same filename. Could you tell me when the new update will be?
<<

Lewin

User avatar

KaM Remake Developer

Posts: 3822

Joined: 16 Sep 2007, 22:00

KaM Skill Level: Skilled

ICQ: 269127056

Website: http://lewin.hodgman.id.au

Yahoo Messenger: lewinlewinhodgman

Location: Australia

Post 27 Jan 2012, 17:00

Re: Shadow converter

Thanks :) Not sure when the update will be, 1 month at the earliest I'd say, there's still some stuff we have to do.
<<

Lewin

User avatar

KaM Remake Developer

Posts: 3822

Joined: 16 Sep 2007, 22:00

KaM Skill Level: Skilled

ICQ: 269127056

Website: http://lewin.hodgman.id.au

Yahoo Messenger: lewinlewinhodgman

Location: Australia

Post 07 Jul 2012, 10:09

Re: Shadow converter

Over the past month or so Krom has been refactoring our sprite loading/packing process to make it much easier to use, and so we can eventually provide an editor to open our sprite packs (.rxx files found in data\Sprites) and edit them.

We wanted the process of generating these files to be as simple as possible for us, so I have implemented kocsis1david's shadow converting algorithm natively into our process, by "translating" his code into Pascal.

Before today generating the soft shadowed sprites was a lot of manual work: exporting all the images from the game, running the shadow converter over them, then importing all those images back into the game along with the team color masks and finally generating the RXX file. When I did that for r3392 it took a good 20 minutes! Now all of that is done with the click of a button and a few minutes of CPU time.

@kocsis1david: Thank you very much for providing the algorithm, (and the actual idea to improve the shadows) I hope you don't have any issues with us implementing it in our own source code.
<<

kocsis1david

Crossbowman

Posts: 204

Joined: 12 Mar 2011, 23:00

KaM Skill Level: Skilled

Location: Hungary

Post 07 Jul 2012, 14:09

Re: Shadow converter

Okey, You're welcome. Actually it didn't take so much effort.
<<

FeyBart

User avatar

Knight

Posts: 402

Joined: 28 Dec 2011, 16:35

KaM Skill Level: Beginner

Location: Nutville, NL

Post 07 Jul 2012, 16:15

Re: Shadow converter

This all sounds very sweet.
Nice coffee is always nice.

Return to “Feedback / Discussion”

Who is online

Users browsing this forum: Semrush [Bot] and 3 guests