Duke4.net Forums: Sprite Transparency - Duke4.net Forums

Jump to content

Hide message Show message
Welcome to the Duke4.net Forums!

Register an account now to get access to all board features. After you've registered and logged in, you'll be able to create topics, post replies, send and receive private messages, disable the viewing of ads and more!

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Sprite Transparency  "Importet Sprites show pink BG in 3D view, build-in Sprites work"

User is offline   Big Bene 

  • Youngloov
  • 6

#1

Hi!

I've started to do some graphics I need (using the original editart.exe).
For start, and to test them, I included a buffalo skull on a pole into a level (the pole is a small rised sector, the skull is a spritte).

Now, the skull looks exactly the same in Mapster 3D view as in Gimp and Editart: the "transparent" color is still opaque pink, the sprite is an rectangle.
Sprites with the original graphics work (the transparent color is really transparent), so it can't be a bug or some setting of the editor software.

I'm at work now, I can post images when I'm back home.

Any ideas what went wrong?
0

User is offline   Daedolon 

  • Ancient Blood God
  • 843

#2

Editart hates it, just copy the transparency color from an existing tile and apply it to yours with C. Use the key U or whatever it was.

Lunick: I can't believe you can pre-order Duke Nukem 3D in 2016
0

User is offline   Zaxtor 

  • 822

#3

I use dosbox, log on editart use the last color "last pink or transparent"
then export the art and upload with DukeRes if your art is beyond the editart limits or little over tile 6000+. Note don't touch the reserved tiles.

Trequonia TC's Status:

Levels : 86% done - Textures : <99% done - Sounds : 98s% done - Musics : 99s% done
Trequonia's Official website
0

User is offline   Hank 

  • 1,207

#4

to first post: for more questions and since you are using Editart, here is the master FAQ
http://www.r-t-c-m.c...tart-guide.html

or download the FAQ here
http://www.r-t-c-m.c...Guide%20v2.5.7z

Just in case, I use BAFed, since I do a shitload of tiles and sprites right now. Everything goes from the GIMP straight into .art files, including transparent sprites.

The things I don't know could fill libraries.

This post has been edited by Hank: 18 April 2017 - 02:08 PM

0

User is offline   ToiletDuck64 

  • 91

#5

The Duke3D palette contains two different pink colors that look identical in Editart but are treated differently by the game engine. One color is the transparent "magic pink" color used for transparency in the vanilla tiles; the other is treated as a non-transparent color but looks the same in Editart. To make the transparency work properly, you need to ensure that your tiles are using the correct pink color.
1

User is offline   Big Bene 

  • Youngloov
  • 6

#6

@Hank:
Those were exactly the manuals I have read and followed to the letter, but thanks anyway.

In detail:
I imported an original graphic into gimp and saved the palette. Then I made a copy of this palette where I deleted the last entries = the "magic" colors (illuminated and transparent), so they wouldn't be used when converting an image. I prepared the images and converted them into indexed mode, using the reduces "Duke" palette. After this I changed the palette to the original and filled the intended transparent areas with the last color in the table (entry 255) which is the transparent pink. At least, I thought I did so to my best knowledge.

@Daedolon:
Will try and copy the color inside editart. Hope this will help.

@all:
Thanks a lot and sorry for the late reply. I was in holidays and had very limited net access.
0

User is online   Trooper Dan 

  • Duke Plus Developer
  • 2,056

#7

It makes me sad when I see people still using Editart in this day and age. You guys are making this way too hard on yourselves. You can use a modern image editor, such as Photoshop or equivalent, to do your edits. When the image is finished and in Duke palette, you have a couple of options for putting the 8-bit paletted image into the game. What I do is convert the image to PNG format, then change the pink background to transparency. While technically the result is 32-bit, it is still only using the Duke colors. Then, you can use the tilefromtexture def command to add the tile to the game; you can even add offsets and animation with def commands. When a tile is added via tilefromtexture, the game is creating an 8-bit tile from the image just like it was loaded from an .art file. This way you retain the benefits of using 8-bit art, such as certain colors being full bright.

If you prefer to use actual .art files, I recommend this app: http://m210.duke4.ne...rt-files-editor

It has import and batch import functions so that you can move your bmp or PNG images into .art files en masse, without using Editart.
0

User is offline   Hank 

  • 1,207

#8

View PostBig Bene, on 04 May 2017 - 05:11 AM, said:

