Page 6 of 10

Re: [OPTing] OPTech v2

Posted: Sat Apr 25, 2020 3:18 am
by Darksaber
Crash report

Code: Select all

---------------------------
Press Ctrl+C to copy the text
---------------------------
System.ArgumentException: Width and Height must be non-negative.
   at System.Windows.Rect..ctor(Double x, Double y, Double width, Double height)
   at Xceed.Wpf.Toolkit.Zoombox.Zoombox.ViewFinderSelectionConverter.Convert(Object value, Type targetType, Object parameter, CultureInfo culture)
   at System.Windows.Data.BindingExpression.TransferValue(Object newValue, Boolean isASubPropertyChange)
   at MS.Internal.Data.PropertyPathWorker.UpdateSourceValueState(Int32 k, ICollectionView collectionView, Object newValue, Boolean isASubPropertyChange)
   at MS.Internal.Data.PropertyPathWorker.OnDependencyPropertyChanged(DependencyObject d, DependencyProperty dp, Boolean isASubPropertyChange)
   at System.Windows.Data.BindingExpression.HandlePropertyInvalidation(DependencyObject d, DependencyPropertyChangedEventArgs args)
   at System.Windows.Data.BindingExpressionBase.OnPropertyInvalidation(DependencyObject d, DependencyPropertyChangedEventArgs args)
   at System.Windows.Data.BindingExpression.OnPropertyInvalidation(DependencyObject d, DependencyPropertyChangedEventArgs args)
   at System.Windows.DependentList.InvalidateDependents(DependencyObject source, DependencyPropertyChangedEventArgs sourceArgs)
   at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)
   at System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType)
   at System.Windows.DependencyObject.SetValueCommon(DependencyProperty dp, Object value, PropertyMetadata metadata, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType, Boolean isInternal)
   at System.Windows.DependencyObject.SetValue(DependencyPropertyKey key, Object value)
   at Xceed.Wpf.Toolkit.Zoombox.Zoombox.UpdateViewport()
   at Xceed.Wpf.Toolkit.Zoombox.Zoombox.UpdateView(ZoomboxView view, Boolean allowAnimation, Boolean allowStackAddition, Int32 stackIndex)
   at Xceed.Wpf.Toolkit.Zoombox.Zoombox.OnSizeChanged(Object sender, SizeChangedEventArgs e)
   at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
   at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
   at System.Windows.FrameworkElement.OnRenderSizeChanged(SizeChangedInfo sizeInfo)
   at System.Windows.ContextLayoutManager.fireSizeChangedEvents()
   at System.Windows.ContextLayoutManager.UpdateLayout()
   at System.Windows.ContextLayoutManager.UpdateLayoutCallback(Object arg)
   at System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks()
   at System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget)
   at System.Windows.Media.MediaContext.RenderMessageHandler(Object resizedCompositionTarget)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
---------------------------
OK
---------------------------

Re: [OPTing] OPTech v2

Posted: Sat Apr 25, 2020 7:21 am
by Vince T
And something else:
As it's my understanding it is now possible to use 32bit textures in XWA right?

However, I can't create an 32bit OPT in OPTech, because it'll still demand textures to be 256 colors and won't create the OPT otherwise.
Could you lift that barrier?

Also, would it be possible to enable PNG support in OPTech? IIRC you can use pngs in OPT Editor...

Re: [OPTing] OPTech v2

Posted: Sat Apr 25, 2020 11:56 am
by JeremyaFr
The crash was in Xceed.Wpf.Toolkit. It has been fixed in v3.6. I've updated OPTech to use the latest version v3.8. I think this should fix the crash.
Please redonwload OPTech.

Re: [OPTing] OPTech v2

Posted: Sat Apr 25, 2020 11:59 am
by JeremyaFr
OPTech wasn't designed to support 32-bit OPTs and PNG files.
Adding these features needs some refactoring and rewriting all the code related to textures reading and writing, the code related to the texture parts of OPT writing and importing.
So this will take some time to add these features.

Re: [OPTing] OPTech v2

Posted: Sat Apr 25, 2020 12:55 pm
by Vince T
That sounds scary!
If it's too much of a hassle and too big a risk, leave it, I'll find another way :)

Re: [OPTing] OPTech v2

