Page 7 of 8

Re: [OPTing] OPTech v2

Posted: Wed Jun 10, 2020 10:13 am
by Darksaber
A few requests please Jeremy

1. On the Transformation page, would it be possible to move the other stuff down and add a mesh selection box, the same as on the Hitzone page please

2. Also on the Transformation page (and if it's possible to add a selection box), beside the selection box would it possible to add a Reset Transformation button, so when you select an individual mesh or multiple different meshes then press the Reset Transformation button only meshes selected would be reset

It would work on the same principal as if you where click on Calculate/Transformations from the main menu, but only for a single or multiple selected meshes

3. Selected Hardpoint boxes, on smaller craft such as fighters the boxes are quiet large,, but when you come to select a hardpoint on a starship you can't see the boxes unless you zoom really close in to the craft then you have to scan along the starship hull to see which hardpoint you have selected. My question is could the selection boxes be made larger depending on the size ration of the craft, the larger the craft the larger the hardpoint selection box is, test it yourself, small craft a fine, but test a starship, select a hardpoint and see it you can zoom in directly to that Hardpoint, unless you to the same for selected hardpoints as you did for selected meshes and faces???? hmmmm?

Right this next one I'll try and request this again, hopefully without someone coming along and pissing me off AGAIN!!!

4. Here goes, when you move meshes up or down the mesh names go out of order

Mesh 1
Mesh 2
Mesh 5
Mesh 4
Mesh 3

Instead of manually renaming them, would it be possible to add a menu item to the Main Menu/Fix category something like "Mesh Number Order" when clicked the meshes would be renamed in order like so

Mesh 1 to Mesh 1
Mesh 2 to Mesh 2
Mesh 5 to Mesh 3
Mesh 4 to Mesh 4
Mesh 3 to Mesh 5
so on

You see where I'm going with this? Obviously some people like renaming the meshes to other thing besides Mesh XX, but the Mesh or other named Mesh would only be renamed Mesh XX if you actually click on the "Mesh Number Order". (Remember the Meshes with your different names would only be renamed "If" you where to manually click the link)!!!!!!!!!!!!

So Jeremy is this possible? :?

5. Last thing, I see you added a # Number system for the meshes in Xwa Opt Editor, could this be applied to Optech too?

#
0 Mesh 1
1 Mesh 2
2 and so on
3
4

------------------------------------------------------------------------

I think most of these are reasonable requests, some are doable some might not be

but before anyone starts pissing me off again about the 4th request, lets just see if it's possible for Jeremy to do this, and before anyone start arguing the toss about it!

Thank you!

Re: [OPTing] OPTech v2

Posted: Wed Jun 10, 2020 12:15 pm
by Vince T
Might I just suggest ...

nah just kidding! #4 sounds great and I particularly love #5!

Re: [OPTing] OPTech v2

Posted: Wed Jun 10, 2020 12:48 pm
by JeremyaFr
All seem doable.

Re: [OPTing] OPTech v2

Posted: Wed Jun 10, 2020 12:50 pm
by Darksaber
Thank you :D :D

Re: [OPTing] OPTech v2

Posted: Wed Jun 10, 2020 4:42 pm
by JeremyaFr
Done

EDIT: link removed

Changes are:
- on the transformation tab, move the Animate buttons to the top right
- on the transformation tab, add the mesh list at the top left
- on the transformation tab, add a reset transformation button
- on the render screen, modify the selected hardpoints boxes
- on the menu, add a rename meshes number menu item
- add item index in the list boxes

Re: [OPTing] OPTech v2

Posted: Wed Jun 10, 2020 6:25 pm
by Darksaber
Brilliant

Only one thing, the selected hardpoint boxes, on smaller craft they are now are harder to see, the opposite has happened, large craft are better to see but the box or circle now gets lost in the white mesh lines as it white itself, possibly if the circle thickness could be made slightly wider on the outer rim or probably better would be to color the circle to say orange so it stands out

Last thing the "Mesh Number Order" you named it Name Meshes Number? could this be changed please :herzen1:

Just tested the "Mesh Number Order" (lol), sorry but could you possibly change Mesh to UPPER case please MESH as long as I've used Optech it's always been UPPER case, sorry :( :(


Other than those 3 things totally brilliant well done :D :gold: :gold: :gold:

Re: [OPTing] OPTech v2

Posted: Wed Jun 10, 2020 7:13 pm
by JeremyaFr
EDIT: link removed

I've set the outer color of the selected hardpoints to orange.
I've set the menu item to "Mesh Number Order".
The meshes names are now uppercase.

Re: [OPTing] OPTech v2

Posted: Wed Jun 10, 2020 7:33 pm
by Darksaber
Your a very nice man :) You'll be rewarded very well in Valhalla

Image
Image

Re: [OPTing] OPTech v2

Posted: Thu Jun 11, 2020 4:00 pm
by JeremyaFr
UPDATE

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

Re: [OPTing] OPTech v2

Posted: Thu Jun 11, 2020 5:44 pm
by Darksaber
cheers :D

Re: [OPTing] OPTech v2

Posted: Thu Jul 16, 2020 1:40 pm
by Vince T
Hey Jeremy, I have 2 more requests!
1) Would it be possible to add a function to assign one or more EngineGlows to a different mesh without loosing their attributes?
E.g. it's currently assigned to Mesh1 but I'm redoing Mesh1 and want to "move" the EG to the new version. Coordingates, Dimensions, Colors etc. should remain the same, only the assigned mesh would change.

2) Same thing just for Hardpoints.

