[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] a new opting tool is under construction

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

Post by Bman » Mon Feb 23, 2015 12:26 am

I tired .obj format and gave up. Didn't seem to work. That would be awesome if direct imports of .an8 files would work. I believe Steve has a webpage that lists his file structure at his site: www.anim8or.com.

Trevor's post reminded me. How would you propose to handle the color format of textured .bmp files ? Anim8or exports in 24-bit color format in both it's .an8 file (with environmental mapping, shading, bumping, and other special affects) and also 24-bit in .3ds files. For now we use 3ds-To-Opz Converter, then have to manually swap out the texture.bmps for 8-bit versions before OpTech converts the .opz project file to the finished .opt file. I guess we could change via your tool the imported textures to 8-bit or (32-bit-- for patched Offsets) at that point.


P.S.- b/t/w, if textuing in your opting tool is far more easier than using Ani8tor's UV wrapping tool , then I'd rather import an untextured model from .an8 and do it in-house. But I've not seen in your tool how to texture faces from scratch. Like clicking on pixel in a map and anchoring it to a vertix x,y,z coordinate in a mesh. Click, point, and save, or something very easy like that with detailed control. Looks like your tool only allows replacing textures or converting existing maps 8-bit to 32- bit color and vice-versa for now. Thanks.
W-I-P: TFTC, MC Viscount Cr., ISD-II Avenger, NL-1 Platform, Ton-Falk Esc. Cr., & Misc.

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

Post by Drinkinmiester » Sat Feb 28, 2015 10:14 pm

Hi, I've been tinkering around with your tool to improve some of the older models and I have a question. How do I add working laser hard points? I clicked "add hardpoint" on the mesh and it appears in the window and the menu but in game it doesn't fire. I'd really like to put more guns on the Nebulon-b.

User avatar
Trevor
Lieutenant JG
Posts: 541
Joined: Thu Dec 04, 2014 7:11 pm

Post by Trevor » Wed Mar 04, 2015 7:44 pm

"Anim8or exports in 24-bit colour "

Just noticed this and wanted to point out that this statement is false for a number of reasons.

1 - An8 does not 'export' textures
2 - the an8 format does not include embeded textures
3 - texture formats are independent of modeling program, they are whatever format you save them as in a paint program (eg, MSPaint.exe)

4 - Steve has fixed an8 to now use 4, 8, 16, 24 and 32 bit bmp files.


The UV tool in an8 is weak, personally I use Lithunwrap to do my UV's then re-import back to an8.

Trev

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

Post by JeremyaFr » Wed Mar 04, 2015 11:20 pm

Here is a tool to convert .an8 to .opt and vice versa:
OptAn8Tool.zip

Note that it is an alpha version and everything is not supported.

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

Post by Bman » Thu Mar 05, 2015 11:19 am

Thanks Trev for update. Will get newest version. Modeling in 8-bit format will save a lot time, glad Steve fixed all of that.

Thanks Jeremy, that is great. We had been exporting from .an8 to .3ds format then converted to .opz project file. Then we would have to swap out the 24-bit colored .bmps with 8-bit versions before using OpTech to open the .opz project file (all in the same folder).
W-I-P: TFTC, MC Viscount Cr., ISD-II Avenger, NL-1 Platform, Ton-Falk Esc. Cr., & Misc.

User avatar
Trevor
Lieutenant JG
Posts: 541
Joined: Thu Dec 04, 2014 7:11 pm

Post by Trevor » Thu Mar 05, 2015 11:53 am

[s]Oh, nice, however I guess you used .net4, with no compatability option of .net2 in compile settings, so its useless to me.[/s]

Bman, it will be the next version for bmp support, just in case you test it now and complain :P :lachtot: ,

To be honest, the process of modeling and converting to opz is quite simple now that Ive had years of modeling experiance and grown up a little bit.
When I was at school I thought the whole process to be hugely complicated - not to mention the fact I couldnt model anything other than some basic primitives because I had yet to discover the knowhow of using the Point/Edge/Face tool.

