[OPTing] OPTech v2

Want to edit the game, build your own craft and missions? Here you'll find help, tools, guides and people to discuss with.
Post Reply

[OPTing] OPTech v2

User avatar
JeremyaFr
XWAU Member
Posts: 3922
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Tue Mar 19, 2019 7:19 pm

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

Justagai
Cadet 1st Class
Posts: 218
Joined: Mon Dec 08, 2014 10:59 pm

Post by Justagai » Wed Mar 20, 2019 3:18 am

Awesome job!

User avatar
Vince T
Fleet Admiral (Administrator)
Posts: 14045
Joined: Fri Apr 27, 2001 11:01 pm
Contact:

Post by Vince T » Wed Mar 20, 2019 8:09 am

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
Your ship, Captain. I need a drink. - Vince Trageton
Vince T's X-Wing HQ - where the bad guys get their gear

Bman
Lieutenant Commander
Posts: 1167
Joined: Mon Apr 05, 2004 11:01 pm

Post by Bman » Wed Mar 20, 2019 9:12 am

Yes well done Jeremy! :-)
W-I-P: TFTC, MC Viscount Cr., ISD-II Avenger, NL-1 Platform, Ton-Falk Esc. Cr., & Misc.

User avatar
JeremyaFr
XWAU Member
Posts: 3922
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Wed Mar 20, 2019 7:45 pm

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

User avatar
JeremyaFr
XWAU Member
Posts: 3922
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Mon Mar 25, 2019 5:52 pm

Hello,
I've added a mirror mesh button.

Please redownload OPTech.

Drinkinmiester
Cadet 1st Class
Posts: 136
Joined: Sun Nov 09, 2008 9:37 pm

Post by Drinkinmiester » Tue Mar 26, 2019 5:50 pm

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)

User avatar
Vince T
Fleet Admiral (Administrator)
Posts: 14045
Joined: Fri Apr 27, 2001 11:01 pm
Contact:

Post by Vince T » Wed Mar 27, 2019 9:47 pm

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?
Your ship, Captain. I need a drink. - Vince Trageton
Vince T's X-Wing HQ - where the bad guys get their gear

User avatar
JeremyaFr
XWAU Member
Posts: 3922
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Thu Mar 28, 2019 5:26 pm

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?

User avatar
Vince T
Fleet Admiral (Administrator)
Posts: 14045
Joined: Fri Apr 27, 2001 11:01 pm
Contact:

Post by Vince T » Thu Mar 28, 2019 7:43 pm

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.
You do not have the required permissions to view the files attached to this post.
Your ship, Captain. I need a drink. - Vince Trageton
Vince T's X-Wing HQ - where the bad guys get their gear

User avatar
Darksaber
Vice Admiral
Posts: 10931
Joined: Mon Jan 10, 2000 12:01 am
Contact:

Post by Darksaber » Thu Mar 28, 2019 7:58 pm

You could have used the tie bomber or supafighter :)
“You can please some of the people all of the time, you can please all of the people some of the time, but you can’t please all of the people all of the time”.”
- John Lydgate

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

User avatar
JeremyaFr
XWAU Member
Posts: 3922
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Thu Mar 28, 2019 8:11 pm

For the mirror mesh feature, here is a preview:
https://ci.appveyor.com/project/JeremyA ... /artifacts

User avatar
Driftwood
Admiral (Moderator)
Posts: 2174
Joined: Wed Oct 22, 2003 11:01 pm
Contact:

Post by Driftwood » Fri Mar 29, 2019 1:24 am

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

User avatar
Vince T
Fleet Admiral (Administrator)
Posts: 14045
Joined: Fri Apr 27, 2001 11:01 pm
Contact:

Post by Vince T » Fri Mar 29, 2019 6:02 am

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
Your ship, Captain. I need a drink. - Vince Trageton
Vince T's X-Wing HQ - where the bad guys get their gear

User avatar
JeremyaFr
XWAU Member
Posts: 3922
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Fri Mar 29, 2019 7:09 pm

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

Bman
Lieutenant Commander
Posts: 1167
Joined: Mon Apr 05, 2004 11:01 pm

Post by Bman » 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.
W-I-P: TFTC, MC Viscount Cr., ISD-II Avenger, NL-1 Platform, Ton-Falk Esc. Cr., & Misc.

User avatar
Vince T
Fleet Admiral (Administrator)
Posts: 14045
Joined: Fri Apr 27, 2001 11:01 pm
Contact:

Post by Vince T » Sun Mar 31, 2019 7:49 am

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
Your ship, Captain. I need a drink. - Vince Trageton
Vince T's X-Wing HQ - where the bad guys get their gear

User avatar
JinKazama16
Cadet 2nd Class
Posts: 96
Joined: Fri Oct 15, 2004 11:01 pm
Contact:

Post by JinKazama16 » Sat Apr 13, 2019 2:15 am

Thank You it is much easier to import them now, without going through those lights and engines
Han Solo: She'll make point five past lightspeed. She may not look like much but she's got it where it counts, kid. I've made a lot of special modifications myself.

User avatar
JeremyaFr
XWAU Member
Posts: 3922
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Thu Apr 18, 2019 7:10 pm

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.

User avatar
Darksaber
Vice Admiral
Posts: 10931
Joined: Mon Jan 10, 2000 12:01 am
Contact:

Post by Darksaber » Thu Apr 18, 2019 7:33 pm

Thanks Jeremy :)

Hope you don't mind I edited the post to add the bottom line :)
“You can please some of the people all of the time, you can please all of the people some of the time, but you can’t please all of the people all of the time”.”
- John Lydgate

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

User avatar
JeremyaFr
XWAU Member
Posts: 3922
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Thu Apr 18, 2019 7:41 pm

It's fine. Thanks.

User avatar
ual002
XWAU Member
Posts: 983
Joined: Wed Sep 24, 2008 2:23 am

Post by ual002 » Thu Apr 18, 2019 8:18 pm

Right on. This is what I needed.
Image Image Image Image Image

User avatar
ual002
XWAU Member
Posts: 983
Joined: Wed Sep 24, 2008 2:23 am

Post by ual002 » Fri Apr 19, 2019 12:19 pm

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.
Image Image Image Image Image

Bman
Lieutenant Commander
Posts: 1167
Joined: Mon Apr 05, 2004 11:01 pm

Post by Bman » Sat Apr 20, 2019 2:03 am

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.
W-I-P: TFTC, MC Viscount Cr., ISD-II Avenger, NL-1 Platform, Ton-Falk Esc. Cr., & Misc.

User avatar
JeremyaFr
XWAU Member
Posts: 3922
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Sat Apr 20, 2019 8:30 am

Does the bmp have 256 colors or less than 256 colors?

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

Post Reply