Re: [OPTing] OPTech v2

Posted: Thu Jul 16, 2020 3:46 pm
by JeremyaFr
WIP

Hello,
I've added copy and paste buttons to the HPs and EGs controls.

EDIT: link removed

Re: [OPTing] OPTech v2

Posted: Sun Jul 19, 2020 11:55 am
by JeremyaFr
UPDATE

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

Re: [OPTing] OPTech v2

Posted: Mon Jul 20, 2020 4:06 pm
by Vince T
Hey Jeremy, thanks for the update. I meant to give feedback sooner but forgot about it. It‘s working great and saves me a lot of time!

Re: [OPTing] OPTech v2

Posted: Mon Aug 24, 2020 4:02 pm
by JeremyaFr
UPDATE

Hello,
I've updated OPTech.

Now the length of engine glows are not updated when the mesh is scaled.

Re: [OPTing] OPTech v2

Posted: Wed Sep 16, 2020 10:39 am
by JeremyaFr
UPDATE

Hello,
I've updated OPTech.

Now the save buttons are enabled when a new opz is created.

Re: [OPTing] OPTech v2

Posted: Wed Sep 16, 2020 12:37 pm
by Vince T
Thanks Jeremy, that‘s a great help in organizing my stuff!

Re: [OPTing] OPTech v2

Posted: Tue Oct 06, 2020 9:31 am
by Vince T
Hey Jeremy, might have another question or request here, if that's even possible ...
In this thread: https://www.xwaupgrade.com/phpBB3/viewt ... 15&t=12561
Looking at Sedonion's comment on Oct. 6, 11:00 I'm thinking a cause for some of the shading errors on newer models with fewer textures was me using the Coincident Vertices function and effectively removing vertices that would have been needed for rendering shapes properly. (Just a theory of mine)
Would it be possible to "duplicate" vertices if the connected faces have different UV Coordinates?

Or are vertices already excluded from the purge if they have different UV coordinates?

Re: [OPTing] OPTech v2

Posted: Tue Oct 06, 2020 12:07 pm
by JeremyaFr
Hello,

You can see the source code for the "Coincident Vertices" menu item here:
https://github.com/JeremyAnsel/OPTech/b ... 1472-L1543

The function removes duplicated vertices in quad faces. The function considers a vertex as being duplicated when 2 vertices have the same XYZ position. The function doesn't read the UV coords.

Maybe there is a bug with UV coords when the second and third vertices have the same XYZ position.

Re: [OPTing] OPTech v2

Posted: Sun Oct 25, 2020 2:00 pm
by JeremyaFr
UPDATE

Hello,
I've updated OPTech.

You can now sort the texture coords by index, U coord, V coord

Re: [OPTing] OPTech v2

Posted: Wed Oct 28, 2020 6:06 pm
by sedenion
Vince T wrote:
Tue Oct 06, 2020 9:31 am
Looking at Sedonion's comment on Oct. 6, 11:00 I'm thinking a cause for some of the shading errors on newer models with fewer textures was me using the Coincident Vertices function and effectively removing vertices that would have been needed for rendering shapes properly. (Just a theory of mine)
Would it be possible to "duplicate" vertices if the connected faces have different UV Coordinates?
JeremyaFr wrote:
Tue Oct 06, 2020 12:07 pm
The function removes duplicated vertices in quad faces. The function considers a vertex as being duplicated when 2 vertices have the same XYZ position. The function doesn't read the UV coords.
The key thing are not UV, but normals. I was speaking about UV, because Vince T said that using multiple texture help to break the smooth shading.

