Page 1 of 7

[OPTing] OPTech v2

Posted: Tue Mar 19, 2019 7:19 pm
by JeremyaFr
Hello,
After one year of work, here is OPTech v2.
OPTech is a tool to edit X-Wing Alliance's OPT files.

The main change between v1 and v2 is:
Converted the code from VB6 to C# and WPF.

Download link:
https://github.com/JeremyAnsel/OPTech/releases/latest

Credits:
Derek del Rio (Jedi Hunter/Com Trooper) for OPTech v1
Jérémy Ansel (JeremyaFr) for OPTech v2
General_Trageton for the new icons

Special thanks to Darksaber, DTM, Driftwood, General_Trageton for testing

Re: [OPTing] OPTech v2

Posted: Wed Mar 20, 2019 3:18 am
by Justagai
Awesome job!

Re: [OPTing] OPTech v2

Posted: Wed Mar 20, 2019 8:09 am
by General_Trageton
You‘re too modest, Jérémy :D

Along with recoding the whole thing, he‘s added a boatload of new functions, such as improved geometry management, texture stitching and countles quality-of-life improvements

I‘ve said it several times before: thank you for your incredible efforts and patience, putting up with our frequent nagging :D

Re: [OPTing] OPTech v2

Posted: Wed Mar 20, 2019 9:12 am
by Bman
Yes well done Jeremy! :-)

Re: [OPTing] OPTech v2

Posted: Wed Mar 20, 2019 7:45 pm
by JeremyaFr
Hello,
Here is a more detailed change log:

- converted the code from VB6 to C# and WPF
- new icons
- keep transparency and illumination on importing OPT files
- commands for select, deselect, add to selection, remove from selection
- set transparency or illumination on a whole texture
- message box on error with stacktrace
- support for HD textures
- save as OPZ
- does not change mesh type and explosion type when calculating hitzones
- zoom box in transparency and illumination tabs
- buttons in texture tab to scale texture
- buttons in texture tab to move texture
- buttons in texture tab to rotate texture
- buttons in texture tab to stitching texture
- move mesh up and down
- duplicate meshes
- calculate texture coordiantes for faces
- duplicate faces
- sort faces by index or by texture
- set visible/hidden for mesh
- history list
- done message box for menu commands
- disabled Calculate/Software Vectors (Compatibility)
- check for flat textures
- select faces with flat textures
- set hide normals as default
- set default values for color tolerance, opacity and brightness
- box around selected hardpoints
- support for texture switch with mixed textures and references
- export DXF, LOD model and main model
- texture name added next to face index in the face list
- flightgroup version under the render control
- Perspective, Top, Bottom, Right, Left, Front, Back buttons
- assign meshes or faces to low detail or high mesh
- show a message box on texture error when creating OPT
- support texture with long name (> 8 chars)
- check texture resolution and color depth
- fixed illumination for textures with the same palette
- buttons to copy or paste values, within the same instance of OPTech or between different instances
- aded Fix/Reset Hitzones
- improve menu options
- mesh list in hitzones tab
- transparency in the render control

Re: [OPTing] OPTech v2

Posted: Mon Mar 25, 2019 5:52 pm
by JeremyaFr
Hello,
I've added a mirror mesh button.

Please redownload OPTech.

Re: [OPTing] OPTech v2

Posted: Tue Mar 26, 2019 5:50 pm
by Drinkinmiester
Very cool, thanks! This is easy enough to use that even I've been able to kit bash opts together into new ships! Great! (p.s. don't worry, I'm just playing around, I would think of trying to releasing anything without permission from the real authors)

Re: [OPTing] OPTech v2

Posted: Wed Mar 27, 2019 9:47 pm
by General_Trageton
Thanks for fixing the face-flip bug (there was one in v2.03 where some faces within mirrored meshes would be flipped)
Works perfectly now :D It even mirrors any hardpoints and engine glows. Sweet!!! :D

Plus this means we no longer have to model asymetrical ships the other way round as we can flip them lateron. NEAT!!!!!

Riiight and here I go again, getting all kinds of wicked ideas....
- could you add a function next to the mirror button that simply flips the mesh, so basically mirroring it withouth duplicating it?
- also, as of now all models need to be created with all their faces inverted, before importing into OPTech. Could the import function be tweaked so all face normals are flipped once upon import?

Re: [OPTing] OPTech v2

Posted: Thu Mar 28, 2019 5:26 pm
by JeremyaFr
1) I will split the mirror mesh function, with a button to mirror duplicate mesh and a button to only mirror mesh.

2) Can you attach a sample DXF file?

Re: [OPTing] OPTech v2

Posted: Thu Mar 28, 2019 7:43 pm
by General_Trageton
Ok, took me a while to actually find an asymetrical model to get the point across.
Here's the old model for the discontinued Dragonfly Cockpit (working on a new one)
DragonflyCockpit.zip
In all versions of OPTech(And Ace_DXF) for the model to properly work ingame, all the faces need to be inverted and the model has to be flipped so left is right and vice versa.

It's not really a big deal, with the new functions I can just click two buttons and the program does it for me anyways. Still, it would be nice if one could eliminate these extra steps in the first place.

