Page 1 of 1
Alpha channel in texture, minimap creation
Posted: 20 Mar 2015, 19:56
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?
Re: Alpha canal in texture, minimap creation
Posted: 21 Mar 2015, 00:02
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).
Re: Alpha canal in texture, minimap creation
Posted: 21 Mar 2015, 01:10
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
Re: Alpha canal in texture, minimap creation
Posted: 21 Mar 2015, 01:49
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).
Re: Alpha canal in texture, minimap creation
Posted: 21 Mar 2015, 02:16
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.
Re: Alpha canal in texture, minimap creation
Posted: 21 Mar 2015, 07:19
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..
Re: Alpha canal in texture, minimap creation
Posted: 21 Mar 2015, 09:41
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.
Re: Alpha canal in texture, minimap creation
Posted: 21 Mar 2015, 09:43
by enetheru
The minimap is a 1024x1024 DXT1 compressed image inside the smf file
Re: Alpha canal in texture, minimap creation
Posted: 21 Mar 2015, 10:20
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
Re: Alpha channel in texture, minimap creation
Posted: 21 Mar 2015, 11:44
by Forboding Angel
Rename your minimap that you created to mini.bmp and place it in the same folder as mapconv and recompile.
Re: Alpha channel in texture, minimap creation
Posted: 24 Mar 2015, 20:41
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.
Re: Alpha channel in texture, minimap creation
Posted: 25 Mar 2015, 11:23
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.
Re: Alpha channel in texture, minimap creation
Posted: 25 Mar 2015, 13:39
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.
Re: Alpha channel in texture, minimap creation
Posted: 25 Mar 2015, 15:30
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.