My first guess was that creating two sets of UVs on the same vertex force the 3D modeling software to duplicate the vertices (in fact, this all depend how vertices and faces are stored), forcing engine to break the normals interpolation and create two normals for the same vertex. It seem the real factor here is not the UV coordinate, but the texture/material change, which create a new mesh subset. It seem this subset change actually breaks the normals interpolation which create an hard edge.

Maybe creating subset is the only way to break the smooth shading, but nothing is sure: Smooth shading is normally created by interpolating vertex normals (which are different from face normals for smooth shading), the "smooth" works because the same vertex have the same normal for all faces that share this vertex : so the transition is naturally made over the vertex. However, if, for each face, we change the normal of the sharing vertex, the smooth shading should be break, because the interpolation is different between each primitive (triangle/quad) draw.

Creating an hard edge instead of a smoth edge is theoretically pretty simple: For each vertices, uses face normals instead of vertex normals, which produce "flat" shading interpolation on the face, and "hard line" of shading on edges. This way, the flat/hard and smooth shading can be even mixed on the same face.

So, why it is so difficult to break the "smooth" shading ? There may be several answer, and one must try and check each step to verify what happen, what works and what prevent :

- This can be the 3D modeling software which, at export, or even within its own vertices/normals logic, re-optimize the vertex normals, avoiding same position to have multiple normals.

- The OPT import/optimization process, that ignore multiple normals and compute a new unique vertex normal for each same "position" occurrences.

- The XWA engine, which may ignore the given vertex normals and recompute it on the fly for each per-texture subsets (this would be strange but not impossible)

In my experience, the first thing to look at is clearly what the 3D modeling software exports, who usually simplify the mesh beyond expectation (which is why we often have to use some tricks such as materials or UV breaking to force export of duplicated vertices with separated normals)

If I have some time and energy between two lockdown, and end of the world I will investigate that to make things clear.

Re: [OPTing] OPTech v2

Posted: Fri Oct 30, 2020 12:13 am
by Trevor
sedenion wrote:
Wed Oct 28, 2020 6:06 pm
It is the Opt Editor that "Merges Similar Vertices" - where similar = same xyz+uv (Different UV co-ords MUST use different vertices otherwise the texture mapping would break)

You are right that merging should also account for Normals (if the difference between 2 normal exceeds a certain number consider them separate)
This is already done in OptFix where it will ask for a "Smooth Angle", any angle below this number will share vertices.

However such a feature should be part of the Opt Editor and on a per-mesh basis (So you can smooth engines, but keep flat hull plating for example)

Trev

Re: [OPTing] OPTech v2

Posted: Fri Oct 30, 2020 1:47 pm
by sedenion
Trevor wrote:
Fri Oct 30, 2020 12:13 am
It is the Opt Editor that "Merges Similar Vertices" - where similar = same xyz+uv (Different UV co-ords MUST use different vertices otherwise the texture mapping would break)

You are right that merging should also account for Normals (if the difference between 2 normal exceeds a certain number consider them separate)
This is already done in OptFix where it will ask for a "Smooth Angle", any angle below this number will share vertices.
In fact, as I seen, the OPT format is pretty flexible and store separate lists of positions, normals and textures coordinates, the faces are builts using indices pointing to theses lists. So, in theory, one can "merge" (ie. use the same indice) for position and UV, and still have several normals for the same Position+Uv combination (face's shared vertex). In fact, every combinations are possibles. The question is how the XWA engine really handle it, and how to be sure 3dsMax or Blender (or whatever) export vertices data properly.

Re: [OPTing] OPTech v2

Posted: Fri Nov 13, 2020 1:05 pm
by Vince T
Bug Report:
Sometimes, after using the point in time Restore function after Stitching and scaling a texture, when I then select the faces, the texture window doesn't recognize the selction, as if I hadn't selected any faces at all. I then have to unselect and reselect the entire mesh.

Re: [OPTing] OPTech v2

Posted: Fri Nov 13, 2020 5:40 pm
by JeremyaFr
WIP

Hello,
Here is a WIP version of OPTech.

Now the selection is saved on Push/Restore history.

EDIT: link removed