Go Back   AC3D Forums > General > AC3D Suggestions
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Display Modes
Old 4th July 2007, 04:34 PM   #11
0xdeadbeef
Junior Member
Junior member
 
Join Date: Jul 2007
Posts: 9
Default Re: Suggestions / TGA Bug / RealFlight G3.x (KEX) support

Ok, it's not that I give up easily. Indeed I found that TGAs provided with RealFlight load ok in AC3D. Then I loaded such a file in PaintShopPro 10 and just saved it again. This file showed the same blueish tint etc. in AC3D while other applications displayed it correctly. I did a hex compare of both file versions then.

The original TGA working with AC3D starts like this:
00 00 02 00 00 00 00 00 00 00 00 00 00 04 00 04 20 08 xx yy zz

The files stored by PaintShopPro 10 start like this:
01 00 02 00 00 00 00 00 00 00 00 00 00 04 00 04 20 08 00 xx yy

There are two differences: the file stored by PSPX starts with a 1 instead of a 0 and it has an additional 0 after this header.

Now I patched my own TGA by changing the first byte to a zero and deleting the zero after the header and voilą: it's displayed correctly in AC3D.

Now I did some research on the TGA header and found this:

typedef struct
{
byte identsize; // size of ID field that follows 18 byte header (0 usually)
byte colourmaptype; // type of colour map 0=none, 1=has palette
byte imagetype; // type of image 0=none,1=indexed,2=rgb,3=grey,+8=rle packed
short colourmapstart; // first colour map entry in palette
short colourmaplength; // number of colours in palette
byte colourmapbits; // number of bits per palette entry 15,16,24,32
short xstart; // image x origin
short ystart; // image y origin
short width; // image width in pixels
short height; // image height in pixels
byte bits; // image bits per pixel 8,16,24,32
byte descriptor; // image descriptor bits (vh flip bits)
// pixel data follows header

} TGA_HEADER


So obviously the TGA files stored with PSPX are correct: they have a 1 byte ident that's 0. And quite obviously my (newest) version of AC3D can't cope with that. It seems to ignore the ID size and use the ID byte as first image byte. Thus alpha channel and color channels get messed.

Last edited by 0xdeadbeef; 4th July 2007 at 04:44 PM.
0xdeadbeef is offline   Reply With Quote
Old 6th July 2007, 05:13 AM   #12
Andy
Administrator
Professional user
 
Andy's Avatar
 
Join Date: Jun 2003
Posts: 4,563
Default Re: Suggestions / TGA Bug / RealFlight G3.x (KEX) support

Here's a new tga plugin (Windows) for you to try. (unzip and put the plugin in the plugins folder)

Please let us know if this fixes the problem.
Attached Files
File Type: zip tgaload.zip (22.5 KB, 307 views)
Andy is offline   Reply With Quote
Old 6th July 2007, 10:50 AM   #13
0xdeadbeef
Junior Member
Junior member
 
Join Date: Jul 2007
Posts: 9
Default Re: Suggestions / TGA Bug / RealFlight G3.x (KEX) support

Quote:
Originally Posted by Andy View Post
Here's a new tga plugin (Windows) for you to try. (unzip and put the plugin in the plugins folder)

Please let us know if this fixes the problem.
Yes, thanks, works for me.
As we're at it: any chance that AC3D will support pivots as described anytime soon?
0xdeadbeef is offline   Reply With Quote
Old 6th July 2007, 11:00 AM   #14
Andy
Administrator
Professional user
 
Andy's Avatar
 
Join Date: Jun 2003
Posts: 4,563
Default Re: Suggestions / TGA Bug / RealFlight G3.x (KEX) support

Great.

Pivots - possibly in the future. At the moment, you have the object-centers with no rotational data maintained/stored.
Andy is offline   Reply With Quote
Old 8th July 2007, 06:34 PM   #15
0xdeadbeef
Junior Member
Junior member
 
Join Date: Jul 2007
Posts: 9
Default Re: Suggestions / TGA Bug / RealFlight G3.x (KEX) support

Please consider adding pivots! As stated above, there's not much that's missing in AC3D to create models for RealFlight. As far as I can see, only the following three things are missing:

1) Support for 3d pivots as described

2) Support for assigning names to materials (e.g. the materials named ~CANOPY are displayed two sided and considering the alpha channel in RealFlight). Should be cake. At the moment, AC3D seems to support only material numbers.

3) Real hierarchy support. While AC3D is able to somewhat preserve the imported hierarchy of a 3DS file, it doesn't seem to be possible to create parent-child relationships, but only groups. E.g. it's not simply possible to move one object "below" another object in the hiearchy. I guess the only way would be to create some dummy object and group them, but this is quite a hassle (and there don't seem to be explicite "NULL" objects).

In the mean time I found that there really are translational "gizmos", but only in the 3D view and hardly visible. There are no rotation gizmos though. Maybe it would be a good idea to introduce the same (colored) translation/rotation gizmos as in 90% of other 3D modellers. Translation/rotation gizmos and pivot are usually more or less the same thing, so this would be a logical step when introducing pivots anyway.
0xdeadbeef is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



All times are GMT -4. The time now is 11:44 PM.


AC3D Forum
(C) Inivis Limited 2020