[OPTing] XWA OPT Editor

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

Re: [OPTing] XWA OPT Editor (a new opting tool is under construction)

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

Post by JeremyaFr » Sat Dec 01, 2018 4:04 pm

UPDATE

Hello,
I've found how to break the vertices count limit.
It is done by spliting the face groups in groups of 384 vertices.

Please redownload XwaOptEditor

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

Post by Driftwood » Sat Dec 01, 2018 4:54 pm

Is this done in the program automatically? And an issue I'm having is I cant figure put how to merge an old with a parent mesh in the program.

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

Post by JeremyaFr » Sat Dec 01, 2018 5:08 pm

It is done automatically when the opt is saved.

The Split/Merge buttons are used to rearrange the meshes/lods/face groups.

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

Post by Driftwood » Sat Dec 01, 2018 5:42 pm

That's what I thought, but I'm having a heck of a time getting it to do what it's supposed to. Any tips?

And to clarify, this new CFG limit update is the "final" standard yeah?

Just want to make sure this is going to be the standard going forward before I start opting stuff with meshes greater than 4096 verts.

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

Post by Bman » Sat Dec 01, 2018 6:51 pm

Thanks Jeremy!

Driftwood, use "Size = 65536" in Hook_Opt_Limit.cfg, there's no going back and it won't hurt anything that already exists. :-)
I believe you select one mesh in the list by holding your control key and then click on the other mesh(es) to highlight it/them and then click the merge button. They then combine as one mesh at the bottom of the list screen. Another way is to save maybe a mesh or two and delete the ones you don't need under a separate .opt file name, make your test edits there, then import the .opt file back into you master .opt file. This might be good for importing meshes perhaps piecemeal after they have gone through Optech2.0+ for validation, if needed. You can then move and layout the meshes in positions they need to go and also compact/rename the texture files later to remove redundancy in XWAOptEditor. I've noticed it's better to replace textures here after Optech especially with alpha channel used.

On a different note, if you duplicate/copy a mesh within an open .opt file, it appears at center coordinates 0,0,0. The new mesh will also be at the bottom of your list screen. The editor kind of locks up then or after saving the file, so you will have to click on the very first mesh at the top of the list after a few seconds to refresh everything, then scroll down and select your new mesh. You can then click the "move" mesh button to select the +/- X (left/right), Y (forward/backwards), and Z (up/down) coordinates. I like this flexibility. Lot easier than Optech as far as positioning meshes besides your native 3D modelling program. Does this help ?
W-I-P: TFTC, MC Viscount Cr., ISD-II Avenger, NL-1 Platform, Ton-Falk Esc. Cr., & Misc.

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

Post by JeremyaFr » Sun Dec 09, 2018 7:12 pm

UPDATE

Hello,
I've added a button to check and remove flat textures.

Please redownload XwaOptEditor

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

Post by Darksaber » Sun Dec 09, 2018 8:46 pm

I've just tested this on a few opts and it's not only removing flat textures it's deleting faces too :(
“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
DTM
Fleet Admiral (Administrator)
Posts: 2119
Joined: Tue Apr 22, 2003 11:01 pm
Contact:

Post by DTM » Mon Dec 10, 2018 6:39 am

I was so busy working on my spaceships that I had lost the news on December 1st. Is fantastic! Thanks Jeremy!
I have a recommendation for my friends opt makers: do not overdo the number of faces. Use this power wisely. Remember that the game engine is old.
Computer performance is a very important limitation!

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

Post by Driftwood » Mon Dec 10, 2018 12:22 pm

Yeah, I was testing modifications to asteroids to see about expanding belt sizes by adding more individual rocks to an opt, that works fine turns out. However I found that 70k vertices with that particular opt loaded several times over (randomly generated) slows down game performance. For opts likely to be used several times over in missions like asteroids and fighters less is more. Testing the a as steroids showed solid performance around 3-12k vertices. That was however only having replaced asteroidhr1, out of the five available generated. Further testing will be required but so far the results I've had are visually appealing and noslowdowns. Performance could be improved by reducing the faces of the individual meshes, which oddly doesn't seem to make them look all that much worse, but would allow additional rocks to be added.

I think that larger venice count opts should be relegated to larger opts as only one or few would be utilized at any given time.

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

Post by ual002 » Wed Dec 12, 2018 5:59 pm

Wait, so how do the asteroids actually work? You say its a single Opt randomly repeated over and over? This is interesting to me because I always wanted better asteroid fields.
Image Image Image Image Image

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

Post by JeremyaFr » Wed Dec 12, 2018 7:52 pm

Hello,
The code that generated the "temp.tie" file for skirmish mission is situated at address L005793E0. For the asteroids, 24 flight groups are used with craft count set to 3 (6 for the last asteroids flight group). So the asteroids count is 75. They are randomly positioned.
For regular missions, the asteroid field is created the same way as crafts or backdrops. You can see an example in "1B4M1FB.TIE".

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

Post by Driftwood » Thu Dec 13, 2018 1:02 pm

There are 9 opt files, 3 low rez that dont seem to be used, and 6 high rez ones. At the moment each asteroid opt is a single mesh.

Out of the 6 hi rez opts, it seems to me that they are picked and generated randomly. Now I havent had time since jeremya's post to look into the technical how done, so I'm just giving you my impression based on my observations.