Posted: Sat Apr 25, 2020 4:00 pm
by Darksaber
Thanks Jeremy

GT you can always swap out the 256 textures for 32bit PNG's in XWA Opt Editor after you opted the craft in Optech, I' know it a lot of messing about but it's and answer, and to be honest its not that difficult :)

Re: [OPTing] OPTech v2

Posted: Sun Apr 26, 2020 11:20 pm
by Vince T
Thought about that, too but I don't really bother with the numbers until the very end. I usually name the meshes according to what they are - MainHull, MainEngine, HyperEngine, SmallTurret, etc. That makes identifying and sorting them way easier.

Re: [OPTing] OPTech v2

Posted: Mon Apr 27, 2020 6:42 am
by Bman
I noticed that too, moving the individual meshes up or down in the list in XWAOptEditor is a lot easier to do than in Optech. Probably good practice too is to put all rotating pilot/s-foils meshes "last" in the list of any model, that way when substituted by other models using "objects hook" method, it may not conflict as much if they don't have same number of meshes and their corresponding index order dosen't cause rotation on the wrong hull meshes, as dictated by the original model's .ini files. Easier to fix rotarty mesh issues at end of a mesh list.

Re: [OPTing] OPTech v2

Posted: Mon Apr 27, 2020 7:31 am
by Vince T
Maybe a common ground would be to display a sequencial number before the actual mesh name. That way everyone can keep their preferred naming habits but you still have a way of orientation. Kinda like this
1 MyMainHull
2 MyShieldgenerator
3 MyReallyBigGun
4 MeshX

And so on

On another note, there seems to be a bug with either the scaling function or the model dimension function, as their values differ:
Scaling Window:
Scaling1.jpg
Model Dimensions:
Scaling2.jpg
Craft Library:
Scaling3.jpg

Also, the model dimensions window sometimes displays inccorrect height of the entire OPT but only a part of it.
For Example, here's the dimensions of the Warhammer Heavy Cruiser. Left is the incorrect values. Right the correct after I merged all meshes together.
DisplayHeight.jpg
My first thought that it might substract periphery meshes like ANTENNA or SHIELDGEN but if you look at the model, those don't make a difference of 400 meters....

Re: [OPTing] OPTech v2

Posted: Mon Apr 27, 2020 8:23 am
by Vince T
The issue I see here is that if I use such a function(which doesn't even exist yet :D) I'd lose the custom naming for all meshes, not only the ones that were impacted by moving or merging.

Maybe make the sequencial Number displaying in the mesh list a separate request. That way I could keep my precious names but still have the orientation I crave XD

@Jeremy, just to clarify, my idea here is to display the mesh number in the list, before the actual mesh name. The leading zeroes probably won't work, I added those for ease to read.
sequentialnumber.jpg

Re: [OPTing] OPTech v2

Posted: Mon Apr 27, 2020 9:11 am
by Darksaber
No you wouldn't, because you would still be able to name your meshes as you want, the only time it would reset the names is if you where to click on Fix/Mesh Numbering, then and only then if it was possible to do this you would loose your names, but it would be your choice!

We are talking about Optech here NOT XwA Opt Editor

Look forget it, I'll delete my posts, you just don't seem to get what I'm suggesting

And please DO NOT change anything, Keep Optech as it is!

Re: [OPTing] OPTech v2

Posted: Mon Apr 27, 2020 9:31 am
by Vince T
Lol, calm down mate. I perfectly undestand what you mean, it just seems we have different styles of making our OPTs. Therefore I clarified my idea not as an alternative but an addition.

Re: [OPTing] OPTech v2

Posted: Mon May 25, 2020 9:26 pm
by Vince T
Hey Jeremy, I seem to be having a few problems with the scaling functions in the current versoin:
I have a ship, which I want to scale down from 600m to 400m.

1) The scaling tool and the dimensions dialogue show different values:
Scaling1.jpg
Scaling2.jpg
2) Now trying to scale the model down using the various functions, doesn't work too well:
- Using the scale fields in the geometries window and entering 66 in each of them does seem to scale down the ship according to the Graphical window. However checking the sizes in either of the aforementioned dialogues shows no difference. Saving the OPT or (for testing) merging all the meshes and recalculating hitzones doesn't fix it.
- Using the scale OPT function does seem to scale the individual meshes, but it retains their position utterly tearing the shpi apart. This may be useful for scaling individual meshes but not for scaling the whole model.

