[OPTing] a new opting tool is under construction

Need help editing the game? Check for help here!

Moderators: Darksaber, General_Trageton, Forceflow

Re: [OPTing] a new opting tool is under construction

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

Post by Bman » Thu Mar 24, 2016 7:46 am

Thanks Jeremy. I just tested on a model that has some textures at 1024 x 1024 and other smaller textures. When I click on Palette 9 which brightens the whole texture (did the same for just three out a number of textures) and then save the .opt model, it does not seem to brighten anything in-game. My .opt model still looks dark in-game even with background planet/Star images. All textures are standard 8-bit indexed colors I'm using on a model.

Next, i tried using the bottom section of your Illumination tab screen. When I "set illumination" from color range of black [R0,G0,B0] to white [R255,G255, B255] to illuminate everything and saved, but the game crashes when a mission loads. I'm using Win8.1 O/S. It is crashing at Exception Offset 00041919.

Also, could you explain to us how to properly use this new Illumination screen ? It appears to me the top section is similar in functionality to how OptEnhancer worked, and bottom section is more like OpTech's Illumination screen where you pick specific color ranges to illuminate pixels from a texture. Perhaps I'm not using it correctly? Thanks.
Last edited by Bman on Fri Apr 01, 2016 2:06 am, edited 2 times in total.

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

Post by JeremyaFr » Sat Mar 26, 2016 4:50 pm

Hi Bman,

To set illumination, you first select a color or a color range. Then you click on "Make illuminated".The selected color or color range will be illuminated. Illumination has effect only on 8-bit textures.
To remove illumination, you can click on '"Reset illumination".

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

Post by JeremyaFr » Sun Mar 27, 2016 10:12 am

Bman wrote:Anyway, what about the top section of your illumination screen? When i selected Pallate 9 or higher to brighten the whole texture map, it doesn't change anything in-game.
The top section is just a viewer. It doesn't have any effect on the opt file.

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

Post by JeremyaFr » Wed Mar 30, 2016 6:46 pm

Bman wrote:When I "set illumination" from color range of black [R0,G0,B0] to white [R255,G255, B255] to illuminate everything and saved, but the game crashes when a mission loads.
It seems that the game doesn't like when a texture larger than 256x256 has illumination. It crashes while checking consecutive lightmaps. Internally it uses a static buffer whose the size is 87360 (256*256 + 128*128 + 64*64 + 32*32 + 16*16 + 8*8).

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

Post by JeremyaFr » Sun Apr 03, 2016 4:26 pm

Bman wrote:Any creative ways to get around static buffer's size limitation with an offset change or hooked .dll file ?
Hello,
I've hooked the function and replaced the static buffer with a dynamic one.

xwa_hook_lightmaps.zip

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

Post by Bman » Tue Apr 12, 2016 5:42 am

Previous update: I've extensively tested with texture .png maps 1024x1024 and 512x512 with and without an alpha channel added to the maps, in GIMP for example. i.e. "Set Color To Alpha" using pure black, white, and in between. So far it appears the best scenario is to Not have an alpha channel saved with the image file in a paint program. The best solution using your illumination screen seems to be to Set Illumination for the range of pure black R=0,G0,B0 through pure white R255, G255, B255 for each texture map greater than 256x256 pixels. This will solve darkness effect of models in-game. But no shadows will fall on model where needed, and colored light reflecting from stars/planets/nebulae does not seem to cast on the model correctly either. Hope this helps. Thanks.

Edit: Also tested.... Do not use Optech to import models with textures greater than 256x256 pixels. The export .opt model will crash the game.
Last edited by Bman on Wed Apr 13, 2016 2:46 am, edited 1 time in total.

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

Post by JeremyaFr » Tue Apr 12, 2016 11:21 am

UPDATE
I''ve fixed a crash with hook_lightmaps.

User avatar
thick
Cadet 4th Class
Posts: 16
Joined: Sun Sep 18, 2016 4:42 pm

Post by thick » Mon Oct 03, 2016 6:06 pm

Hello Jeremy,

I've been going crazy with this error and cannot determine the cause. Was hoping you or someone would be able to assist. http://i.imgur.com/a39EEh2.png

It seems to reference filename, I have tried all sorts of filenames, different variations, moving the obj file around etc. But it continues to fail when I try to upload the OBJ. The OBJ has 360 vertices total, so it doesn't seem to be caused by limitation in that regard.

Thanks!

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

Post by JeremyaFr » Mon Oct 03, 2016 6:36 pm

Hello thick,

The supported file formats for textures are:
  • *.bmp
  • *.png
  • *.jpg
  • *.gif

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

Post by Bman » Thu Jan 25, 2018 3:46 am

Hello Jeremy, I just remembered OpTech still cannot process high end models taking advantage of your new discovery of removing the texturing limits and mesh-vertice limitations. Right now, it is the only compiling program that can do opting process (from .opz,--->.opt) and has other features that are needed. Do you plan on adding the same Optech features into to your XWAOptEditor tool ?

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

Post by JeremyaFr » Sat Jan 27, 2018 4:24 pm

