Page 12 of 16

Re: [OPTing] XWA OPT Editor

Posted: Mon Dec 30, 2019 8:23 pm
by JeremyaFr
The illumination is done by selecting which colors are illuminated.
You select a color (by clicking on the texture or via the combo box) and a tolerence. Then you click on Make illuminated".
You can see which part of the texture by selecting the palette 0 or by comparing the result on several palettes.

Re: [OPTing] XWA OPT Editor

Posted: Tue Jan 21, 2020 4:45 am
by Driftwood
Getting this error again. Can't seem to find the errant file.

Everything appears to be either .png or .jpg at the moment (scratchhead)

Code: Select all

---------------------------
JeremyAnsel.Xwa.Opt
---------------------------
C:\Users\\Documents\Opting Files\Opts\Blender Working Files\t-85-x-wing\T85Xwing.obj

System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
Parameter name: fileName
   at JeremyAnsel.Xwa.Opt.Texture.FromFile(String fileName, String fileNameAlpha, String fileNameIllum)
   at OptObjConverter.Converter.ObjToOpt(String objPath, Boolean scale)
   at XwaOptEditor.ViewModels.MainWindowViewModel.<ExecuteImportObjCommand>b__99_0(Action`1 dispatcher)
---------------------------
OK
---------------------------
I can also send you the files if you're able to fix whatever this error is. I'm not seeing the problem.

Re: [OPTing] XWA OPT Editor

Posted: Tue Jan 21, 2020 9:42 am
by JeremyaFr
Yes, you can send me the files.
This will help.

Re: [OPTing] XWA OPT Editor

Posted: Sun Apr 19, 2020 6:53 pm
by Trevor
Bug Report:

An8 export has inside-out models.

Open an opt, export to an8, open in an8 and all faces are inside-out, to fix select all and press shift+n

Can you fix the export to output normal faces?

Trev

Re: [OPTing] XWA OPT Editor

Posted: Tue Apr 21, 2020 4:45 am
by Bman
Trevor you reminded me, will Steve's editor be able to import modern day .lwl LightWave, 3D Studio Max, blender, and other popular file formats for existing models?

Re: [OPTing] XWA OPT Editor

Posted: Tue Apr 21, 2020 10:45 am
by Trevor
At present no.
An8 supports

IN/OUT
obj, 3ds, stl (bin), lwo

OUT (using plugins from https://www.anim8or.com/smf/index.php/topic,1705.0.html)
c, Celestia (.cmod),Orbiter Mesh (.msh),Roblox (.mesh),VRML (.wrl),x

Trev

Re: [OPTing] XWA OPT Editor

Posted: Wed Apr 29, 2020 2:51 pm
by JeremyaFr
UPDATE

Hello,
I've updated XwaOptEditor.

Changelog:
- There is the mesh index in the meshes list.
- The exporters export flightgroup colors.

Re: [OPTing] XWA OPT Editor

Posted: Wed Apr 29, 2020 6:11 pm
by Darksaber
Tried exporting an Awing.opt using 3dm twice, XwA Opt editor crashed both times

Code: Select all

Faulting application name: XwaOptEditor.exe, version: 1.0.77.0, time stamp: 0x5ea99144
Faulting module name: WindowsCodecs.dll, version: 6.2.9200.22551, time stamp: 0x5b8616b3
Exception code: 0xc0000005
Fault offset: 0x00000000001297a0
Faulting process id: 0x2dc4
Faulting application start time: 0x01d61e506d685fd9
Faulting application path: I:\&XWA\@XwaOptEditor\XwaOptEditor.exe
Faulting module path: C:\Windows\system32\WindowsCodecs.dll
Report Id: c0fac478-8a43-11ea-8019-001d7d002f67

Code: Select all

Application: XwaOptEditor.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.AccessViolationException
   at System.Drawing.SafeNativeMethods+Gdip.GdipSaveImageToFile(System.Runtime.InteropServices.HandleRef, System.String, System.Guid ByRef, System.Runtime.InteropServices.HandleRef)
   at System.Drawing.Image.Save(System.String, System.Drawing.Imaging.ImageCodecInfo, System.Drawing.Imaging.EncoderParameters)
   at JeremyAnsel.Xwa.Opt.Texture.Save(System.String)
   at OptRhinoConverter.Converter.OptToRhino(JeremyAnsel.Xwa.Opt.OptFile, System.String, Boolean)
   at XwaOptEditor.ViewModels.MainWindowViewModel.<ExecuteExportRhinoCommand>b__102_0(System.Action`1<System.Action>)
   at XwaOptEditor.Services.BusyIndicatorService+<>c__DisplayClass2_0.<Run>b__0()
   at System.Threading.Tasks.Task.Execute()
   at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
   at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
   at System.Threading.Tasks.Task.ExecuteWithThreadLocal(System.Threading.Tasks.Task ByRef)
   at System.Threading.Tasks.Task.ExecuteEntry(Boolean)
   at System.Threading.ThreadPoolWorkQueue.Dispatch()