Re: [OPTing] OPTech v2

Posted: Thu Mar 28, 2019 7:58 pm
by Darksaber
You could have used the tie bomber or supafighter :)

Re: [OPTing] OPTech v2

Posted: Thu Mar 28, 2019 8:11 pm
by JeremyaFr
For the mirror mesh feature, here is a preview:
https://ci.appveyor.com/project/JeremyA ... /artifacts

Re: [OPTing] OPTech v2

Posted: Fri Mar 29, 2019 1:24 am
by Driftwood
Darksaber wrote:
Thu Mar 28, 2019 7:58 pm
You could have used the tie bomber or supafighter :)
Don't you love it when you've spent hours agonizing over something, then you bring it to the attention of someone else and they present the most obvious simple solution to fix you should have seen plain as day yourself had you not been so wrapped up in over complicating your own issue in the first place?

:D

Re: [OPTing] OPTech v2

Posted: Fri Mar 29, 2019 6:02 am
by General_Trageton
Well my first thought had been the most obvious Millennium Falcon, but I was too lazy to extract the model, while I had tons of DXF lying around XD

Re: [OPTing] OPTech v2

Posted: Fri Mar 29, 2019 7:09 pm
by JeremyaFr
UPDATE
I've updated OPTech.

The changes are:
- split the mirror mesh button: now there is a button to duplicate and mirror mesh and a button to only mirror mesh
- added a message box to ask if you want to invert vertex order when importing or exporting DXF files

Please redownload OPTech

Re: [OPTing] OPTech v2

Posted: Sat Mar 30, 2019 9:55 am
by Bman
GT wrote: In all versions of OPTech(And Ace_DXF) for the model to properly work ingame, all the faces need to be inverted and the model has to be flipped so left is right and vice versa.
Why does this even have to be an issue? Couldn't we just import a finished model from it's native format i.e. .obj, .an8, .3ds, etc. as is, into Optech without flipping the face normals backwards(?). Or what about patching the game .exe where doesn't require inverted faces. That seems like a design flaw to begin with, but I don't quite grasp the full concept. Anyway, maybe Optech2 could automatically flip the normals and so forth while it's compiling into .opt format to make the whole process easier.

Re: [OPTing] OPTech v2

Posted: Sun Mar 31, 2019 7:49 am
by General_Trageton
Bman wrote:
Sat Mar 30, 2019 9:55 am
GT wrote: In all versions of OPTech(And Ace_DXF) for the model to properly work ingame, all the faces need to be inverted and the model has to be flipped so left is right and vice versa.
Why does this even have to be an issue? Couldn't we just import a finished model from it's native format i.e. .obj, .an8, .3ds, etc. as is, into Optech without flipping the face normals backwards(?). Or what about patching the game .exe where doesn't require inverted faces. That seems like a design flaw to begin with, but I don't quite grasp the full concept. Anyway, maybe Optech2 could automatically flip the normals and so forth while it's compiling into .opt format to make the whole process easier.
That was my point ... :D

Re: [OPTing] OPTech v2

Posted: Sat Apr 13, 2019 2:15 am
by JinKazama16
Thank You it is much easier to import them now, without going through those lights and engines

Re: [OPTing] OPTech v2

Posted: Thu Apr 18, 2019 7:10 pm
by JeremyaFr
UPDATE
I've updated OPTech.

The changes are:
- added support for multiple fg colors. Now, the fg colors are not limited to 4.
- To add a flightgroup texture, select "new" and double click on a texture.

Re: [OPTing] OPTech v2

Posted: Thu Apr 18, 2019 7:33 pm
by Darksaber
Thanks Jeremy :)

Hope you don't mind I edited the post to add the bottom line :)

Re: [OPTing] OPTech v2

Posted: Thu Apr 18, 2019 7:41 pm
by JeremyaFr
It's fine. Thanks.

Re: [OPTing] OPTech v2

Posted: Thu Apr 18, 2019 8:18 pm
by ual002
Right on. This is what I needed.

Re: [OPTing] OPTech v2

Posted: Fri Apr 19, 2019 12:19 pm
by ual002
So probably dumb question, if when I import new .bmp files to make a new fg color and there are no errors, but when I load the opt in game the updated sections of texture show as pink, what am I doing wrong?

I'm using photoshop and if I save a RGB bmp image to the opz it works until I try to export the opt. At that point, OPTech will tell me the image I added isnt 8-bpp. If I go back to photoshop and set the mode back to indexed color and flatten the image before saving the BMP, OPTech doesnt throw errors but the textures show up pink.

Re: [OPTing] OPTech v2

Posted: Sat Apr 20, 2019 2:03 am
by Bman
Another work around ualoo2 is just get the texture through OPTech, compile your .opt model, then replace the texture map(s) piecemeal using Jeremy's XWAOptEditor. Pretty easy to do.

Re: [OPTing] OPTech v2

Posted: Sat Apr 20, 2019 8:30 am
by JeremyaFr
Does the bmp have 256 colors or less than 256 colors?

Can you share a sample bmp so I can test myself?