Previous Thread
Next Thread
Print Thread
Rate This Thread
Hop To
Page 1 of 3 1 2 3
#4239132 - 03/12/16 02:41 PM Glide 3 graphics  
Joined: Jun 2001
Posts: 13,341
Col. Gibbon Offline
A nobody
Col. Gibbon  Offline
A nobody
Veteran

Joined: Jun 2001
Posts: 13,341
I was just wondering, as Glide 3 happily uses BMP files, in 256x256 and 512x512 24bit, do we really need 8bit support in TPC format anymore?

Any old TPC and easily be converted to BMP, and a lot of more modern skins are BMP anyway, and by not loading TPC's a large chunk of memory would be saved, and make the game load faster.

Win, Win?


Supports EAW 1.29.exe, Drop in and Play Technology. wink

1.29 download
Inline advert (2nd and 3rd post)

#4239136 - 03/12/16 04:31 PM Re: Glide 3 graphics [Re: Col. Gibbon]  
Joined: Feb 2006
Posts: 4,859
Rotton50 Offline
3DZ / campaign designer
Rotton50  Offline
3DZ / campaign designer
Senior Member

Joined: Feb 2006
Posts: 4,859
Cape Charles, Virginia, USA
Would this entail converting all the existing planes?


Heck, even paranoids have enemies.
#4239166 - 03/12/16 06:26 PM Re: Glide 3 graphics [Re: Col. Gibbon]  
Joined: Jun 2001
Posts: 13,341
Col. Gibbon Offline
A nobody
Col. Gibbon  Offline
A nobody
Veteran

Joined: Jun 2001
Posts: 13,341
No Ray, just converting an 8bit PCX to 24bit BMP.

You can batch convert files in PSP.

But, it would take a code change to stop the exe looking for 8bit TPC/PCX files and only look for BMP.

The only snag I can think of are the TRA files, which are not the same as BMP standard 24bit Greyscale Tra.

We would have to think of a way of loading them, alongside the BMP skins.

I wonder if we could use 24bit screens now?

smile


Supports EAW 1.29.exe, Drop in and Play Technology. wink

1.29 download
#4239290 - 03/13/16 03:48 AM Re: Glide 3 graphics [Re: Col. Gibbon]  
Joined: Jan 2006
Posts: 1,506
Brit44 'Aldo' Offline
Every Human is Unique
Brit44 'Aldo'  Offline
Every Human is Unique
Member

Joined: Jan 2006
Posts: 1,506
Jon,
why do you think a large chunk of memory would be saved and what do you call a large chunk? Per pixel 8 bit is less memory. If I remember correct, the code loads 24 bit if found and 8 bit if not, not both.


TPA who TWI
"The 10th Amendment simply says that any powers that aren’t mentioned in the Constitution as belonging to the government belong to the states themselves."
#4239333 - 03/13/16 10:22 AM Re: Glide 3 graphics [Re: Col. Gibbon]  
Joined: Apr 2002
Posts: 12,497
MrJelly Offline
Veteran
MrJelly  Offline
Veteran

Joined: Apr 2002
Posts: 12,497
Montagnac, L'Herault, France
Thanks Allen. That is what I suspected too smile

Quote:
I wonder if we could use 24bit screens now?


The TPC search is part of the sequence of D3D loading routines which then loads the BMP file if available.

It is not involved in the display of selection screens. Separate routines do this, based on "*.MNU" files which often reference the screen to be used such as "Main2.pic" and the resolution. This is read from the referenced picture in a routine which reads TPC/PIC/MPC files. The game will CTD if the resolution of the picture does not match the resolution defined in the MNU file.
It is a very complex series of inter-related routines, and this is why nobody has ever been able to replace the system with one that reads and displays BMP screens frown

wink


Fly EAW online at GameRanger: GameRanger Site

FaceBook Pages
UAW 160 downloads
EAW Club

Mark Twain: I am quite sure now that often, very often, in matters concerning religion and politics a man's reasoning powers are not above the monkey's.