Exporting to Obj didn't crash

Exporting to An8 Crashed

Code: Select all

Faulting application name: XwaOptEditor.exe, version: 1.0.77.0, time stamp: 0x5ea99144
Faulting module name: WindowsCodecs.dll, version: 6.2.9200.22551, time stamp: 0x5b8616b3
Exception code: 0xc0000005
Fault offset: 0x00000000001297a0
Faulting process id: 0xedc
Faulting application start time: 0x01d61e51018d3649
Faulting application path: I:\&XWA\@XwaOptEditor\XwaOptEditor.exe
Faulting module path: C:\Windows\system32\WindowsCodecs.dll
Report Id: 5968ed68-8a44-11ea-8019-001d7d002f67

Code: Select all

Application: XwaOptEditor.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.AccessViolationException
   at System.Drawing.SafeNativeMethods+Gdip.GdipSaveImageToFile(System.Runtime.InteropServices.HandleRef, System.String, System.Guid ByRef, System.Runtime.InteropServices.HandleRef)
   at System.Drawing.Image.Save(System.String, System.Drawing.Imaging.ImageCodecInfo, System.Drawing.Imaging.EncoderParameters)
   at JeremyAnsel.Xwa.Opt.Texture.Save(System.String)
   at OptAn8Converter.Converter.OptToAn8(JeremyAnsel.Xwa.Opt.OptFile, System.String, Boolean)
   at XwaOptEditor.ViewModels.MainWindowViewModel.<ExecuteExportAn8Command>b__104_0(System.Action`1<System.Action>)
   at XwaOptEditor.Services.BusyIndicatorService+<>c__DisplayClass2_0.<Run>b__0()
   at System.Threading.Tasks.Task.Execute()
   at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
   at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
   at System.Threading.Tasks.Task.ExecuteWithThreadLocal(System.Threading.Tasks.Task ByRef)
   at System.Threading.Tasks.Task.ExecuteEntry(Boolean)
   at System.Threading.ThreadPoolWorkQueue.Dispatch()


Re: [OPTing] XWA OPT Editor

Posted: Wed Apr 29, 2020 8:18 pm
by JeremyaFr
UPDATE

I've updated XwaOptEditor.

Now you can save and replace the illumination of textures with ilumination maps.

Re: [OPTing] XWA OPT Editor

Posted: Wed Apr 29, 2020 9:33 pm
by Darksaber
It's still crashing with the same errors I posted above

Is this a win7 thing?

Re: [OPTing] XWA OPT Editor

Posted: Thu Apr 30, 2020 12:04 am
by Vince T
The lightmap function works nice and easy but there are some issues ingame, cuased presumably by the MIP maps. With the new method, the illuminations are only loaded when you're getting really close, and then, in some cases they seem to load up face-by-face which looks extremely odd. If you check the images below, the engines are first unlit and only partially light up as I'm getting closer.
illumination1.png
illumination2.png
Also, is there anything to consider when creating the lightmaps? Do they need black or transparent background?

Re: [OPTing] XWA OPT Editor

Posted: Thu Apr 30, 2020 12:24 am
by Trevor
*Drool*…
That looks amazing!!! cant wait for it.

Trev

Re: [OPTing] XWA OPT Editor

Posted: Thu Apr 30, 2020 12:41 am
by Bman
Nice. If you added a low level LOD mesh in the core with it's own E.G.'s, would that work in the transition ?

Re: [OPTing] XWA OPT Editor

Posted: Thu Apr 30, 2020 12:50 am
by Vince T
I'm not adding any more meshes or faces to this beast. Last I've deleted a whole bunch of them in an attempt to safe my framerate. Also, it wouldn't really help with the glowing windows, as you can see in the upper picture.
I think the solution has to be in the OPT. If you use "conventional" illumination à la OPTech or OPT Enhancer it works perfectly fine from any given distance.

Re: [OPTing] XWA OPT Editor

Posted: Thu Apr 30, 2020 1:14 am
by Bman
Trevor wrote:
Tue Apr 21, 2020 10:45 am
At present no.
An8 supports

IN/OUT
obj, 3ds, stl (bin), lwo

OUT (using plugins from https://www.anim8or.com/smf/index.php/topic,1705.0.html)
c, Celestia (.cmod),Orbiter Mesh (.msh),Roblox (.mesh),VRML (.wrl),x

Trev
Thanks for posting that link Trev. Will come in handy. Haven't been on his site for a year or two, but .obj format seemed to be the best universal format when bringing into XWAOptEditor from Anim8or. This is my favorite and easiest modeling program to use, and it's very precise. Only thing I can't stand is the texturing tools. Especially the UV wrapping circle and square tool. Applying textures and knowing how to scale them perfectly onto a mesh face is a pain for me. Wish someone could just create an easy stitching tool that allows you to zoom in and select/click or type the X,Z coordinates of a single pixel on an image file into a box, and then you choose which vertice on a mesh to staple that pixel location to. Then repeat for next 3 or 4 pixels to anchor your full image map precisely onto a mesh face or more. I've not seen any tools on net that can precisely and easily do this. And then scaling it; making image sharper or blurry once you have texture mapped on the mesh(es) the way you want.

Re: [OPTing] XWA OPT Editor

Posted: Thu Apr 30, 2020 12:15 pm
by JeremyaFr
Darksaber wrote:
Wed Apr 29, 2020 9:33 pm
It's still crashing with the same errors I posted above

Is this a win7 thing?
It is not related to your system.
I'm able to reproduce the crash.
There is a bug in my opt library. I will fix it.

Re: [OPTing] XWA OPT Editor

Posted: Thu Apr 30, 2020 1:41 pm
by JeremyaFr
I've updated XwaOptEditor.
Can you try if the crash still occurs?

Re: [OPTing] XWA OPT Editor

Posted: Thu Apr 30, 2020 2:04 pm
by JeremyaFr
General_Trageton wrote:
Thu Apr 30, 2020 12:04 am
Also, is there anything to consider when creating the lightmaps? Do they need black or transparent background?
Black pixels and transparent pixels are considered as not illuminated.

Re: [OPTing] XWA OPT Editor

Posted: Thu Apr 30, 2020 2:13 pm
by Darksaber
Obj and 3dm are fine now, they soon exported the files
An8 extracted and didn't crash but it took a lot longer than the other 2 to export the files, really slow

Re: [OPTing] XWA OPT Editor

Posted: Thu Apr 30, 2020 2:28 pm
by Vince T
JeremyaFr wrote:
Thu Apr 30, 2020 2:04 pm
General_Trageton wrote:
Thu Apr 30, 2020 12:04 am
Also, is there anything to consider when creating the lightmaps? Do they need black or transparent background?
Black pixels and transparent pixels are considered as not illuminated.
Do the lightmap images need to be monochrome or does it accept colors?
Also, any news on the mip mapping illumination distance issue?

Re: [OPTing] XWA OPT Editor

Posted: Thu Apr 30, 2020 4:05 pm
by JeremyaFr
Darksaber wrote:
Thu Apr 30, 2020 2:13 pm
An8 extracted and didn't crash but it took a lot longer than the other 2 to export the files, really slow
Fixed

Re: [OPTing] XWA OPT Editor

Posted: Thu Apr 30, 2020 4:07 pm
by JeremyaFr
General_Trageton wrote:
Thu Apr 30, 2020 2:28 pm
Do the lightmap images need to be monochrome or does it accept colors?
Also, any news on the mip mapping illumination distance issue?
It accepts colors in lightmaps. The alpha channel is used for illumination.

I will take a look to the distance issue.

Re: [OPTing] XWA OPT Editor

Posted: Thu Apr 30, 2020 6:02 pm
by Darksaber
JeremyaFr wrote:
Thu Apr 30, 2020 4:05 pm
Fixed
Just tested, much faster well done :)

Re: [OPTing] XWA OPT Editor

Posted: Thu Apr 30, 2020 11:54 pm
by Bman
Thanks!

Re: [OPTing] XWA OPT Editor

Posted: Fri May 01, 2020 3:15 pm
by JeremyaFr
UPDATE

Hello,
I've updated XwaOptEditor.
General_Trageton wrote:
Thu Apr 30, 2020 12:04 am
The lightmap function works nice and easy but there are some issues ingame, cuased presumably by the MIP maps. With the new method, the illuminations are only loaded when you're getting really close, and then, in some cases they seem to load up face-by-face which looks extremely odd. If you check the images below, the engines are first unlit and only partially light up as I'm getting closer.
Please retry.