Trev

Ok, screw it, Ive just seen the other replies throughout the forum.

nedius
Recruit
Posts: 4
Joined: Thu May 28, 2015 9:17 pm

Post by nedius » Fri May 29, 2015 10:08 am

I don't suppose this will be able to save OPT files in a format use able. In other games, like XvT or TF?

Thanks!

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

Post by JeremyaFr » Fri May 29, 2015 9:13 pm

Hello,
For now, XwaOptEditor saves OPTs only in XWA's format.
OPTech can write OPTs in XWA or XvT format.

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

Post by Bman » Sun May 31, 2015 4:20 am

Hi Jeremy. If you are upgrading your editor in the future.... is it possible you can include a texture mapping feature to allow precision pixel mapping of texture files to the imported models ?

Here's an example: Say i open a given .bmp file and zoom in and click to select a specific pixel at x,y where say x=3 columns of pixels from left edge and Y = 100th row of pixels from bottom or top of file. so x,y = 3,100 is the position of a specific pixel I want. Once that is copied to clipboard, i go back to the model and zoom in to the specific vertex x,y,z of a face normal on a mesh. I want to anchor/staple the pixel co-ordinates to that vertice I click to select. Then I repeat the process and pick a different pixel and staple that to the next vertice of a face. Then repeat another time or a 4th time to finish mapping an image to the face. Is that possible to design in your editor ?
Also the optional ability to stretch (zoom-in or out) a texture image that has been applied to the face of a mesh ? I think they call it scaling.
Perhaps showing the model in wire-frame mode or normal textured mode would help too.

Reason I'm asking is, stitching textures to faces within the modelling program I'm using is not easy to do, especially when trying to be precise with complex images. Thoughts ?
W-I-P: TFTC, MC Viscount Cr., ISD-II Avenger, NL-1 Platform, Ton-Falk Esc. Cr., & Misc.

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

Post by JeremyaFr » Fri Jun 05, 2015 1:35 am

Instead of selecting a pixel and then selecting a vertex, wouldn't be easier to select a face and a texture and then the pixels? Once a texture is assigned to a face, you select a vertex of the face and pick a pixel.

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

Post by Bman » Fri Jun 05, 2015 7:39 am

Yeah, that would achieve the same end-result for precision mapping. That sounds more efficient. How would you propose to do that in edit mode after a model is imported with or without textures applied? Would the default assignment be x,y = 0,0 which represents the top left corner pixel of the imported .bmp/.jpeg file ?

Here's what I meant: check out this short youtube video that shows how to get coordinates of a pixel in a image:
"https://www.youtube.com/watch?v=TYeNGnAQNt0"

His source code is here: "http://dynamiccopencv.blogspot.in/2014/ ... es-of.html"

What would be better is if you could zoom-in/out on the image down to pixel level and click the pixel you want to be more precise.
Then instead of coordinates being printed out to screen, have it dumped into a text box or label, then zoom-in on your mesh and pin
the pixel's x,y coordinates to the vertex and save. Move on to the next two or three vertices of the face and repeat the process to get an accurate mapping of image wanted. On separate note, not sure how scaling would work. To prevent fuzziness or stretched pixellation if an image is too big for a face and needs to shrink for sharpness or vice-versa. Thanks.
W-I-P: TFTC, MC Viscount Cr., ISD-II Avenger, NL-1 Platform, Ton-Falk Esc. Cr., & Misc.

User avatar
barkvaros
Cadet 3rd Class
Posts: 36
Joined: Tue Jan 01, 2013 7:16 pm

Post by barkvaros » Sat Dec 26, 2015 5:16 pm

Hello, im a noob at making opts therefore it is probably my fault, anyway just wana know what does "missing mtllib name" mean? (its error 13 in optech), probably has to do with the fact that i was exporting it to obj from skp file with google sketchup(the tool i use to make models)

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

Post by Bman » Fri Jan 29, 2016 5:45 am