In detail:
I imported an original graphic into gimp and saved the palette. Then I made a copy of this palette where I deleted the last entries = the "magic" colors (illuminated and transparent), so they wouldn't be used when converting an image. I prepared the images and converted them into indexed mode, using the reduces "Duke" palette. After this I changed the palette to the original and filled the intended transparent areas with the last color in the table (entry 255) which is the transparent pink. At least, I thought I did so to my best knowledge.

Once you have the Duke Pallette in the GIMP, you don't have to exclude color #255, because the GIMP maps that color to #245. i.e. no win. do not alter it. It makes your tiles follow a re-arranged palette when importing it into Edit Art.
Simply fill any intended transparent area of your sprite/tile with one color not used in the rest of the tile/sprite. Then load the tile into Edit Art, move your cursor over the area with that color, and press C.
I did this for years, it does work.

p.s. Simpler is using of BAFed, where one can load tiles straight from the GIMP. See post above from Trooper Dan, and my first one for the link.

The things I don't know could fill libraries.

This post has been edited by Hank: 04 May 2017 - 05:02 PM

0

#9

Here's how I do it: I save the image as an indexed GIF using Duke 3D's original palette. I make sure the transparent pink color used is index 255 (I tweaked Duke's palette so all bright colors are replaced with a really bright green, something that cannot be confused for another color anywhere in the palette). To confirm the import in EditArt, I press SPACE (which forces EditArt to reuse the indices provided by the image) instead of ENTER (which tells EditArt to find the best index for each pixel in the source image, assuming the image palette is not Duke's).

I'll wear my badge, a vinyl sticker with big block letters adherent to my chest, tells to all your friends: "I am a visitor here, I am not permanent" (The Postal Service -- DC Sleeps alone tonight)
"Where has the brain and spinal cord gone?" -- "I'm a doctor, Colonel, not a detective." (Fiend Without a Face)
"They float... they float, Georgie, and when you’re down here with me, you’ll float, too." (Stephen King's It)
0

User is offline   Big Bene 

  • Youngloov
  • 6

#10

View PostTrooper Dan, on 04 May 2017 - 12:44 PM, said:

It makes me sad when I see people still using Editart in this day and age. You guys are making this way too hard on yourselves. You can use a modern image editor, such as Photoshop or equivalent, to do your edits. When the image is finished and in Duke palette, you have a couple of options for putting the 8-bit paletted image into the game.

I hope I don't sound offended, I know you just want to help.

Of course I do not use Editart as an image editor. I think nobody ever did, not even the original developers. I use a "modern image editor", Gimp in my case, as I wrote above.

Quote

What I do is convert the image to PNG format, then change the pink background to transparency. While technically the result is 32-bit, it is still only using the Duke colors. Then, you can use the tilefromtexture def command to add the tile to the game; you can even add offsets and animation with def commands. When a tile is added via tilefromtexture, the game is creating an 8-bit tile from the image just like it was loaded from an .art file. This way you retain the benefits of using 8-bit art, such as certain colors being full bright.

To each his own, I do want my content to run in the original DN3D. Of course most people (if any) will use it in Eduke, including myself for most of the time, but part of the thrill of doing content for a vintage game, at least in my mindset, is knowing that it could actually be played on a vintage machine. Otherwise, I would see no point in it at all and would rather use my time to learn the Unreal engine or whatever.
So, def commands are a no-go, or am I completely mistaken here?

Quote

If you prefer to use actual .art files, I recommend this app: http://m210.duke4.ne...rt-files-editor
It has import and batch import functions so that you can move your bmp or PNG images into .art files en masse, without using Editart.

Perhaps some day I do a project like importing the wall textures from Neverwinter Nights (which I have stored on an older computer) into Art, and batch importing may become interesting, but at the moment I do individual images which I need for a map, one by one.

So, for the time being, Editart suits me just as well as any currently available alternative.

Thank you anyway.

This post has been edited by Big Bene: 05 May 2017 - 09:55 PM

0

User is offline   Big Bene 

  • Youngloov
  • 6

#11

View PostDaedolon, on 18 April 2017 - 02:34 AM, said:

Editart hates it, just copy the transparency color from an existing tile and apply it to yours with C. Use the key U or whatever it was.

Hank said:

Then load the tile into Edit Art, move your cursor over the area with that color, and press C.


Worked.
Actually, I used the Backspace key to select the transparent color, then replaced the un-transparent pink using the C key.

Thanks a lot.

This post has been edited by Big Bene: 05 May 2017 - 09:58 PM

1

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic


All copyrights and trademarks are property of their respective owners and all comments are owned by their posters. Yes, our forum uses cookies. © 2004-2017 Duke4.net and Voidpoint, LLC

Enter your sign in name and password


Sign in options