[OPTing] texture limits

Need help editing the game? Check for help here!

Moderators: Darksaber, General_Trageton, Forceflow

Re: [OPTing] texture limits

JeremyaFr
Lieutenant
XWAU Member
Posts: 818
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
XWAU Member
Posts: 818
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: 492
Joined: Mon Apr 05, 2004 11:01 pm

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

Perfect. Thanks
W-I-P: ISD-II, XQ-1 Platform1, New Escort Carrier Hangar, & Misc.

JeremyaFr
Lieutenant
XWAU Member
Posts: 818
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: 492
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.
W-I-P: ISD-II, XQ-1 Platform1, New Escort Carrier Hangar, & Misc.

JeremyaFr
Lieutenant
XWAU Member
Posts: 818
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: 9411
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: 492
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.
W-I-P: ISD-II, XQ-1 Platform1, New Escort Carrier Hangar, & Misc.

User avatar
General_Trageton

Fleet Admiral (Administrator)
Posts: 11690
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 | My Steam Workshop

JeremyaFr
Lieutenant
XWAU Member
Posts: 818
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: 492
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.
W-I-P: ISD-II, XQ-1 Platform1, New Escort Carrier Hangar, & Misc.

JeremyaFr
Lieutenant
XWAU Member
Posts: 818
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
XWAU Member
Posts: 818
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: 9411
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: 1238
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?

Bman
Ensign
Posts: 492
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
W-I-P: ISD-II, XQ-1 Platform1, New Escort Carrier Hangar, & Misc.

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

Post by Bman » Thu May 17, 2018 3:08 am

Question... traditionally the fighter craft (for example the X-wing) has had a maximum of four different FG colors - Red, Y, B, & G. Since the texture file count-patch allows more images per .opt model, is it possible to hook more FG colors? i.e. expand to 6 or more possible separate FG textures ? Not even sure how AlliED editor would work with that if possible.
W-I-P: ISD-II, XQ-1 Platform1, New Escort Carrier Hangar, & Misc.

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

Post by JeremyaFr » Thu May 17, 2018 8:17 pm

Hello,

We can already have more than 4 different markings (FG colors). The game engine has no limit for them. So I think the maximum would be 127.
See the the colored rectangles in this image. I've edited the A-Wing to add 6 more markings.
markings_10.png
markings_10.png (90.65 KiB) Viewed 305 times
But for some reasons, AlliED doesn't work with more than 4 differents markings. I haven't check whether YOGEME can handle them.
Last edited by JeremyaFr on Thu May 17, 2018 8:39 pm, edited 1 time in total.

User avatar
ual002
Cadet 1st Class
Galactic Empire
Posts: 149
Joined: Wed Sep 24, 2008 2:23 am

Post by ual002 » Thu May 17, 2018 8:36 pm

Yogme isnt set up for it but if the hook exists you can throw a ticket into the Yogme github to request support. I support this. I am more likely to start texturing before modeling and have been wondering this myself.

User avatar
Darksaber

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

Post by Darksaber » Thu May 17, 2018 9:32 pm

Hmm interesting, so until we can change a mission to use more than 4 Flightgroups there's no point changing any opts to add more textures, so it'll have to be put on the backburner :(
Good Things Come To Those Who Wait....
Darksaber's X-Wing Station

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

Post by Bman » Fri May 18, 2018 12:16 pm

Yep, if the Yogme editor can be updated that means the X-wing model could now have all six Red Squadron markings plus the generic Xwing FG, each with it's own colors: R,Y,B,G, so theoretically 28 different FG texture maps ( 7 FG markings x 4 colors). Even more...if someone wanted to add burn marks and other fancy texture effects.

Also, the cool thing is all the different droid head meshes could be added concurrently and the trick is they would only have 4 visible and 24 transparent/invisible textures when the other FG textures are in use. The file size would be a little larger but worth it. :-)

Troy Dangerfield's e-mail is no longer valid.
W-I-P: ISD-II, XQ-1 Platform1, New Escort Carrier Hangar, & Misc.

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

Post by JeremyaFr » Sat May 19, 2018 7:19 pm

Hello,
As a workaround, you can now set the markings outside the mission tie file by creating a txt file.
See viewtopic.php?p=154246#p154246

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

Post by Bman » Sun May 20, 2018 12:49 am

Wonderful Jeremy! Just awesome. That allows more flexibility with limited ship slots. :-)
W-I-P: ISD-II, XQ-1 Platform1, New Escort Carrier Hangar, & Misc.

User avatar
ual002
Cadet 1st Class
Galactic Empire
Posts: 149
Joined: Wed Sep 24, 2008 2:23 am

Post by ual002 » Tue May 22, 2018 2:14 am

Question... are there examples of different models attached to seperate flight group colors or does it only affect textures?

I ask because if multiple models and textures can occupy a single slot, then we have the ability to condense specific groupings of like ships into a single slot. ISD I and ISD II occupying the same slot for instance with multiple livery variations of each. VSDs, calamari classes, etc.

Now I am realizing a few limitations... first, an editor that can select beyond the standard 4 FG colors, and second, variations in ship stats, specifically shields and engine speeds... and finally the tech library.

This is mainly a thought exercise but the potential to have the same ship with minor model details and colors is very exciting. For example... a YT1300 model with and without nose cone, with variations of color scheme. Artistic and unique interpretations of smuggler and trader models of YT2000s, 2400s and even murian transports.

Post Reply