Anim8or Community

Please login or register.

Login with username, password and session length
Advanced search  

News:

Ian Ross has just released a book on Anim8or. It's perect for a beginner and a good reference for experienced users. It contains detailed chapters on every aspect, with many examples. Get your own copy here: "Anim8or Tutorial Book"

Author Topic: .Bmp textures format question  (Read 12171 times)

Bman

  • Newbie
  • *
  • Posts: 7
    • View Profile
.Bmp textures format question
« on: February 20, 2015, 02:09:26 pm »

Hi,  newbie here.  After creating my model in Anim8tor,  is there anyway I can apply standard   8-bit (256 colored)  *.bmp textures files to the faces of my model ?   Also can high resolution  32-bit colored .bmp files be used to texture models too ?    If  not,  is there any work arounds like  plug-ins or scripts that can be used ?     I plan on exporting my finished model into  .3ds  or  possibly  .obj  format.

My understanding from searching threads here  (and not listed in the manual)  is  that only  24-bit textured .bmp files can be imported and exported on applied models.    Is this a feature  Steve plans to  add to the program ?   Thanks.
Logged

Raxx

  • Administrator
  • Hero Member
  • *****
  • Posts: 1482
    • View Profile
Re: .Bmp textures format question
« Reply #1 on: February 20, 2015, 05:10:34 pm »

Within Anim8or, only 24-bit bmp files are allowed. You are not restricted from swapping them out with any-bit textures after you export to .3ds or .obj. The limitation is only within Anim8or.
Logged

Bman

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: .Bmp textures format question
« Reply #2 on: February 20, 2015, 11:01:43 pm »

Thank Raxx for confirmation.   So that means for me I have to find another program or utility to change the textures back to 8-bit or 32-bit colors on the .3ds model.  Kinda defeats the purpose.  :-)     Is there a reason why Anim8tor only uses 24-bit colors within it's platform and not other color formats ?   Was it just an arbitrary decision or an optimal format when the code was written ?   Thanks.
Logged

thecolclough

  • Sr. Member
  • ****
  • Posts: 890
  • 3D Ignoramus 1988-2002, Anim8or User 2002-present.
    • View Profile
    • www.mattghc.com
Re: .Bmp textures format question
« Reply #3 on: February 21, 2015, 06:04:31 am »

i'd imagine (from what i know of image formats generally, admittedly not so much from programming experience) it should be relatively easy for steve to implement support for 32-bit RGBA .bmps, as they're effectively the same as 24-bit .bmps except with one extra channel bolted on (which the software can ignore if necessary), but i'd expect 8-bit is fiddlier as you'd have to translate the information into 24-bit (i.e. 8-bit-per-channel) format before you could use it, and not all 8-bit formats handle colour the same way.
Logged

Trevor

  • Full Member
  • ***
  • Posts: 220
  • Goldfinger64 Dev OS:10 CPU:5960x Gfx:RX480
    • View Profile
    • LS Tech Services
Re: .Bmp textures format question
« Reply #4 on: February 21, 2015, 12:46:06 pm »

http://fgfc.ddns.net/An8bmpTest.zip

I attach a sample of bmps that are made in 2 ways, 1 by MSpaint, the other by Pixleformer.

An8 does not only support 24bit, but I would love it for steve to support all formats and get rid of this obscurity.

The zip contains the following:
10 Bmps
1 Gif
1 Test an8 file to see errors
1 Image of all images Property Sheets.

The bmps are of the following formats:
4Bit
8Bit
16Bit - MSPaint Output 24Bit
24Bit
32Bit - MSPaint Output 24Bit

NOTE!: MSPaint converted 16 & 32 Bits TO 24Bit, I include only for completness of table.

All Alpha Values are 255 (Opaque) although Im sure that pixleformer doesnt even output alpha in 4 and 8 bit pallets.
It would be great if pallete alpha was supported too.
Gif has red=Alpha0, just to prove it works


So, an8 supports:
8Bit as exported by Pixleformer
24Bit by anything
Gif

4Bit will not crash an8 like it used to, but it loads a corrupt copy (See yellow).



Formats left to right:
16, 24, 4, 32, 8

Hope all this helps,
Trev

P.S.

There is one difference I can see between Pixleformer 8bit and MSPaint.
Mspaint has an aditional section
Code: [Select]
 ì…†8Â…ÿ\Fhh ¬S¬S·)_&.à…ÿ\„ &6?LÊX„öV@_@_`_›¿`_›¿°iìX@_ÐÈXÐÈXìX@_4öV#@_üWordPerfect GraphicsmattY@_ÐÈXÆ@_•ðÐÈXÐÈXdPdP8öVÄöVhJI_¤öVz@_ „F‡ÐöVpÚI_÷ØÇ¿¿W÷zü¤âœ¿p M(M‡ßWâ(MoZ‡éJWdo M(MZ‡VB‡V‚(M‡î÷¿wã¢÷¿•”÷Vp©`BY4 £÷¿X”V‚Z&|Ž‡Pd‚.BôMO'M†ó÷¤‡^Œ‡‚Þà‹ÂÇ&|&|÷à‡™—>$.#