Bark, my guess is you're missing the material (texture) files that were originally part of the imported model you are using. OPtech can only import a few file types besides existing .opt models.
W-I-P: TFTC, MC Viscount Cr., ISD-II Avenger, NL-1 Platform, Ton-Falk Esc. Cr., & Misc.

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

Post by Bman » Sat Jan 30, 2016 3:13 pm

Jeremya,
On your July 2 post about the "Triangling to Infinity" workaround solution, you wrote:
"...the modification increases the triangle count a single FaceGroup can have. There is no real reason to set only 2048. In fact, vertices are indexed using words. So the max vertex count can be 65,535. But remember that the vertex count limit per mesh is 512. I don't think the vertex count in a single FaceGroup will be as high. "

I understand spitting the facegroups that share a common texture part, but I'm trying to understand the vertex count limit now that it can be pushed to 65,535. How is this possible if the maximum mesh counts are 50 and each mesh is limited to 512 vertices (25,600 max) ?
Are these extra vertices not assigned to a specific mesh ? Relationship doesn't make since to me vertice #513 through #65,535. Unless these are virtual vertices in the buffer and not physical vertices on meshes themselves. ?

What are the repercussions of grouping several existing meshes into a parent Mesh to keep the Mesh count under 50 ? In Optech, you can use the "Assign to" function to group Hi-Res Level LOD's meshes with another mesh. Even if those meshes collectively go over 512 vertices x number of meshes, grouped.

What about Low level LOD meshes ? Are they part of the 50 mesh limit count, or can they be exploited to double the total mesh count per model ? Maybe by manipulating the distance field to infinitity (1000) or 999. I would assume to display concurrently with high-res Meshes, their x,y,z mesh positions would have to be that they don't overlap with existing meshes.

Can low level LOD meshes exist on their own without being assigned to high res level LOD mesh, and can they be as complex as a normal high-level mesh ? Thanks.
W-I-P: TFTC, MC Viscount Cr., ISD-II Avenger, NL-1 Platform, Ton-Falk Esc. Cr., & Misc.

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

Post by JeremyaFr » Sat Jan 30, 2016 6:40 pm

Hi Bman,

There is a limit of 512 vertices per mesh and a limit of 50 meshes per opt. So the vertices count limit per opt is 25,600.
The limit of 65,535 comes from Direct3D buffers.

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

Post by Bman » Sun Jan 31, 2016 1:10 am

Ok thanks. Let me re-phrase my question. For the 513th vertice up through vertice #65,535 "in the Direct3D buffers", they are created only by your offset patch to split existing facegroups, right ? In other words, they are not technically "extra vertices" added to a mesh, correct ? So we can't manually add them to an existing mesh that is already maxed out at 512 vertices ? That's what I'm trying to understand.

My second question, do the vertice and mesh limits include all Low level LOD meshes too ? For example, is it possible to have 50 regular meshes and 50 accompanying Low-level LOD meshes with them ?
W-I-P: TFTC, MC Viscount Cr., ISD-II Avenger, NL-1 Platform, Ton-Falk Esc. Cr., & Misc.

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

Post by JeremyaFr » Sun Jan 31, 2016 5:30 pm

1.
You're right. We can't add more than 512 vertices to a mesh. The opt would be unplayable and the game may crash.

2.
The vertex count limit (512) is shared across lods meshes. It counts the vertices of "regular" meshes and LOD meshes.
The mesh count limit (50) doesn't include LOD meshes. It counts "regular" meshes.

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

Post by Bman » Sun Jan 31, 2016 7:12 pm

Thanks Jeremy! Woo-hoo, so the Low level LOD mesh counts could theoretically be pushed to 50 as a back door way to increase the mesh counts for a model. Then only question is how sophisticated and complex can these meshes be ? And can they display simultaneously with regular meshes by manipulating the "distance" trigger and their x,y,z mesh positions. I know this defeats the purpose of having LODs in first place to reduce CPU/memory consumption, but who cares. Will experiment with this. :-)

