[OPTing] Xwa Opter (Opt Fix) v2

Need help editing the game? Check for help here!
Post Reply

[OPTing] Xwa Opter (Opt Fix) v2

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

Post by JeremyaFr » Fri Aug 16, 2019 4:34 pm

Hello,
Here is a tool to fix shading of X-Wing Alliance's OPT files.

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

Credits:
- Ooc for XWA Opter v1
- Jérémy Ansel (JeremyaFr) for XWA Opter v2

User avatar
blue_max
Lieutenant Commander
XWAU Member
Posts: 1319
Joined: Wed Mar 20, 2019 5:12 am

Post by blue_max » Fri Aug 16, 2019 5:43 pm

Is this shading fix related to the 32-bit mode hook?
EDIT: No: it re-computes the normals of the surfaces so that the shading is computed properly in-game. Correct?

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

Post by Darksaber » Fri Aug 16, 2019 5:50 pm

No, it's a tool that has been around for years, I asked Jeremy if it was possible to updated and fix a few problems with the original, and he did just that :)
“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
Commander
XWAU Member
Posts: 2590
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Fri Feb 07, 2020 12:39 pm

UPDATE

You can now enter the normals threshold.

User avatar
Vince T

Fleet Admiral (Administrator)
Posts: 12873
Joined: Fri Apr 27, 2001 11:01 pm
Contact:

Post by Vince T » Fri Feb 07, 2020 4:05 pm

Just thinking of something: could the threshold be defined on an individual per-mesh level? Especially for Star Destroyer-shaped ships where angles between left and right side may be just as wide as between the left ans side of the engines? In case of the former, the mesh shading shouldn‘t be smoothed while with the latter it should....

This would probably require a complete reconstruction of the tool if not the OPT structure itself. Just I‘d throw in the thought ....
Your ship, Captain. I need a drink. - Vince Trageton

My Steam Workshop

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

Post by JeremyaFr » Fri Feb 07, 2020 5:25 pm

Hello,
Here is a quick update.

EDIT: link removed

You can select the whole OPT or just 1 mesh.
Last edited by JeremyaFr on Fri Feb 14, 2020 1:06 pm, edited 1 time in total.

User avatar
blue_max
Lieutenant Commander
XWAU Member
Posts: 1319
Joined: Wed Mar 20, 2019 5:12 am

Post by blue_max » Fri Feb 07, 2020 5:27 pm

General_Trageton wrote:
Fri Feb 07, 2020 4:05 pm
Just thinking of something: could the threshold be defined on an individual per-mesh level?
I would expect your modelling software already does something like this? For instance, Blender allows you to specify the smooth threshold on a per-face basis, if necessary. Doesn't that work?

User avatar
Vince T

Fleet Admiral (Administrator)
Posts: 12873
Joined: Fri Apr 27, 2001 11:01 pm
Contact:

Post by Vince T » Fri Feb 07, 2020 7:47 pm

Not using blender and I currently don't have the time or patience to learn it.
Your ship, Captain. I need a drink. - Vince Trageton

My Steam Workshop

User avatar
blue_max
Lieutenant Commander
XWAU Member
Posts: 1319
Joined: Wed Mar 20, 2019 5:12 am

Post by blue_max » Fri Feb 07, 2020 8:50 pm

General_Trageton wrote:
Fri Feb 07, 2020 7:47 pm
Not using blender and I currently don't have the time or patience to learn it.
Right, I understand that, I was just suggesting that maybe the 3D editing program that you use may already do something similar.

User avatar
Trevor
Ensign
Posts: 420
Joined: Thu Dec 04, 2014 7:11 pm

Post by Trevor » Fri Feb 07, 2020 8:54 pm

Are not normals lost on import - hence the very reason for this program?

Software can sometimes merge verticies even if they have different normals, I assume this program re-calculates and then keeps said verticies split so that XWA renders properly.

Trev

User avatar
Vince T

Fleet Admiral (Administrator)
Posts: 12873
Joined: Fri Apr 27, 2001 11:01 pm
Contact:

Post by Vince T » Fri Feb 07, 2020 11:31 pm

I'm using Rhino and exporting the models as dxf. So yeah either during the exporting or the import into OPTech the normals are lost and I usually recalculate everything.
Your ship, Captain. I need a drink. - Vince Trageton

My Steam Workshop

User avatar
blue_max
Lieutenant Commander
XWAU Member
Posts: 1319
Joined: Wed Mar 20, 2019 5:12 am

Post by blue_max » Sat Feb 08, 2020 12:23 am

If it helps, it looks like exporting to OBJ and then importing into XwaOptEditor keeps the normals.

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

Post by JeremyaFr » Sat Feb 08, 2020 9:42 am

OPTech can also import OBJ files with normals.

User avatar
Trevor
Ensign
Posts: 420
Joined: Thu Dec 04, 2014 7:11 pm

Post by Trevor » Sat Feb 08, 2020 11:17 am

Nice to know

Solution in an8 for ISD hull vs engine cone - flat vs smooth is to assign a smooth angle of minimum angle required for smooth objects and to "detach" the left hand side of the main hull from the right and re-merge mesh (to keep same mesh count)

Trev

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

Post by JeremyaFr » Fri Feb 14, 2020 1:07 pm

UPDATE

Hello,
I've merged the WIP version into the stable version.

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

Post by JeremyaFr » Sat Aug 01, 2020 7:01 pm

UPDATE

Hello,
I've updated XwaOpter.

Now the tool remembers the file dialog last directory.
The directory path is stored in a file named "XwaOpter.cfg".

Post Reply