Page 3 of 5

Re: [OPTing] texture limits

Posted: Sun Dec 14, 2014 12:29 am
by JeremyaFr
I note the features request.

Re: [OPTing] texture limits

Posted: Tue Dec 23, 2014 12:51 am
by JeremyaFr
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

Re: [OPTing] texture limits

Posted: Tue Dec 23, 2014 8:27 am
by Bman
Perfect. Thanks

Re: [OPTing] texture limits

Posted: Sun Feb 08, 2015 11:32 pm
by JeremyaFr
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.

Re: [OPTing] texture limits

Posted: Mon Feb 09, 2015 2:23 am
by Bman
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.

Re: [OPTing] texture limits

Posted: Mon Feb 09, 2015 2:46 am
by JeremyaFr
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.

Re: [OPTing] texture limits

Posted: Mon Feb 09, 2015 7:00 pm
by Darksaber
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 :)

Re: [OPTing] texture limits

Posted: Mon Feb 09, 2015 8:22 pm
by Rasalas
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.

Re: [OPTing] texture limits

Posted: Tue Feb 10, 2015 3:54 am
by Bman
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.

Re: [OPTing] texture limits

Posted: Tue Feb 10, 2015 1:28 pm
by Vince T
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.

Re: [OPTing] texture limits

Posted: Thu Feb 12, 2015 11:37 pm
by JeremyaFr
The limit of simultaneous weapons is probably defined close to the offset that defines the craft count limit. So it will be editable.

Re: [OPTing] texture limits

Posted: Mon Mar 23, 2015 7:24 am
by Bman
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.

Re: [OPTing] texture limits

Posted: Sat Mar 28, 2015 7:56 pm
by JeremyaFr
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.

Re: [OPTing] texture limits

Posted: Sun Jan 21, 2018 3:12 pm
by JeremyaFr
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

Re: [OPTing] texture limits

Posted: Sun Jan 21, 2018 9:32 pm
by Darksaber
Cheers Jeremy

Re: [OPTing] texture limits

Posted: Sun Jan 21, 2018 10:55 pm
by Driftwood
Does this imply that more detailed models are able to be utilized?

Re: [OPTing] texture limits

Posted: Mon Jan 22, 2018 3:24 am
by Bman
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

Re: [OPTing] texture limits

Posted: Thu May 17, 2018 3:08 am
by Bman
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.

Re: [OPTing] texture limits

Posted: Thu May 17, 2018 8:17 pm
by JeremyaFr
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
But for some reasons, AlliED doesn't work with more than 4 differents markings. I haven't check whether YOGEME can handle them.

Re: [OPTing] texture limits

Posted: Thu May 17, 2018 8:36 pm
by ual002
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.

Re: [OPTing] texture limits

Posted: Thu May 17, 2018 9:32 pm
by Darksaber
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 :(

Re: [OPTing] texture limits

Posted: Fri May 18, 2018 12:16 pm
by Bman
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.

Re: [OPTing] texture limits

Posted: Sat May 19, 2018 7:19 pm
by JeremyaFr
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

Re: [OPTing] texture limits

Posted: Sun May 20, 2018 12:49 am
by Bman
Wonderful Jeremy! Just awesome. That allows more flexibility with limited ship slots. :-)

Re: [OPTing] texture limits

Posted: Tue May 22, 2018 2:14 am
by ual002
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.