There doesn't seem to be a downside to adding more meshes unless the vert count exceeds several hundred thousand cumulatively. I have not scientifically tested the limit in regards to how many hundred thousand vertices start to slow the game thus far. One thing I did observe in performance degradation mimicked a high latency, which was likely a huge frame drop, but I dont usually run a fps counter so I couldn't tell you how bad. The odd thing is that the game seemed to be running smooth, just with a delay in input akin to lag rather than a frame by frame slideshow.

Going forward I'm going to try and find a balance of performance and vertices per mesh, and what looks appealing and try to see if I can figure out proportionally how to fill 1x1x1 grid squares in allied to be able to not only increase the visual appearance of asteroid fields given how underwhelming they are currently, but make it reasonably intuitive to create fields in missions, as well as still keep it playable from a gameplay / pathing perspective.

Also, obviously one also has to remember to account for any other models loaded into the mission in addition to the asteroids as well since the highest vertice limit is cumulative across all opts in region.

No promises though in regards to outcome at this point obviously, at this point I'm still in proof of concept phase.

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

Post by ual002 » Thu Dec 13, 2018 2:21 pm

I'm very interested in how this develops. I too agree asteroid fields were a little underwhelming, especially with age.
Image Image Image Image Image

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

Post by Bman » Fri Dec 14, 2018 1:05 am

You can also easily make the asteroids targetable and destroyable by changing two values in BHE or with MXvTED4.1 editor. Don't recall at the moment. :-)
W-I-P: TFTC, MC Viscount Cr., ISD-II Avenger, NL-1 Platform, Ton-Falk Esc. Cr., & Misc.

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

Post by Driftwood » Fri Dec 14, 2018 1:51 pm

Hmm, well if you can figure that out that's be good. I have yet to try setting explosion type 1, 2 since I presume the opts themselves are indestructible somewhere else. But I'd be interested in trying to make smaller ones destructible both for thematic purposes, and I'm wanting to try and see if "mining" is viable to simulate for some missions.

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

Post by Bman » Sat Dec 15, 2018 5:08 am

Driftwood, I had already modified my engine on XP Pro (or older O/S) which supports BHE, Windows10 x64 does not. MXvTED4.1 does not seem to allow anything to be edited above slot/Craft No. 218 (Hyper Buoy) at least for now. In the below image I am "assuming" the mappings for the Accelerator Rings and the Asteroids are correct. Starting with slot/Craft No. 223 (AsteroidHR1.opt) through Craft No. 228, I check marked "Enabled Craft [ ]" and changed the "Target Type" from 128 to 131. This does allow you to target and take down the asteroids, but at same time the slow rotation no longer works and you only need one laser bolt for impact. That could be tweaked by changing the Hull strength to higher value. Would be neat to see it break up into smaller pieces the same way a starship does. I think if Skirmish Option is selected too for 224 through 228 that would allow other asteroids to be used in Skirmish simulator. Maybe Jerm. or Just. could verify this if they have time. Overall this needs more testing/experimenting, but it does work on a basic level.

Asteroids.png

.
You do not have the required permissions to view the files attached to this post.
W-I-P: TFTC, MC Viscount Cr., ISD-II Avenger, NL-1 Platform, Ton-Falk Esc. Cr., & Misc.

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

Post by Driftwood » Sat Dec 15, 2018 6:00 am

Interesting...

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

Post by Darksaber » Tue Dec 18, 2018 12:54 pm

A request Please Jeremy

In Opt XWA Editor, is it possible to add to the Texture screen/Illumination tab a button to select all, and perhaps a tolerance color slider, not so bothered about a brightness slider as personally I never use that anyhow, something similar to the other editor please.

No need for transparency controls as you can do all that with png files and the alpha channel

Just need to experiment with adding illumination to the lasers, but you can do that in Optech due to the textures being BMP's and you can never get a truly transparent black, it leaves a ring around the coloured area.

Thanks :)
“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: 3921
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Tue Dec 18, 2018 3:40 pm

Done.

I've added a tolerance box to the illumintion tab. I've set the default value to 5 (the same as Optech).
I've changed the second color of the second illumination button from Black to White. So you can use that to make all colors illuminated.

Please redownload XwaOptEditor

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

Post by Darksaber » Tue Dec 18, 2018 4:43 pm

Thanks Jeremy works like a charm

My experiment though I illuminated the textures of the lasers, but in game I couldn't see any significant difference, my conclusion is that the game engine automatically illuminates the lasers and missile trails as I have thought all along :)

Anyhow thanks so much for adding the illumination stuff it will come in very handy, as before it was a pain illuminating each pixel colour :)
“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
Trevor
Lieutenant JG
Posts: 541
Joined: Thu Dec 04, 2014 7:11 pm

Post by Trevor » Thu Dec 27, 2018 2:18 am

now I know nothing about this engine, but I would suspect that "Illumination" = texture * 1 as opposed to normal texture * Shade (where shade is a normalised (0-1) RGB triplet)

this would co-inside with lasers already being illuminated since they wouldn't be shaded. (or rather, they will be locked at white)

Trev

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

Post by Driftwood » Mon Dec 31, 2018 1:27 am

Could I request a Rotate mesh option in addition to the existing move mesh option?

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

Post by JeremyaFr » Mon Dec 31, 2018 2:23 pm

Done.

I've added a mesh Rotate button.

Please redownload XwaOptEditor

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

Post by Driftwood » Mon Dec 31, 2018 2:24 pm

Neat, thanks!

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

Post by JeremyaFr » Sun Feb 17, 2019 2:32 pm

Hello,
I've fixed an IndexOutOfRange exception in Texture.GetFileBitmap.

Please redownload XwaOptEditor.

Post Reply