UPDATE
Hello,
I've updated the editor.
Now, when a 8-bit texture is imported, it will remain in 8-bit instead of being converted to 32-bit.

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

Post by Bman » Sat Jan 27, 2018 9:28 pm

Thank you, that's very helpful.

GOOD NEWS... Derek Del Rio (Jedi Hunter/Com Trooper) and author of Optech wrote he is going to look for his source code for his editor and release it for XWA community. It was written in Visual Basic Studio 98 but could be converted to C/C++ . Jeremy, could you compile and incorporate his source files into your editor ? That way you wouldn't have to write things from scratch that are not yet in your editor. Just review and update code more efficiently. If not feasible, I think I could update the visual basic source files and remove vertice-mesh check and 8-bit color texture limits. Optech.hlp Help file would need to be dumped into an .xml, or .html file with images for modern O/S.

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

Post by JeremyaFr » Sat Jan 27, 2018 9:43 pm

Great news. :shock:
It would be very helpful to have access to the source code.

User avatar
Darksaber

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

Post by Darksaber » Sat Jan 27, 2018 9:52 pm

That's good news, Optech is one of the best tools, but, there where a few thing I would have liked adding or changing, like a better way to tile similar to that of Ace_Dxf
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 Feb 11, 2018 5:35 am

Screenshot 2018-02-10 21.32.04.png
Screenshot 2018-02-10 21.32.04.png (76.29 KiB) Viewed 454 times
Having an error pop up frequently now, I'm not sure why as it seems to affect almost every obj I'm trying to import now that I've loaded in blender previously.
Image
R.I.P RSF_Zjon1, RSF_Mac, RSF_Vasquez

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

Post by JeremyaFr » Sun Feb 11, 2018 9:15 am

Hello,
Does the error pop up with the latest version of XwaOptEditor?
XwaOptEditor-1.0.15.zip (link on the right)

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

Post by Driftwood » Sun Feb 11, 2018 3:54 pm

Screenshot 2018-02-11 07.36.46.png
Screenshot 2018-02-11 07.36.46.png (76.06 KiB) Viewed 415 times
Different error, but I suspect the same thing.

One thing to note is that the models that I am trying to convert over use .tga as the texture format, which I have to convert over to .png.

Sometimes they have transparencies that show up in the opt editor that need removed. Generally I can handle getting that converted without issue. However, that said before downloading the new opt editor version I've been getting a mtllib file error pretty consistently. I don't have a screenshot of the error popup itself because I've been frantically restarting the conversion process trying to fix the error, and have no modified file to load. I presume that it has to do with losing a "material" source file when I changed over to either .png. For some reason. I don't know why as I didn't have issue with this previously. So it's entirely possible I'm goofing something up (that isn't obvious as the model looks the way I want it to on export).

I'm trying to figure out what I'm doing consistently, or what the common denominator is, and it's driving me quite mad because it doesn't make any sense as I'm fairly certain my process is the same each time.

For instance, I have a Rihkxyrk fighter model from SWG (black sun heavy fighter)

The original model is:
black_sun_heavy_fighter

Converted the textures to .png, removed the transparencies by unchecking the alpha channel usage in blender. Selected the whole model and hit export to .obj.

Doesn't work.

I also have a previously exported version of it:
Rihkxyrk

Converted the textures without using the alpha channel box (I think possibly) But they're more desaturated and I get a better result with the other option checked. Model imports into the opt tool just fine.

I reload and tweak the textures or modify the model in any way, re-export to .obj. Rename as Rihkxyrk2.obj
Doesn't work.

:irre:
Image
R.I.P RSF_Zjon1, RSF_Mac, RSF_Vasquez

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

Post by JeremyaFr » Sun Feb 11, 2018 4:24 pm

Hello,
The error means that the model contains a texture with an unsupported file format.
Supported texture file formats are BMP, PNG, JPG and GIF.

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

Post by Driftwood » Sun Feb 11, 2018 8:28 pm

Hmm, then there must be something not converting correctly to png format before import.

Good news is though I fixed this and one issue involving missing/desaturated textures related to the alpha channel by opposing up the uv editor and overwriting the tga and then resaving the the as png. The model I've been working with has finally imported correctly and I can start OPTimizing it.
Image
R.I.P RSF_Zjon1, RSF_Mac, RSF_Vasquez

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

Post by Driftwood » Tue Feb 13, 2018 2:13 am

How do I do flight group colors? I vaguely (maybe) remember how in optech, but I have no idea how in this editor.
Image
R.I.P RSF_Zjon1, RSF_Mac, RSF_Vasquez

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

Post by JeremyaFr » Tue Feb 13, 2018 1:05 pm

In Edit > Face Groups > Textures.
Click Add to add a new flight group color or Browse to select an existing one.

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

Post by Bman » Sat Feb 24, 2018 3:57 am

.
Last edited by Bman on Sat Feb 24, 2018 10:41 pm, edited 2 times in total.

User avatar
Darksaber

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

Post by Darksaber » Sat Feb 24, 2018 1:09 pm

Sent you an email mate
Good Things Come To Those Who Wait....
Darksaber's X-Wing Station

Post Reply