Code: [Select]
1D 0B
7F 16 EC 85 86 38 C2 85
FF 5C 00 00 00 00 46 00
68 0F 68 0F 0C 00 AC 53
02 00 AC 53 7F 16 B7 29
5F 17 26 00 2E 00 E0 85
FF 5C 84 00 00 00 0C 00
1D 00 26 00 36 00 3F 00
4C CA 58 00 84 F6 56 00
18 10 40 5F 18 10 40 5F
01 00 00 00 60 5F 9B BF
60 5F 9B BF B0 0E 69 00
EC 58 40 5F D0 C8 58 00
D0 C8 58 00 EC 58 40 5F
34 F6 56 00 23 1F 40 5F
FC 04 00 00 12 01 00 00
57 6F 72 64 50 65 72 66
65 63 74 20 47 72 61 70
68 69 63 73 00 6D 61 74
00 00 74 00 00 00 1E 00
0F 00 1E 00 10 59 40 5F
D0 C8 58 00 0F 00 1E 00
C6 1E 40 5F 95 F0 00 00
01 00 00 00 D0 C8 58 00
D0 C8 58 00 64 02 50 00
64 02 50 00 38 F6 56 00
C4 F6 56 00 68 4A 49 5F
00 00 00 00 A4 F6 56 00
7A 1A 40 5F 00 00 00 00
00 00 00 00 20 00 00 00
84 05 00 00 00 00 00 02
46 87 00 00 D0 F6 56 00
70 DA 49 5F 01 00 00 00
00 00 00 00 00 00 00 00
00 00 00 00 F7 05 D8 C7
BF 15 BF 05 57 00 00 00
F7 05 7A FC 7F 01 00 00
00 00 00 00 A4 E2 9C BF
00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00
05 70 00 00 00 00 00 00
00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00
00 00 20 4D 00 00 28 4D
00 00 18 87 DF 7F 57 01
E2 7F 28 4D 01 00 6F 01
5A 87 E9 4A 57 01 64 13
6F 01 20 4D 00 00 28 4D
00 00 5A 87 56 00 42 87
56 00 00 00 00 00 01 00
16 82 01 00 00 00 28 4D
00 00 87 02 EE 13 F7 BF
77 01 00 00 E3 A2 F7 BF
95 05 00 00 94 F7 56 00
70 A9 0E 00 60 42 59 00
34 14 00 00 A0 A3 F7 BF
00 00 58 00 94 56 82 07
5A 00 26 7C 00 00 00 00
8E 87 50 64 82 07 2E 02
42 F4 4D 4F 27 4D 01 00
86 F3 00 00 F7 05 A4 87
5E 8C 87 04 82 07 00 00
DE 1C E0 8B C2 C7 26 7C
26 7C F7 05 E0 87 99 13
97 04 3E 24 2E 23



Edit -
ok, Something broke in 1163... If a 4bit bmp is in the texture list and an8 tries to load on startup an8 will crash with an illegal opperation in glu32.dll.

So, while being able to import while running, if you close and re-open it will crash again like before and what others have posted.
« Last Edit: February 28, 2015, 11:51:42 am by Trevor »
Logged

Steve

  • Administrator
  • Hero Member
  • *****
  • Posts: 2126
    • View Profile
Re: .Bmp textures format question
« Reply #5 on: February 28, 2015, 08:39:05 pm »

OK I think I have them all working.  This will be in the next build.  I also posted them as reference-images for clarity.

Note: There are a couple of bugs in An8bmpTest.zip. In the material "32fp" the texture name is listed as "32PF" but the texture name is "32pf".  There's a similar problem with "16PF".  If you reload these textures into the two materials it will all work as expected.

(Thanks for all the test cases!)


« Last Edit: February 28, 2015, 08:50:18 pm by Steve »
Logged

Trevor

  • Full Member
  • ***
  • Posts: 220
  • Goldfinger64 Dev OS:10 CPU:5960x Gfx:RX480
    • View Profile
    • LS Tech Services
Re: .Bmp textures format question
« Reply #6 on: March 01, 2015, 07:57:11 am »

Yay, thats wounderfull news, now all our textures should work as-is without any adgustments.

Just one final thing related to textures, Id love an option to have the default texture combiner mode to be 'ModulateRGB' AKA Darken, instead of Decal.
Of course, your implementation of decal is also wrong as shading should be ignored even from lights if im not mistaken.

Trev
Logged

Steve

  • Administrator
  • Hero Member
  • *****
  • Posts: 2126
    • View Profile
Re: .Bmp textures format question
« Reply #7 on: March 01, 2015, 03:02:12 pm »

Decal refers how the texture is combined with the particular material color property: ambient, diffuse, specular, emissive. If you use a decal blending with the diffuse color then it will simply replace whatever color that was with the texture's color. It will still be lit in the same way that a normal diffuse layer is lit.

If you want the color of the material to be exactly the texture's color, independent of lighting, then assign it to the emissive texture using decal blending, and set Kambent = Kdiffuse = Kspecular = 0, Kemissive = 1.
Logged

Trevor

  • Full Member
  • ***
  • Posts: 220
  • Goldfinger64 Dev OS:10 CPU:5960x Gfx:RX480
    • View Profile
    • LS Tech Services
Re: .Bmp textures format question
« Reply #8 on: March 03, 2015, 07:51:30 am »

"If you want the color of the material to be exactly the texture's color, independent of lighting, then assign it to the emissive texture using decal blending, and set Kambent = Kdiffuse = Kspecular = 0, Kemissive = 1."

Well, yes, I did know about doing that, I was simply refering to the combiner equasion related to Decal
(0-0)*0+Tex
As compared to ModulateRGB (Darken)
(Tex-0)*Shade+0



"Decal refers how the texture is combined with the particular material color property: ambient, diffuse, specular, emissive. If you use a decal blending with the diffuse color then it will simply replace whatever color that was with the texture's color. It will still be lit in the same way that a normal diffuse layer is lit."

Anyway, Yes, thats exactly what I was saying, Decal ignores the diffuse colour property. My suggestion was to add an option in the options menu to set the default for all new materials.
All the textureing work I do I have to set to darken (even if using lights) because invariably I need to colour a texture.

Trev
Logged