OpenXcom Forum

Modding => Tools => Topic started by: vdbomber on April 11, 2024, 09:25:31 am

Title: LOFTEMPS Viewer 3D
Post by: vdbomber on April 11, 2024, 09:25:31 am
Program made to see/check loftemps geometry.

Example video

Notes

V6.51 update
Search by mapblock name.

V6.512 update
Title: Re: LOFTEMPS Viewer 3D
Post by: kevL on April 11, 2024, 09:36:11 pm
sweet, nice job. @bulletdesigner was looking for something like this (but i wouldnt/couldnt do it that good in Mv2)

personal curiosity: did you use quaternions for camera movement?
Title: Re: LOFTEMPS Viewer 3D
Post by: vdbomber on April 12, 2024, 12:50:20 pm
personal curiosity: did you use quaternions for camera movement?

Quaternion is used for rotation in Godot v4.
But i start writing code in Godot v3 with "ready to use script" for camera mouselook, when go for newer version, was need to make changes.
now its look like this, "basis" is current rotation
   
# Mouse look by mouse position.
_mouse_motion.y = clamp(_mouse_motion.y, -1550, 1550)
transform.basis = Basis( Quaternion.from_euler( Vector3(_mouse_motion.y * Crotation, _mouse_motion.x * Crotation, 0) ))
Title: Re: LOFTEMPS Viewer 3D
Post by: kevL on April 13, 2024, 02:58:24 am
nice :)
Title: Re: LOFTEMPS Viewer 3D
Post by: vdbomber on April 13, 2024, 12:01:59 pm
as Godot is game engine.. something will work without much problem

first try

second try

second try different map
Title: Re: LOFTEMPS Viewer 3D
Post by: kevL on April 14, 2024, 06:53:27 am
looks like an excellent tool to check lofts and parts placement
Title: Re: LOFTEMPS Viewer 3D
Post by: bulletdesigner on April 16, 2024, 12:45:50 pm
great tool! also works easy and intuitive, only issue i got was giving the path i only manage to do it in the .cfg document ( i got the paths on desktop, maybe that was the issue)
Title: Re: LOFTEMPS Viewer 3D
Post by: vdbomber on April 16, 2024, 04:33:42 pm
great tool! also works easy and intuitive, only issue i got was giving the path i only manage to do it in the .cfg document ( i got the paths on desktop, maybe that was the issue)
Thanks.
Should work with any path to "MapView2", only thing - path you choose should have "settings" folder and MapResources.yml and MapTilesets.yml in this "settings" folder.
If paths an issue i can remade it directly to "choose folder with files" or make two "text input" fields with "select files option".
Not hard to do.

Also found bug.
For some reason Godot string function "rstrip" is removed extra char from name of MCD file.
It was only one file name of them i tested.
Fixed, version 6.511 in first post.

Title: Re: LOFTEMPS Viewer 3D
Post by: B1ackwolf on July 17, 2024, 08:43:41 pm
Outstanding work! This tool seems incredibly useful, but I'm unable to run it properly. I selected the mapviewer folder correctly, as well as the mapblock and other necessary files, but when I click the run button, it simply freezes. The task manager shows a spike in CPU and RAM usage, but after a few seconds, the program closes itself. Any idea what could be happening?

I even tried deactivating the antivirus while running the executable, just in case, but to no avail.

I'm pretty sure my PC is beefy enough, so I don't think it's a specs issue.
cpu amd 5600x, 32gb ram, gpu 6800xt (i dont think this requires this tho)

Thank you very much!
Title: Re: LOFTEMPS Viewer 3D
Post by: kevL on July 18, 2024, 01:05:53 am
what's your operating system?
Title: Re: LOFTEMPS Viewer 3D
Post by: B1ackwolf on July 18, 2024, 07:29:41 am
what's your operating system?

Oh, right, i forgot to put that.

Windows 11 Home, 64 bits
Title: Re: LOFTEMPS Viewer 3D
Post by: vdbomber on September 22, 2024, 05:52:59 pm
Cant say for sure. Win11 is not in my list. Should work, as any usual program for win. Anyone else have win11?
Title: Re: LOFTEMPS Viewer 3D
Post by: vdbomber on September 22, 2024, 06:12:04 pm
I even tried deactivating the antivirus while running the executable, just in case, but to no avail.
...

well. anyway i can see here some problems:
1. mapview dont have converted paths for your resource files (by RulesetConverter) if you can open mapview and see your maps its should work for 3d.
2. some problems with win11 i cant predict.

P.S. Addition
found logic bug in code, standard ufo paths without "basepath" in Mapview data not worked.
fixed.
also made executable for Linux X11. cant test it work, on own risk.