Adding new tile to tileset problem

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • tangar
    Veteran
    • Mar 2015
    • 1004

    Adding new tile to tileset problem

    I'm trying to put replace old rubble tile with new one.

    Shtukensia draw this for a test:


    It's in transparent png format. But when I put it to tileset png (gervais) - it make a glitch in-game



    I've checked this guide: https://github.com/angband/angband/p...7a779fae3ac98e , but it doesn't tell much of such problem




    ===================

    p.s.
    posted it in wrong section of forum (should be in 'development').. But there is no button to delete a new topic. It seems users could only delete their posts at forum, not threads
    Attached Files
    https://tangaria.com - Angband multiplayer variant
    tangaria.com/variants - Angband variants table
    tangar.info - my website ⍽⍽⍽⍽⍽⍽⍽⍽⍽⍽⍽⍽
    youtube.com/GameGlaz — streams in English ⍽ youtube.com/StreamGuild — streams in Russian
  • takkaria
    Veteran
    • Apr 2007
    • 1951

    #2
    Can you upload the whole tileset somewhere? It looks like the transparency isn't set up correctly.
    takkaria whispers something about options. -more-

    Comment

    • Mondkalb
      Knight
      • Apr 2007
      • 982

      #3
      OTOH, looks like you have implemented water.
      scnr
      My Angband winners so far

      My FAangband efforts so far

      Comment

      • tangar
        Veteran
        • Mar 2015
        • 1004

        #4
        I've tested with PWMA tileset, but now tried with V also.. the same problem.

        tileset where I replaced rubble

        (button to download in top right corner)

        my photoshop settings:


        I've tried interlaced and non-interlaced option. Also tried to save via 'save as...' - the same result
        Last edited by tangar; January 31, 2019, 17:05.
        https://tangaria.com - Angband multiplayer variant
        tangaria.com/variants - Angband variants table
        tangar.info - my website ⍽⍽⍽⍽⍽⍽⍽⍽⍽⍽⍽⍽
        youtube.com/GameGlaz — streams in English ⍽ youtube.com/StreamGuild — streams in Russian

        Comment

        • takkaria
          Veteran
          • Apr 2007
          • 1951

          #5
          Have you tried saving it as PNG-8?
          takkaria whispers something about options. -more-

          Comment

          • tangar
            Veteran
            • Mar 2015
            • 1004

            #6
            PNG-8 doesn't help

            But it seems I've found the source of this issue:


            When photoshop load .png file, it's assigning it's Alpha channel as 'transparency'; so when you save it again 'transparent' alpha glitches.. There is some workaround with PNG-24, but it's generates certain white artifacts around some objects..

            So it seems photoshop isn't suited for tiles editing at all (and it's very sad cause it's the most popular software for artists).

            Takkaria, which software do you use?


            ===

            Also:

            1) maybe if we would clean 'transparent' pixels from tileset (to remove artifacts), it would be alright to use PNG-24. What do you think?
            2) maybe there should be technical specifications for PNG format which Angband tileset should use, including:
            - which PNG format to use (8, 24)
            - interlaced or no
            - which color system
            etc


            p.s.
            I've read in the guide that alpha could be used for unusual double height objects.. sounds interesting. is there an example of such object in-game?
            Last edited by tangar; February 1, 2019, 12:06.
            https://tangaria.com - Angband multiplayer variant
            tangaria.com/variants - Angband variants table
            tangar.info - my website ⍽⍽⍽⍽⍽⍽⍽⍽⍽⍽⍽⍽
            youtube.com/GameGlaz — streams in English ⍽ youtube.com/StreamGuild — streams in Russian

            Comment

            • t4nk
              Swordsman
              • May 2016
              • 336

              #7
              so when you save it again 'transparent' alpha glitches
              Isn't there an option to save with alpha transparency? There must be; try to save it as PNG24 with transparency (which, I guess, most people would call PNG32 ).

              Anyway, use GIMP

              I've read in the guide that alpha could be used for unusual double height objects.. sounds interesting. is there an example of such object in-game?
              Only Shockbolt's tiles have double high objects. For example, stone giants.

              Comment

              • takkaria
                Veteran
                • Apr 2007
                • 1951

                #8
                I don't use any software for tiles... I've never even played with tiles. When I was maintaining the game I made much less effort with tiles than Nick does.

                Have you tried using the process outlined here?

                takkaria whispers something about options. -more-

                Comment

                • tangar
                  Veteran
                  • Mar 2015
                  • 1004

                  #9
                  Originally posted by t4nk
                  Isn't there an option to save with alpha transparency? There must be; try to save it as PNG24 with transparency (which, I guess, most people would call PNG32 ).
                  Nope, photoshop using .png format transparency, not separate alpha channel. So people who use photoshop with alpha channel for gamedev purpose (eg unreal engine) are screwed.

                  Takkaria, thanks, but I as I noted above this is deeper problem: when you open .png in photoshop it doesn't show alpha channel for it, it's got only RGB channels; cause it define alpha as .png format transparency. So after you edit the file in photoshop and wanna save it - it 'writes' in .png channel 'transparency', not alpha.. So it makes transparent pixel as white ones (as in my 1st screenshots)..

                  I've downloaded GIMP - when you open .png with this program - it shows separate alpha channel there, so it's working alright... But GIMP isn't really comfortable, so much photoshop functions doesn't work there
                  https://tangaria.com - Angband multiplayer variant
                  tangaria.com/variants - Angband variants table
                  tangar.info - my website ⍽⍽⍽⍽⍽⍽⍽⍽⍽⍽⍽⍽
                  youtube.com/GameGlaz — streams in English ⍽ youtube.com/StreamGuild — streams in Russian

                  Comment

                  • t4nk
                    Swordsman
                    • May 2016
                    • 336

                    #10
                    Originally posted by tangar
                    Nope, photoshop using .png format transparency, not separate alpha channel.
                    And what does that mean... I suspect when you say "alpha channel" you mean something that is not what programmers call "alpha channel"... PNG does support pixel formats with alpha channel.
                    I guess Photoshop has something that it calls "alpha channel", which is not a real alpha channel (since most Photoshop users have no reason to care about formats of pixels) and you're talking about that.

                    Anyway...

                    I've downloaded GIMP - when you open .png with this program - it shows separate alpha channel there, so it's working alright... But GIMP isn't really comfortable, so much photoshop functions doesn't work there
                    Maybe save your tile as .psd (I think that's what Photoshop's own format is called), open it in GIMP and then save as .png?
                    Although I find it hard to believe that Photoshop cannot save .png properly.

                    Comment

                    • PowerWyrm
                      Prophet
                      • Apr 2008
                      • 2986

                      #11
                      Use GimP: https://www.gimp.org/
                      PWMAngband variant maintainer - check https://github.com/draconisPW/PWMAngband (or http://www.mangband.org/forum/viewforum.php?f=9) to learn more about this new variant!

                      Comment

                      • takkaria
                        Veteran
                        • Apr 2007
                        • 1951

                        #12
                        I'm just wondering if it's something about using alpha channel vs having a palette colour that is 'transparent'. Maybe Angband only supports paletted transparency and not alpha channels?
                        takkaria whispers something about options. -more-

                        Comment

                        • tangar
                          Veteran
                          • Mar 2015
                          • 1004

                          #13
                          Ok, there is a workaround which I found: to clear photoshop 'transparent' layer when you save .png; I use for it this addon http://www.fnordware.com/superpng/ (cause by default photoshop can't do it).

                          It's removes white artifacts

                          Some hints for Photoshop:
                          1) To make it easy to edit tileset - use grid:
                          'View' -> 'Show' -> 'Grid'
                          and then adjust grid to 32 px:
                          Edit > Preferences > Guides, Grids & Slices The Guides
                          2) lock position of layer so you won't move tileset accidentally


                          YAY! Editing tileset now - huge pleasure!

                          Thanks to everyone! Your replies helped to solve this riddle

                          ...

                          but. New challenge. New problem!

                          Rubble got black 'background'... The same issue not only in Gervais tileset, but also in Shockbolt's. Why is it so? How to make it properly transparent?
                          Last edited by tangar; February 1, 2019, 18:38.
                          https://tangaria.com - Angband multiplayer variant
                          tangaria.com/variants - Angband variants table
                          tangar.info - my website ⍽⍽⍽⍽⍽⍽⍽⍽⍽⍽⍽⍽
                          youtube.com/GameGlaz — streams in English ⍽ youtube.com/StreamGuild — streams in Russian

                          Comment

                          • t4nk
                            Swordsman
                            • May 2016
                            • 336

                            #14
                            Originally posted by tangar
                            Rubble got black 'background'... The same issue not only in Gervais tileset, but also in Shockbolt's. Why is it so? How to make it properly transparent?
                            Interesting... I recall seeing rubble on black background quite a while ago, but I assumed that was because these tiles were placeholders, for lack of better ones... Now I'm looking at code, and it seems that rubble should have black background because its a feature, so it doesn't get a proper floor feature underneath it?
                            Nick, you might want to take a look at grid_data_as_text(). It should probably check whether feat is rubble, and if yes, it should save coordinates of floor tile in tap and tcp.

                            Comment

                            • tangar
                              Veteran
                              • Mar 2015
                              • 1004

                              #15
                              [tileset] Rubble problem: add new type of terrain - 'things'

                              Originally posted by t4nk
                              Interesting... I recall seeing rubble on black background quite a while ago, but I assumed that was because these tiles were placeholders, for lack of better ones... Now I'm looking at code, and it seems that rubble should have black background because its a feature, so it doesn't get a proper floor feature underneath it?
                              Nick, you might want to take a look at grid_data_as_text(). It should probably check whether feat is rubble, and if yes, it should save coordinates of floor tile in tap and tcp.
                              I suppose this is right point, but I also wanna share my (maybe wrong) idea about this problem - as I work with tileset atm to make custom world map for Angband Online and there are similar problems with other objects like trees..

                              Why rubble atm got black background?

                              I suppose, it's because the game 'thinks' that rubble is not a separate object ('thing') to put it on the floor tile, but a 'floor'-like tile. Even if rubble tile is transparent - game can not put it above 'open floor' tile, because rubble is managed as 'floor'-like tile (even if it doesn't have FLOOR flag).

                              So if we would look at terrain.txt, we could divide all tiles there in two groups:

                              1) ie terrain objects like floors and walls - 'backgrounds'
                              2) terrain 'things' - rubble, veins, lava (there could be also included trees and some more new stuff) - 'textures'

                              So it would be great if objects in terrain.txt would have special transparent-friendly flag, so some objects could be noted as 'backgrounds' (floors, walls) and some would be like 'textures' - which means that at level genaration they would be placed after 'backgrounds' as transparent ones. Then this new terrain things would have proper (floor or wall - for veins or lava) background, like traps have, for example.

                              p.s.
                              (silly) idea: maybe right now it's easier just to make 'hack' which would make rubble handled like a trap or immobile monster (lol) with certain properties (to dig it, block vision)
                              Last edited by tangar; February 12, 2019, 14:22.
                              https://tangaria.com - Angband multiplayer variant
                              tangaria.com/variants - Angband variants table
                              tangar.info - my website ⍽⍽⍽⍽⍽⍽⍽⍽⍽⍽⍽⍽
                              youtube.com/GameGlaz — streams in English ⍽ youtube.com/StreamGuild — streams in Russian

                              Comment

                              Working...
                              😀
                              😂
                              🥰
                              😘
                              🤢
                              😎
                              😞
                              😡
                              👍
                              👎