Antialiasing problem

Discuss, get help with, or post new modifications, graphics or related tools for Locomotion in this forum.

Moderator: Locomotion Moderators

Post Reply
User avatar
Seelenquell
Tycoon
Tycoon
Posts: 1893
Joined: 16 Oct 2004 13:42
Location: C:\

Antialiasing problem

Post by Seelenquell »

hi there,

i have rendered several models with a higher resolution than needed. now i want to import them in the game. i scale them down to the right size. then i convert them using the loco-palette. after using locotool to convert them into one single DAT, i load them in the game.
i experience small white gaps/pixel where there should no one be there. after decoding the DAT i see that (i am almost sure) the locotool somehow converted the palette again.. or is ist the game?
i compared PNGs before encoding in DAT and after decoding from DAT. they were NOT the same?!

now the main-problem..
when i use pixel-doubling for downsampling there is no antialias. but what can i use to sample them down but keep the outlines sharper? now i use the bicubic downsampling. i think the problem with the white pixels is a problem with the antialias. but i dont know how to overcome this. i want a antialiased train with sharp edges. what i get is a train, antialiased, with white pixels.

am i alone with this experience? is there a solution? thank you for your answers.

gotta compare PNGs from DATs some more. before and after en-/decoding..
BobDendry
Tycoon
Tycoon
Posts: 2215
Joined: 06 May 2004 09:10
Location: Sydney

Post by BobDendry »

I wasn't aware that sprites used anti-aliasing :roll:
Formerly known as Lachie
User avatar
Seelenquell
Tycoon
Tycoon
Posts: 1893
Joined: 16 Oct 2004 13:42
Location: C:\

Post by Seelenquell »

WhiteHand wrote:I wasn't aware that sprites used anti-aliasing :roll:
to create sprites i use 3d-models with 3d-software. so to create those rendered sprites, the software uses antialiasing for the models to look good. without AA there would be artifacts, a line wouldnt be a line and so on.

i can put off AA and there wouldnt be white pixels at all.. but that doesnt look good.

sry for my bad english.. dont know how to describe this.
User avatar
norfolksouthern37
Transport Coordinator
Transport Coordinator
Posts: 279
Joined: 04 Jun 2004 17:43

Post by norfolksouthern37 »

most of the time this is overlooked, but i did come up with a way to do it. my previous released models did not use antialiasing when rendered and got A LOT of artifacts in them as a result, but at the time i did not have a better way to do it, then i got an idea. first i render a complete set of sprites without antialiasing and use the mask area of those on top of another group of sprites that i rendered with aa. this way the outlines are always crisp, but the non masked areas are antialiased. in short, render one set for the transparent color, and another set for the actual graphic, then merge them. i have the entire process scripted in my graphics editing program so i dont have to cut the mask and paste it onto the new graphic by hand, but the end result is well worth it.
User avatar
Seelenquell
Tycoon
Tycoon
Posts: 1893
Joined: 16 Oct 2004 13:42
Location: C:\

Post by Seelenquell »

thank you..

that´s what i not wanted to do. but if there are no other solutions i´m going to try it.
User avatar
Sybil Goose
Engineer
Engineer
Posts: 53
Joined: 12 Sep 2004 11:18

Post by Sybil Goose »

Could you attach a .zip of an image at each stage in the conversion process? By looking at the files I might be able to see what's happening.
User avatar
Seelenquell
Tycoon
Tycoon
Posts: 1893
Joined: 16 Oct 2004 13:42
Location: C:\

Post by Seelenquell »

here are two images..

one before and one after the locotool-conversion.

see the outlines in the after-image? these aren´t visible in the before pic and should be an antialias-problem i think
Attachments
after
after
000_B.png (1.9 KiB) Viewed 3895 times
before
before
000_A.png (1.76 KiB) Viewed 3894 times
User avatar
Sybil Goose
Engineer
Engineer
Posts: 53
Joined: 12 Sep 2004 11:18

Post by Sybil Goose »

The first image doesn't have the correct pallette, the second does but only the colour table has been changed, which is why the colours look odd.

Have you got some images from after you've resized (with and without anti-aliasing) but before you apply the Loco pallette?
User avatar
Seelenquell
Tycoon
Tycoon
Posts: 1893
Joined: 16 Oct 2004 13:42
Location: C:\

Post by Seelenquell »

Sybil Goose wrote:The first image doesn't have the correct pallette, the second does
i think this is the problem.. i used the wrong palette. dont know where i got that from.. but with the "right" palette there are no artifacts :D so the problem isnt there anymore and this can be closed.

thank you sybil goose for this "hint" :)

my old palette should be a loco-palette but in the locotool colors gonna be changed.. very confusing.
User avatar
Villem
Tycoon
Tycoon
Posts: 3310
Joined: 28 Aug 2003 09:38

Post by Villem »

norfolksouthern37 wrote:most of the time this is overlooked, but i did come up with a way to do it. my previous released models did not use antialiasing when rendered and got A LOT of artifacts in them as a result, but at the time i did not have a better way to do it, then i got an idea. first i render a complete set of sprites without antialiasing and use the mask area of those on top of another group of sprites that i rendered with aa. this way the outlines are always crisp, but the non masked areas are antialiased. in short, render one set for the transparent color, and another set for the actual graphic, then merge them. i have the entire process scripted in my graphics editing program so i dont have to cut the mask and paste it onto the new graphic by hand, but the end result is well worth it.
Please could you make a step by step guide? Not to mention, wich program to use?
User avatar
norfolksouthern37
Transport Coordinator
Transport Coordinator
Posts: 279
Joined: 04 Jun 2004 17:43

Post by norfolksouthern37 »

i use Paint Shop Pro 8+ for this (because i have the process scripted) but the same can be done in Photoshop.

in my rendering program i set up my model and use a grey background with anti-aliasing enabled. i choose grey becuase if i used blue then the blue would be anti-aliased and grey is more neutral and will avoid the very edge problems reported in this thread. heres an example with my GP38-2 model.

this is frame 14 of the set, with ant-aliasing (grey background), and the same without (blue background):

ImageImage

you will notice a big difference in the quality of the model, and thats what i was trying to do so this is what i came up with. basically after you do this step, you cut the blue 'mask' out of the second one and merge it to the anti-aliased one. this process REMOVES the aliased edges, so once you convert it to the correct palette, there are no rough looking or discolored edges on your train,a nd the overall texture looks a heck of A LOT better. here ill show you another comparison of a model not in company colors. this time a Santa Fe GP60:

ImageImage

and the final sprite with loco palette applied:

Image
User avatar
Paasky
Transport Coordinator
Transport Coordinator
Posts: 269
Joined: 06 Sep 2004 07:38
Location: Vantaa, Finland
Contact:

Post by Paasky »

norfolk, that is PURE GENIUS! :shock: :bow: :bow:

Would you mind to write a good, easy to follow tutorial? If not, I can do it, ofcourse praising your genius in every sentence ;)

Now I can re-start making the Aircraft Pack I was working on :D
Post Reply

Return to “Locomotion Graphics, Modifications & Tools”

Who is online

Users browsing this forum: No registered users and 16 guests