[OPTing] texture limits

Need help editing the game? Check for help here!

Moderators: Darksaber, General_Trageton, Forceflow

Re: [OPTing] texture limits

JeremyaFr
Lieutenant JG
XWAU Member
Posts: 624
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Sun Dec 14, 2014 12:29 am

I note the features request.

JeremyaFr
Lieutenant JG
XWAU Member
Posts: 624
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Tue Dec 23, 2014 12:51 am

An update of Xwa Dat Editor:
modified:
  • replaced nQuant with JeremyAnsel.ColorQuant
added:
  • select a color key by clicking on the image
  • make transparent a range of colors

Bman
Ensign
Posts: 432
Joined: Mon Apr 05, 2004 11:01 pm

Post by Bman » Tue Dec 23, 2014 8:27 am

Perfect. Thanks

JeremyaFr
Lieutenant JG
XWAU Member
Posts: 624
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Sun Feb 08, 2015 11:32 pm

Another limit related to textures is broken.

When there are more than 1624 textures, the game outputs "Not enough D3DTextures" and uses the last created texture.
See Hangar craft textures corrupted

Here is a fix for that: I have replaced 1624 with 10000. This value is editable in a config file.

Bman
Ensign
Posts: 432
Joined: Mon Apr 05, 2004 11:01 pm

Post by Bman » Mon Feb 09, 2015 2:23 am

Excellent again. Thanks!

To summarize, this means any mission file can have up to 96 unique .opt models used concurrently in a given region regardless of Flight Group size 1 wave x 1 craft type, or maxing out a FG of 1 x 6 (i.e. x-wings) crafts. Waves have no limits. The hangar will no longer display corrupted/misapplied textures.

JeremyaFr
Lieutenant JG
XWAU Member
Posts: 624
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Mon Feb 09, 2015 2:46 am

The crafts count of 96 per region (or 36 for melee missions) is hard coded. This value is then used to allocate a dynamic buffer. So it could be editable by modifying a few bytes. Need to be tested.

The limit of 192 flightgroups per mission can't be removed.

User avatar
Darksaber

Fleet Admiral (Administrator)
Posts: 9201
Joined: Mon Jan 10, 2000 12:01 am
Contact:

Post by Darksaber » Mon Feb 09, 2015 7:00 pm

Excellent work again Jeremy, amazes me how you find and know what all these offsets do, clever fello :D

The New hook hangar dll system look pretty straight forward :)
Good Things Come To Those Who Wait....
Darksaber's X-Wing Station

Rasalas
Cadet 2nd Class
Posts: 50
Joined: Fri Jan 17, 2014 8:09 pm

Post by Rasalas » Mon Feb 09, 2015 8:22 pm

Thanks a lot! :)
JeremyaFr wrote:The crafts count of 96 per region (or 36 for melee missions) is hard coded. This value is then used to allocate a dynamic buffer. So it could be editable by modifying a few bytes. Need to be tested.
While you are at it, please try to increase the max number of simultaneous weapons. Even with the 96 craft limit this gets noticeable when several capships are fighting each other.

Bman
Ensign
Posts: 432
Joined: Mon Apr 05, 2004 11:01 pm

Post by Bman » Tue Feb 10, 2015 3:54 am

Nice catch Rasalas. Yes, I've noticed that too. Also when too many capital ships were engaged, some wouldn't even fire at all until something else was taken out, regardless of what fighter craft FG's are doing. Increasing number turbo cannons, super long range turbo cannons, and short-range turrets (and ion cannon weapons etc.) would be excellent. Some of that depends on W. HP's on opt model being there. BinHexEdit allows some limited modification of editing, (more like the firing rate and number of concurrent cannons) but not to what we all want.

User avatar
General_Trageton

Fleet Admiral (Administrator)
Posts: 11636
Joined: Fri Apr 27, 2001 11:01 pm
Contact:

Post by General_Trageton » Tue Feb 10, 2015 1:28 pm

Agreed. I've noticed that to quite some extent with my Battle of Coruscant shipset, where a lot of the battling ships weren't actually doing anything except following their flight paths.
Your ship, Captain. I need a drink. - Vince Trageton
Vince T's Design HQ | Vince T's X-Wing HQ

JeremyaFr
Lieutenant JG
XWAU Member
Posts: 624
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Thu Feb 12, 2015 11:37 pm

The limit of simultaneous weapons is probably defined close to the offset that defines the craft count limit. So it will be editable.

Bman
Ensign
Posts: 432
Joined: Mon Apr 05, 2004 11:01 pm

Post by Bman » Mon Mar 23, 2015 7:24 am

Hi Jeremy, switching topics to the XwaDatEditor ... can you double check this program when you have some free time? We're pretty sure that when we import a .bmp image to replace an existing image within a .dat file, the editor is either compressing or dumbing down the quality of the image before it's even used by the XWA engine. We've tested with 32-bit, 24-bit, and 8-bit colored .bmp files and setting as type7 or type-24 format with or without Reimar's 32-bit patch for XWA. I maximized my screen with the editor and saw the colors dither downward after importing. Also exporting the imported image is different than the original source file as proof. It's probably not the game engine so this puts hope back into the picture. :-) Thanks.

JeremyaFr
Lieutenant JG
XWAU Member
Posts: 624
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Sat Mar 28, 2015 7:56 pm

The image types in dat files are:
  • type 7
    8-bit indexed colors and 1-bit alpha, rle compressed
  • type 23
    8-bit indexed colors and 8-bit alpha, rle compressed
  • type 24
    8-bit indexed colors and 8-bit alpha
The palette contains up to 256 colors. Each color in the palette is 24-bit RGB.
When importing an image, the editor will set the type to 24.

In the dll, I added support for a type 25 which is 32-bit. Since this type is not functional in-game (WIP), I disabled it in the editor.

So the imported images are reduced to up to 256 colors (each color being 24-bit). The current algorithm generates up to 128 shades per channel.

JeremyaFr
Lieutenant JG
XWAU Member
Posts: 624
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Sun Jan 21, 2018 3:12 pm

Hello,
Here is a new hook.
The opt vertices count per mesh is limited to 512. When a mesh contains more vertices than this limit, the game may crash when the mesh is hit.
The hook fix this crash. By default, the dll will use a value of 4096.

Download link:
xwa_hook_opt_limit.zip

User avatar
Darksaber

Fleet Admiral (Administrator)
Posts: 9201
Joined: Mon Jan 10, 2000 12:01 am
Contact:

Post by Darksaber » Sun Jan 21, 2018 9:32 pm

Cheers Jeremy
Good Things Come To Those Who Wait....
Darksaber's X-Wing Station

User avatar
Driftwood
Lieutenant Commander
XWAU Member
Posts: 1083
Joined: Wed Oct 22, 2003 11:01 pm
Contact:

Post by Driftwood » Sun Jan 21, 2018 10:55 pm

Does this imply that more detailed models are able to be utilized?
Image
R.I.P RSF_Zjon1, RSF_Mac, RSF_Vasquez

Bman
Ensign
Posts: 432
Joined: Mon Apr 05, 2004 11:01 pm

Post by Bman » Mon Jan 22, 2018 3:24 am

Excellent and Thank you Jeremy!!!!!! 4096 vertices or more, per mesh. Incredible breakthrough.
That leaves flexibility for a lot more detail and less emphasis on texturing detail. Plus that would allow for enough meshes for LOD's (distance) to help take stress off the CPU with high-end models. We can still assume the maximum 50 meshes per .opt model is still in effect. Now I can make the ISD-II Avenger look even more wicked and closer to film model. :D

Post Reply