Switching topics, Feature request for your Opting Editor:
1) When I open the CarrackCruiser.opt model into your editor, the editor "automatically" removes redundant texture palettes, especially when you have Flight Group colors. Can you remove this feature, or at least make it a warning box and allow the user to manually remove redundant textures if they want ? For example, the CarrackCruiser has 65 total texture maps. TEX00001.bmp, TEX00003.bmp and TEX00004.bmp and so forth are automatically removed when I save the model. So net affect is the file size is smaller, but we cannot edit the model again in Optech. It's messed up.

2) When you try to replace an existing 8-bit texture palette with a new 8-bit texture pallet outside of the model, the editor automatically imports this as a 32-bit texture when it's not. Then if you try to change it to 8-bit texture, all textures maps are changed back to 8-bit textures again when it is not necessary. I'm afraid doing this redundantly will loose some of the image quality.

3) In your Scale Factor pull down menu, can you add the ability to "physically" move the x, y, z coordinates of a selected mesh(es) ?
Say for example I want to move a Gunturret mesh from one side of a model to somewhere else. I could manually type the coordinates, or use the arrow keys to manually move the mesh into a new position.

4) Any progress on ability to apply textures down to the pixel coordinate x,y to a vertice coordinate of a mesh ? You had couple of pictures about this (A-Wing) earlier in this thread. Also, how about texture illumination and cloaking/transparency feature that Optech has ?
Some people have posted about using ReShade project as a nice addition but I'm not familiar with it. :-)
Last edited by Bman on Mon Feb 22, 2016 3:19 am, edited 1 time in total.
W-I-P: TFTC, MC Viscount Cr., ISD-II Avenger, NL-1 Platform, Ton-Falk Esc. Cr., & Misc.

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

Post by JeremyaFr » Thu Feb 04, 2016 7:24 pm

1. Fixed. I removed compacting textures on Save and I added a button.

3. Added. I added a dialog box to move selected meshes.

4. It's not yet functional.

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

Post by JeremyaFr » Thu Feb 04, 2016 7:27 pm

An update:

fixed:
  • not compact textures on Save
added:
  • compact textures
  • generate textures names: Tex00000, Tex00001, and so on
  • move meshes
Download link:
https://ci.appveyor.com/project/JeremyA ... /artifacts

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

Post by Bman » Mon Feb 22, 2016 3:38 am

.
Last edited by Bman on Thu Mar 24, 2016 2:27 am, edited 3 times in total.
W-I-P: TFTC, MC Viscount Cr., ISD-II Avenger, NL-1 Platform, Ton-Falk Esc. Cr., & Misc.

Rasalas
Cadet 2nd Class
Posts: 50
Joined: Fri Jan 17, 2014 8:09 pm

Post by Rasalas » Mon Feb 22, 2016 2:39 pm

I've also noticed some slowdown from time to time, most notably when wireframe is activted in the model viewer. BTW Jeremya, I have a few feature suggestions regarding the model viewer (the one in the editing window, not that fullscreen one):
- removal of resetting the view after an editing operation
- orthographic rendering
- removal of momentum when rotating or zooming the model
- ability to hide meshes
- keyboard shotcuts for the view settings (front, back, up, down,...)

Besides the model viewer, did you make any progress implementing texture illumination to your editor? I've noticed you have added a texture viewer programm, which also shows the palette entries of each texture. If I understand this correctly, these are responsible for illumination, at least for 8 bit textures. Is there a way to edit them?

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

Post by JeremyaFr » Thu Feb 25, 2016 2:59 pm

An update:

fixed:
  • preserve editor view on adding hardpoint and engine glow
added:
  • duplicate meshes command

Rasalas
Cadet 2nd Class
Posts: 50
Joined: Fri Jan 17, 2014 8:09 pm

Post by Rasalas » Thu Feb 25, 2016 3:27 pm

Hello Jeremya, thank you very much! :)

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

Post by JeremyaFr » Wed Mar 23, 2016 5:22 pm

An update:

added:
  • setting texture illumination

Post Reply