Could you please take a look at this?

Re: [OPTing] OPTech v2

Posted: Tue May 26, 2020 1:51 pm
by JeremyaFr
EDIT: link removed

I've fixed the model dimensions dialog. Now the scale opt dialog and the dimension dialog show the same values.

I've improved the scale opt function.

Re: [OPTing] OPTech v2

Posted: Tue May 26, 2020 8:56 pm
by Vince T
YES! That did it! Thank you Jeremy!

Re: [OPTing] OPTech v2

Posted: Wed May 27, 2020 12:42 pm
by JeremyaFr
UPDATE

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

Re: [OPTing] OPTech v2

Posted: Tue Jun 09, 2020 12:27 pm
by Darksaber
Hi Jeremy, is it possible to change the text in the texture box from grey to black please

The grey on a purple background and it's a little hard to see sometime, changing it to black would be a great help

Thanks you
Texture.jpg

Re: [OPTing] OPTech v2

Posted: Tue Jun 09, 2020 12:45 pm
by Vince T
Could also make the background white. I often run into trouble seeing the border of the texture currently selected.

Re: [OPTing] OPTech v2

Posted: Tue Jun 09, 2020 12:49 pm
by Ace Antilles
Is there ways to alter the background colour of the opt viewing section? On this or the explorer.
Black is ok but a green screen option for example would be a great help

Re: [OPTing] OPTech v2

Posted: Tue Jun 09, 2020 1:36 pm
by Darksaber
Here we go hijacking my request again, nothing is mentioned for weeks but as soon as I ask for something everyone else piles on top again! :kopfwand:

I'm fine with a white background for the text box

But Ace really a green background, Jeremy if you can add a color change to the background PLEASE make it optional and add it to the Option/Colour section on the main menu, sorry but I'm NOT working with a permanent Green Background

Ace can I ask why you want a green background? Is it so you can snapshot an image of the opt and then remove the background?

Could I offer an alternative suggestion if that's what Ace is trying to achieve, it's not a request for Optech but for XWA Opt Editor, since that can handle 32bit alpha textures, would it be possible to add taking a snapshot of the image in the view window and saving it with a transparent background?

Re: [OPTing] OPTech v2

Posted: Tue Jun 09, 2020 1:44 pm
by JeremyaFr
Hello,
Here is a WIP version:

EDIT: link removed

I've changed the foreground and background color for the list boxes.
I've added a color picker to select the background color of the render screen. Black is the default color.

Re: [OPTing] OPTech v2

Posted: Tue Jun 09, 2020 2:46 pm
by Vince T
Great work Jeremy, all works fine. The new lists are lightyears better!

As for the background, adding the color picker was a good idea. I don't really see the necessity for a greenscreen mode, as there's no Anti Aliasing blurring out the edges of the models and I think there's rarely, if ever, a case where you have OPTs with pure black (#000000) textures. Still a nice thing to play with. :)

Re: [OPTing] OPTech v2

Posted: Tue Jun 09, 2020 2:59 pm
by Darksaber
Thanks Jeremy, that'll do just fine :) at least now I don't have to squint to see it lol

Color picker lol Meh! Thanks :)

Re: [OPTing] OPTech v2

Posted: Tue Jun 09, 2020 3:19 pm
by Ace Antilles
Darksaber wrote:
Tue Jun 09, 2020 1:36 pm
Ace can I ask why you want a green background? Is it so you can snapshot an image of the opt and then remove the background?

Could I offer an alternative suggestion if that's what Ace is trying to achieve, it's not a request for Optech but for XWA Opt Editor, since that can handle 32bit alpha textures, would it be possible to add taking a snapshot of the image in the view window and saving it with a transparent background?
Yes it was XWA Opt Explorer mainly and Xwa Opt Editor I was thinking of. Was on a phone with a small screen.
Yes an option to save a snapshot with a transparent background would be most useful. At the very least different colour backgrounds.

Re: [OPTing] OPTech v2

Posted: Tue Jun 09, 2020 4:40 pm
by JeremyaFr
UPDATE

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