I am now of an age at which I no longer need to suffer fools gladly
#4239357 - 03/13/16 12:27 PM Re: Glide 3 graphics [Re: Col. Gibbon]  
Joined: Jun 2001
Posts: 13,341
Col. Gibbon Offline
A nobody
Col. Gibbon  Offline
A nobody
Veteran

Joined: Jun 2001
Posts: 13,341
I waS just wondering why we get that file missing error, if we use a sole BMP texture files, without a PCX/TPC?

At the moment we need both file types, for the game to run. Why do we need both to be present when the game now will only use BMP for all skins?


Supports EAW 1.29.exe, Drop in and Play Technology. wink

1.29 download
#4239388 - 03/13/16 03:04 PM Re: Glide 3 graphics [Re: Col. Gibbon]  
Joined: Apr 2002
Posts: 12,497
MrJelly Offline
Veteran
MrJelly  Offline
Veteran

Joined: Apr 2002
Posts: 12,497
Montagnac, L'Herault, France
Here are some edited code lines:
Code:
if (low_res_object_texture)
{
// 3dz files use .pcx extension even though we are using pic/tpc/mpc

len = strlen(P) - 4;   
//reads the length of the name of the file referenced in the 3dz header and shortens it by 4 characters

strncpy(texture_name, P, len);
// creates the base file name

strcat(texture_name, "s.tpc");
// adds "s.tpc" to the base filename to define the low-res texture filename


You would recall that most 3dz files have a header with the ".PCX" extension such as "GRND02.PCX"
The routine reads it to build a filename four characters shorter, making "GRND02"
If it is low res then "s.TPC" is added making "GRND02s.TPC"
This is the low res file that the exe will look for when low res is needed, and report missing if not found.
Similar routines are used to build hi-res filenames and aircraft texture filenames from the 3dz header.

If you make it add ".BMP" instead of ".tpc" the exe compiles, but crashes as soon as it cannot find the ".bmp" file it is looking for.

In later routines if it finds the tpc file it checks for a bmp file with the same name and uses it:
Code:
	len = strlen(texture->Name);  // get the length of the file name	
	strncpy(Mf_name, texture->Name, len); // copy that many charactures to my file name and
	// change the extension 
	Mf_name[len-3] = 'b';
	Mf_name[len-2] = 'm';
	Mf_name[len-1] = 'p';
	Mf_name[ len ] = '\0'; // add an ending null character
	
	if ( (fp = Copen( Mf_name, O_RDONLY | O_BINARY)) != -1) // file FOUND


wink


Fly EAW online at GameRanger: GameRanger Site

FaceBook Pages
UAW 160 downloads
EAW Club

Mark Twain: I am quite sure now that often, very often, in matters concerning religion and politics a man's reasoning powers are not above the monkey's.

I am now of an age at which I no longer need to suffer fools gladly
#4239397 - 03/13/16 04:01 PM Re: Glide 3 graphics [Re: Col. Gibbon]  
Joined: Jun 2001
Posts: 13,341
Col. Gibbon Offline
A nobody
Col. Gibbon  Offline
A nobody
Veteran

Joined: Jun 2001
Posts: 13,341
That's what's always been bazar in our code, this search for PCX, when it uses a TPC!

How about if we batch converted the 3dz file headers from .TPC to .BMP?

The reason I was thinking about this was your comment of a plane set having 200+ textures, 100 of which are 8bit TPC's.

In most of Mike's 24 bit skin sets, the TPC files are just a single colour 8bit grey, so they are just a waste of HD space.


Supports EAW 1.29.exe, Drop in and Play Technology. wink

1.29 download
#4239423 - 03/13/16 05:17 PM Re: Glide 3 graphics [Re: Col. Gibbon]  
Joined: Apr 2002
Posts: 12,497
MrJelly Offline
Veteran
MrJelly  Offline
Veteran

Joined: Apr 2002
Posts: 12,497
Montagnac, L'Herault, France
Quote:
How about if we batch converted the 3dz file headers from .TPC to .BMP?


Obviously you do not understand my replies frown

The exe does not use the extender in the 3dz header.


Fly EAW online at GameRanger: GameRanger Site

FaceBook Pages
UAW 160 downloads
EAW Club

Mark Twain: I am quite sure now that often, very often, in matters concerning religion and politics a man's reasoning powers are not above the monkey's.

I am now of an age at which I no longer need to suffer fools gladly
#4239523 - 03/13/16 10:45 PM Re: Glide 3 graphics [Re: Col. Gibbon]  
Joined: Feb 2006
Posts: 4,859
Rotton50 Offline
3DZ / campaign designer
Rotton50  Offline
3DZ / campaign designer
Senior Member

Joined: Feb 2006
Posts: 4,859
Cape Charles, Virginia, USA
Want to talk about doing away with the middle distance model ( M.3dz ) and possibly the long distance model (S.3dz )?


Heck, even paranoids have enemies.
#4239642 - 03/14/16 09:08 AM Re: Glide 3 graphics [Re: Col. Gibbon]  
Joined: Apr 2002
Posts: 12,497
MrJelly Offline
Veteran
MrJelly  Offline
Veteran

Joined: Apr 2002
Posts: 12,497
Montagnac, L'Herault, France
I just remmed out the loading of the aircraft s.3dz and m.3dz files;
Code:
		sprintf(f_name, "p%st.3dz", "lane"); 
		IsPlaneGraphicFile = plane_type;
		type->PlaneTiny = Load3dObject( f_name ); 

		/*
		IsPlaneGraphicFile = plane_type;
		f_name[5] = 's'; 
		type->PlaneSmall = Load3dObject( f_name ); 
		Wingman3DZF[plane_type][0] = type->PlaneSmall; // Added 2010 MultiSkin CG 
		*/

		IsPlaneGraphicFile = plane_type;
		f_name[5] = 'l'; 
		type->LeftWing = Load3dObject( f_name ); 

		IsPlaneGraphicFile = plane_type;
		f_name[5] = 'r'; 
		type->RightWing = Load3dObject( f_name ); 

		/*
		IsPlaneGraphicFile = plane_type;
		f_name[5] = 'm'; 
		type->PlaneMed = Load3dObject( f_name );
		Wingman3DZM[plane_type][0] = type->PlaneMed; 
		*/
	 

The exe compiled and ran well wink

I am just making a copy of my 140 folder from which I will erase all the aircraft 's' and 'm' files to test again smile


Fly EAW online at GameRanger: GameRanger Site

FaceBook Pages
UAW 160 downloads
EAW Club

Mark Twain: I am quite sure now that often, very often, in matters concerning religion and politics a man's reasoning powers are not above the monkey's.

I am now of an age at which I no longer need to suffer fools gladly
#4239647 - 03/14/16 09:43 AM Re: Glide 3 graphics [Re: Col. Gibbon]  
Joined: Feb 2006
Posts: 4,859
Rotton50 Offline
3DZ / campaign designer
Rotton50  Offline
3DZ / campaign designer
Senior Member

Joined: Feb 2006
Posts: 4,859
Cape Charles, Virginia, USA
Well, that was quick.

How did the planes look in the game? Any change in viewing distance?


Heck, even paranoids have enemies.
#4239648 - 03/14/16 09:46 AM Re: Glide 3 graphics [Re: Col. Gibbon]  
Joined: Apr 2002
Posts: 12,497
MrJelly Offline
Veteran
MrJelly  Offline
Veteran

Joined: Apr 2002
Posts: 12,497
Montagnac, L'Herault, France
An interesting result.
There were no Planem.3dz or Planes.3dz files in the folder.
It ran perfectly.
Then I switched to a previous exe (which has the loading routine for 'm' and 's' files active) and it still ran perfectly.
I now realise that the exe only loads a 3dz file if it is present.
It only spits the dummy if it loads a 3dz file but cannot find the referenced TPC file.
In all I deleted 3104 files from the 140 folder for this test smile


Fly EAW online at GameRanger: GameRanger Site

FaceBook Pages
UAW 160 downloads
EAW Club

Mark Twain: I am quite sure now that often, very often, in matters concerning religion and politics a man's reasoning powers are not above the monkey's.

I am now of an age at which I no longer need to suffer fools gladly
#4239656 - 03/14/16 10:43 AM Re: Glide 3 graphics [Re: Col. Gibbon]  
Joined: Apr 2002
Posts: 12,497
MrJelly Offline
Veteran
MrJelly  Offline
Veteran

Joined: Apr 2002
Posts: 12,497
Montagnac, L'Herault, France
I just made this change
Code:
if (low_res_object_texture)
{
// 3dz files use .pcx extension even though we are using pic/tpc/mpc

len = strlen(P) - 4;   
//reads the length of the name of the file referenced in the 3dz header and shortens it by 4 characters

strncpy(texture_name, P, len);
// creates the base file name

//strcat(texture_name, "s.tpc");
strcat(texture_name, ".tpc");
// Now adds ".tpc" and not "s.tpc" to the base filename to define the low-res texture filename


If a lo-res load occurs and the hi-res file is "MYTEXT.TPC" it loads "MYTEXT.TPC" and not "MYTEXTs.TPC".
So it does not spit the dummy if the "MYTEXTs.TPC" file is missing.
I temporarily removed several TMod "*.s.3dz" files from "FullMata", and there was no problem.

With these changes there seems to be no detrimental effect on display, and if anything it seems better.
The big bonus is that (at least for 140) modders no longer need to make these files as they are no longer used smile

wink


Fly EAW online at GameRanger: GameRanger Site

FaceBook Pages
UAW 160 downloads
EAW Club

Mark Twain: I am quite sure now that often, very often, in matters concerning religion and politics a man's reasoning powers are not above the monkey's.

I am now of an age at which I no longer need to suffer fools gladly
#4239669 - 03/14/16 11:25 AM Re: Glide 3 graphics [Re: Col. Gibbon]  
Joined: Feb 2006
Posts: 4,859
Rotton50 Offline
3DZ / campaign designer
Rotton50  Offline
3DZ / campaign designer
Senior Member

Joined: Feb 2006
Posts: 4,859
Cape Charles, Virginia, USA
Ok, so if I understand correctly, we'd still have to keep the M and S for 1.28 series execs if we offer models for them.

So the advantage is that the number of files in the numerous planesets of the 1.4 series can be reduced by a fair bit. The M and S 3dz's plus their accompanying TPC files.

When you say there wasn't any detrimental effects in the game do you mean the distance that could see the planes was the same?

Another related suggestion.

How about getting rid of the L.3dz related to TMODs? That is the equivalent to the M.3dz for ground models.

Talk about file space and improving game start up speed. With 330 or so TMODs in the new target upgrade package that's 330 3dz files. Of course, most of the L.3dz's are just copies of the H.3dz's ( close view ) and use the same TPC files so you wouldn't get to delete very many texture files.

And then there's the quirky TMOD***s.TPC files. I say quirky because sometimes the game crashes if they're not included and sometimes it doesn't. I've never spent enough time on it to figure out the logic. If the game crashes I just copy the TMOD***.TPC file and add the "s" to the file name.


Heck, even paranoids have enemies.
#4239673 - 03/14/16 12:13 PM Re: Glide 3 graphics [Re: Col. Gibbon]  
Joined: Jun 2001
Posts: 13,341
Col. Gibbon Offline
A nobody
Col. Gibbon  Offline
A nobody
Veteran

Joined: Jun 2001
Posts: 13,341
Guys.

You'll still need the very far dot, and the S.3dz because the S has the wire lines which give you the very far plane.

Dropping the S, will give you a very fuzzy far distance graphic as the exe tries to render a full model, at 4 miles distance. This was a feature lots of people liked.

I thought the M had been dropped, after our last discussion on this subject some months ago?


Supports EAW 1.29.exe, Drop in and Play Technology. wink

1.29 download
#4239676 - 03/14/16 12:23 PM Re: Glide 3 graphics [Re: Col. Gibbon]  
Joined: Apr 2002
Posts: 12,497
MrJelly Offline
Veteran
MrJelly  Offline
Veteran

Joined: Apr 2002
Posts: 12,497
Montagnac, L'Herault, France
Viewing distances were fine smile

That last code I quoted had the change which made the lo-res TMod "s.tpc" unnecessary.
I have also remmed out the loading of the TMod L.3dz.

It is easy enough for me to put these changes into 1.28 exes smile
The best way is to stop the three 3dzs (Aircraft M, S and TMod L) that we do not want to use from being loaded.
Otherwise if you leave one out of a new TMod set of files the 1.28 series exes may use the one in the "3d.CDF" which potentially could cause a problem.
If a 3dz is not loaded, then neither is the TPC that it references.

wink


Fly EAW online at GameRanger: GameRanger Site

FaceBook Pages
UAW 160 downloads
EAW Club

Mark Twain: I am quite sure now that often, very often, in matters concerning religion and politics a man's reasoning powers are not above the monkey's.

I am now of an age at which I no longer need to suffer fools gladly
#4239679 - 03/14/16 12:37 PM Re: Glide 3 graphics [Re: Col. Gibbon]  
Joined: Jun 2001
Posts: 13,341
Col. Gibbon Offline
A nobody
Col. Gibbon  Offline
A nobody
Veteran

Joined: Jun 2001
Posts: 13,341
Tony, What models are you not seeing any change in?

Please test with the original default models, and you will see a difference. Many of the more recent models released do not have the proper S.3dz distance models, with the wire lines, and this effects what you see.


Supports EAW 1.29.exe, Drop in and Play Technology. wink

1.29 download
#4239680 - 03/14/16 12:42 PM Re: Glide 3 graphics [Re: Col. Gibbon]  
Joined: Feb 2006
Posts: 4,859
Rotton50 Offline
3DZ / campaign designer
Rotton50  Offline
3DZ / campaign designer
Senior Member

Joined: Feb 2006
Posts: 4,859
Cape Charles, Virginia, USA
If you can make this happen for the 1.28 series, all for the better.

What would you suggest as the best course of action for modders?

I guess I'm asking if the performance improvement is noticeable or is this more for saving space and model maker convenience ( not that those aren't great improvements )?

Then, would it be a worthwhile project to go back and edit something like SPAW or the target upgrade we've just released?


Heck, even paranoids have enemies.
#4239723 - 03/14/16 03:04 PM Re: Glide 3 graphics [Re: Col. Gibbon]  
Joined: Jun 2001
Posts: 13,341
Col. Gibbon Offline
A nobody
Col. Gibbon  Offline
A nobody
Veteran

Joined: Jun 2001
Posts: 13,341
We discussed this a long time ago when there was a much bigger active community, and at the time the EAW way of distance modelling was found to be best.

OK, graphics cards are better, so as long as the FPS are not hit, dropping the M & L 3dz's can be argued as an improvement. but I remember VBH doing a hack with a 1.2 exe, and deleting the L and extending the view range made the FPS run at less than 10 FPS. At the time, the reason was given that the exe used a lot of CPU, and very little Graphics memory, and this caused a blockage, which slowed the game down. Since we went Glide 3, this problem seems to have improved, but I'd like to see how it runs with a maxed out planes formation, set at low level, and flying close to the ground so Tmods are all visible. That will show the effect of dropping all of those Tmods and M/S3dz's. wink


Supports EAW 1.29.exe, Drop in and Play Technology. wink

1.29 download
Page 1 of 3 1 2 3

Moderated by  RacerGT 

Quick Search
Recent Articles
Support SimHQ

If you shop on Amazon use this Amazon link to support SimHQ
.
Social


Recent Topics
K2-18b - Life?
by RossUK. 04/27/24 10:46 AM
Jim Scoutten was 77
by F4UDash4. 04/27/24 10:35 AM
How Many WW2 Veterans Still Alive 2024?
by F4UDash4. 04/26/24 02:45 AM
Headphones
by RossUK. 04/24/24 03:48 PM
Skymaster down.
by Mr_Blastman. 04/24/24 03:28 PM
The Old Breed and the Costs of War
by wormfood. 04/24/24 01:39 PM
Actors portraying British Prime Ministers
by Tarnsman. 04/24/24 01:11 AM
Roy Cross is 100 Years Old
by F4UDash4. 04/23/24 11:22 AM
Copyright 1997-2016, SimHQ Inc. All Rights Reserved.

Powered by UBB.threads™ PHP Forum Software 7.6.0