Alpha channel in texture, minimap creation

Alpha channel in texture, minimap creation

Discuss maps & map creation - from concept to execution to the ever elusive release.

Moderator: Moderators

Post Reply
divergent
Posts: 9
Joined: 28 Feb 2015, 17:19

Alpha channel in texture, minimap creation

Post by divergent »

Hi,

I have problem with a map:

When i compiled my map with a PNG texture with alpha canal, I obtain map with correctly texture, but the minimap in spring is bugged (black with big pixel of random color).

When i compiled with a 24bip BMP image, i have logically a non-transparency texture, but i have minimap.

And when i try to compile map with a 32 bit BMP image, mapconv (i test with different version of mapconv) don't compile it with an error with a format of texture map.

How i have a transparence in texture with fonctionnal minimap?
Last edited by divergent on 21 Mar 2015, 10:29, edited 1 time in total.
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: Alpha canal in texture, minimap creation

Post by Forboding Angel »

Not canal... A canal is a waterway.

You mean a Channel (which an alternate meaning is a waterway, but whatever...).

Um without addressing your issues directly, do this...

Resize your diffuse texture to 1024x1024, save as minimap.bmp, include in map archive. Problem solved (sort of).
divergent
Posts: 9
Joined: 28 Feb 2015, 17:19

Re: Alpha canal in texture, minimap creation

Post by divergent »

Sorry, yes alpha channel!

For the minimap.bmp on 1024*1024 , i have put it in archive (in the subdirectory maps/) but it doesn't solve problem
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: Alpha canal in texture, minimap creation

Post by Forboding Angel »

Are you using smd or mapinfo.lua?

If you're using mapinfo.lua, you have to tell the filename of the minimap to mapinfo.lua (it's one of the parameters iirc).
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: Alpha canal in texture, minimap creation

Post by Forboding Angel »

Nevermind, no it isn't a param, arugh, I can't remember how to do custom minimaps. Iirc you simply had to include minimap.bmp in the archive. Perhaps I was wrong.
User avatar
enetheru
Posts: 627
Joined: 11 Jun 2010, 07:32

Re: Alpha canal in texture, minimap creation

Post by enetheru »

Forboding Angel wrote:Nevermind, no it isn't a param, arugh, I can't remember how to do custom minimaps. Iirc you simply had to include minimap.bmp in the archive. Perhaps I was wrong.
it *should* be one of the paremeters though,, the smf format is stupid, maybe someone will get around to turning all smf sections into mapinfo.lua ones.. someday..
divergent
Posts: 9
Joined: 28 Feb 2015, 17:19

Re: Alpha canal in texture, minimap creation

Post by divergent »

Hi,

I use mapinfo.lua, and i haven't found param to solve problem. in the mapinfo.lua, we can precise the smf file but no minimap.

I see somethings, we can with "voidground" param in mapinfo that there is possible to have invisible portion of texture, if the map was compiled with a diffuse map with an alpha channel. Although, it'ss the same problem, mapconv don't compile with a 32bit BMP image for texture.
User avatar
enetheru
Posts: 627
Joined: 11 Jun 2010, 07:32

Re: Alpha canal in texture, minimap creation

Post by enetheru »

The minimap is a 1024x1024 DXT1 compressed image inside the smf file
divergent
Posts: 9
Joined: 28 Feb 2015, 17:19

Re: Alpha canal in texture, minimap creation

Post by divergent »

In compilation, i have an error about minimap:

Code: Select all

Version 8.30
    Reading temp\Temp000.tga  [Processing] Writing .\Temp000.dds
creating minimap
Version 8.30
    Reading mini.bmp
 
    Error reading mini.bmp

** FAILED GBM_IO_ERR               
Creating tiles 6/1024 100%
Saving metal map
Writing 0 features
fixme:msvcrt:__clean_type_info_names_internal (0x101e9b38) stub
"error reading mini.bmp", it's strange because, it create itself this file and after it don't read it?

I use mapconvGUI 2.4 without special option
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: Alpha channel in texture, minimap creation

Post by Forboding Angel »

Rename your minimap that you created to mini.bmp and place it in the same folder as mapconv and recompile.
User avatar
qray
Posts: 377
Joined: 02 Feb 2009, 18:49

Re: Alpha channel in texture, minimap creation

Post by qray »

To exclude problem sources: you don't happen to use mapconv under linux with wine?
Just asking since I always get this error when trying to do it this way. Under windows it worked fine (also with transparent textures); no matter if minimap is automatically produced or a png is supplied. But I never tried mapconvGUI, just the command line version of 2.4.
User avatar
enetheru
Posts: 627
Joined: 11 Jun 2010, 07:32

Re: Alpha channel in texture, minimap creation

Post by enetheru »

Alpha in minimap is not supported. I've been trawling through the map code this afternoon.

I dont know anything much about opengl so dont know how to enable it.. probably not worth it though.
User avatar
qray
Posts: 377
Joined: 02 Feb 2009, 18:49

Re: Alpha channel in texture, minimap creation

Post by qray »

qray wrote:Under windows it worked fine (also with transparent textures)
I meant of course transparency in the diffuse texture, not minimap. Sorry for not being more precise before.
Transparent minimap doesn't make much sense, IMO.
User avatar
enetheru
Posts: 627
Joined: 11 Jun 2010, 07:32

Re: Alpha channel in texture, minimap creation

Post by enetheru »

oh I misunderstood..

if you want you can try my compiler.
smf_tools. you will have to build for windows using msys2+mingw

ive submitted a patch to allow specifying the minimap from the mapinfo.lua file too, so if that goes through then its a moot point.
Post Reply

Return to “Map Creation”