Gildor's Forums

Author Topic: Deus Ex 2000 models distorted?  (Read 193 times)
deusex
Newbie
*
Posts: 7


View Profile
Deus Ex 2000 models distorted?
« on: December 20, 2022, 15:37 »

Hello, I tried the UE Viewer program to extract some 3D models from the old "Deus Ex" game from 2000.

I used the latest version of UE Viewer and the Deus Ex models look okay in the UE Viewer preview, and I can extract them as a.3d and d.3d files.

The problem is when I try to import the a.3d or d.3d models into Blender with Skywolf285's plugin (https://github.com/Skywolf285/UE1-VertexMesh-Blender-IO/releases) Then the models look all wrong/distorted (they are very skinny as if the vertical y-axis  is scaled too much...)

I tried the different Export options in UE Viewer but it makes no difference. Is there another option hidden somewhere that I should (un)check to make the extracted a.3d and d.3d files look correct?
Logged
Gildor
Administrator
Hero Member
*****
Posts: 7977



View Profile WWW
Re: Deus Ex 2000 models distorted?
« Reply #1 on: December 20, 2022, 15:50 »

I'd suggest trying these .3d files somewhere else. Probably the broken thing is Blender itself.
And - there's no options which controls the .3d export.

BTW UModel has special code for Deus, for mesh loading. Deus has larger mesh scale possibilities, but UModel converts it to base UE1 mesh. However, if you see things correctly in UModel itself, then the export should appear in the same way. Export code is entirely isolated from any game-specific stuff.
Logged
deusex
Newbie
*
Posts: 7


View Profile
Re: Deus Ex 2000 models distorted?
« Reply #2 on: December 20, 2022, 16:13 »

Thank you for the quick reply!

I also thought it would be strange that the model would look good in the preview, but wrong when you open the exported file? But I tried a different program and the result is the same (I tried to attach an image to show the issue)


* distortedexport.jpg (266.38 KB, 1920x1774 - viewed 44 times.)
Logged
Gildor
Administrator
Hero Member
*****
Posts: 7977



View Profile WWW
Re: Deus Ex 2000 models distorted?
« Reply #3 on: December 20, 2022, 16:27 »

Ok, I see - screenshots showed the thing.

I think there's a non-uniform MeshScale parameter for this mesh. It is exported as text information (.uc file next to the mesh) if you'll enable "Unreal script" export with -uc command line option. This option is not mapped to the UI, so the command line should to be used for that.
Logged
deusex
Newbie
*
Posts: 7


View Profile
Re: Deus Ex 2000 models distorted?
« Reply #4 on: December 20, 2022, 17:10 »

I was able to extract the .uc file, but I'm not very knowledgeable about it to spot a problem? The scale of the newly exported files is all uniform 0.311162 for the x, y and z axes...? But the model when imported in a 3D program is still stretched out and doesn't show correctly.

MiltaryBot.uc file contents:
Code:
class MilitaryBot extends Actor;

#exec MESH IMPORT MESH=MilitaryBot ANIVFILE=MilitaryBot_a.3d DATAFILE=MilitaryBot_d.3d
#exec MESH ORIGIN MESH=MilitaryBot X=0 Y=0 Z=254.213 YAW=64 PITCH=0 ROLL=0

#exec MESH SEQUENCE MESH=MilitaryBot SEQ=All        STARTFRAME=0  NUMFRAMES=35 RATE=30
#exec MESH SEQUENCE MESH=MilitaryBot SEQ=Still      STARTFRAME=0  NUMFRAMES=1
#exec MESH SEQUENCE MESH=MilitaryBot SEQ=Walk       STARTFRAME=1  NUMFRAMES=20 RATE=10
#exec MESH SEQUENCE MESH=MilitaryBot SEQ=Run        STARTFRAME=1  NUMFRAMES=20 RATE=10
#exec MESH SEQUENCE MESH=MilitaryBot SEQ=Shoot      STARTFRAME=0  NUMFRAMES=1
#exec MESH SEQUENCE MESH=MilitaryBot SEQ=BreatheLight STARTFRAME=0  NUMFRAMES=1
#exec MESH SEQUENCE MESH=MilitaryBot SEQ=DeathFront STARTFRAME=0  NUMFRAMES=1
#exec MESH SEQUENCE MESH=MilitaryBot SEQ=DeathBack  STARTFRAME=0  NUMFRAMES=1
#exec MESH SEQUENCE MESH=MilitaryBot SEQ=Idle       STARTFRAME=21 NUMFRAMES=14 RATE=3
#exec MESH SEQUENCE MESH=MilitaryBot SEQ=Disabled1  STARTFRAME=4  NUMFRAMES=1
#exec MESH SEQUENCE MESH=MilitaryBot SEQ=Disabled2  STARTFRAME=14 NUMFRAMES=1

#exec MESHMAP SCALE MESHMAP=MilitaryBot X=0.311162 Y=0.311162 Z=0.311162

#exec MESH NOTIFY MESH=MilitaryBot SEQ=Walk       TIME=0.05 FUNCTION=PlayFootStep
#exec MESH NOTIFY MESH=MilitaryBot SEQ=Walk       TIME=0.5 FUNCTION=PlayFootStep
#exec MESH NOTIFY MESH=MilitaryBot SEQ=Run        TIME=0.05 FUNCTION=PlayFootStep
#exec MESH NOTIFY MESH=MilitaryBot SEQ=Run        TIME=0.5 FUNCTION=PlayFootStep
Logged
Gildor
Administrator
Hero Member
*****
Posts: 7977



View Profile WWW
Re: Deus Ex 2000 models distorted?
« Reply #5 on: December 20, 2022, 17:34 »

Hm... I don't know then. I've re-verified code, and MeshScale is correctly used for display, and property put into the .uc file. I.e. there's no bug which for instance will put 3 identical values for XYZ while values differs.

I wrote this code a very very long time ago, and I don't remember how I tested it. I've checked the DeusExChatacters.u myself, and it has .uc embedded - and it shows the uniform scale for the mesh too. So, no idea. I'd consider this as a bug in 3d loader for Blender etc, because I didn't see any scales applied during export.
Logged
deusex
Newbie
*
Posts: 7


View Profile
Re: Deus Ex 2000 models distorted?
« Reply #6 on: December 20, 2022, 17:50 »

That's too bad to hear that there's not an obvious problem to fix. Sad Thank you for trying to help anyway so quickly!

If anybody else tried using UE Viewer to export the Deus Ex (from 2000) models before and encountered the same problem, please do let me know! And even better if they found a way to fix it of course! azn
Logged
spiritovod
Global Moderator
Hero Member
*****
Posts: 1841


View Profile
Re: Deus Ex 2000 models distorted?
« Reply #7 on: December 20, 2022, 19:31 »

I remember bumping into something familiar in Apex Legends, Days Gone and Gears 5 - basically scale is bounds dependent there (and umodel consider bounds while rendering things). I see mesh origin here with z=254, and it looks like if mesh is downscaled accordingly (for 254%/units?), it would look correct. Something like that...
« Last Edit: December 20, 2022, 19:33 by spiritovod » Logged
deusex
Newbie
*
Posts: 7


View Profile
Re: Deus Ex 2000 models distorted?
« Reply #8 on: December 21, 2022, 12:50 »

To be honest, after comparing the extracted _a.3d and _d.3d models extracted with UE Viewer with _a.3d and _d.3d models extracted using WOTgreal it is even a bit stranger:

When I import the UE Viewer .3d files in Blender and then scale the y axis vertically to compensate for the distortion, it turns out it is then still distorted a bit in the other (horizontal) direction too (x and z scale seems to be different too from each other). It's a lot less than in the vertical direction, but it makes manually scaling to fix it not really an option either unfortunately, even if I knew the exact amount of the vertical distortion. Undecided
Logged
spiritovod
Global Moderator
Hero Member
*****
Posts: 1841


View Profile
Re: Deus Ex 2000 models distorted?
« Reply #9 on: December 21, 2022, 19:55 »

After looking at general format explanation from OldUnreal wiki, it seems you just need to apply scale accordingly (and maybe adjust bounding box). Theoretically it should be just 0.5 for z, but you can also try to rescale everything and compare results - for example, if scaling factor is 0.311162, use scale x=0.311162, y=0.311162, z=0.155581 (scale factor / 2) in blender. This way mesh looks the same in blender compared to umodel preview, aside from perspective. Though considering how umodel processing Deus Ex meshes and that Skywolf's plugin was designed to handle Ion Storm format separately (while umodel is producing default UE1 format), it's not pixel perfect solution.


* Clipboard02.jpg (73.08 KB, 2000x553 - viewed 38 times.)
« Last Edit: December 21, 2022, 21:31 by spiritovod » Logged
deusex
Newbie
*
Posts: 7


View Profile
Re: Deus Ex 2000 models distorted?
« Reply #10 on: December 21, 2022, 22:38 »

I tested it a couple of times again today, and I think the claim in my previous reply must have been an error from the many times trying so many different meshes and ending up making a mistake... I have not been able to reproduce that issue again and it does seem that the distortion is ONLY in the y (vertical) axis.

So I tried finding the correct y-scale factor and ended up using a scale factor of 0.5 in the y axis.
Like you say, it is not a perfect fix, but it is quite close; the Militarybot is a TINY bit too tall it seems and the female mesh is also not perfect but it looks even closer.  Smiley

(I had hoped that the exact scale factor was mentioned somewhere in the code for the mesh (like Gildor mentioned, maybe a non-uniform scale factor) but like I said, 0.5 looks very close. I also tried with the TestBox mesh from the DeusExItems.u game package, which is a perfect cube, and for that mesh a factor of 0.5 for y does seem to be exact)


* miltarybotscaledy0,5.png (139.98 KB, 1639x886 - viewed 33 times.)

* GFMdressscaledy0,5.png (193.42 KB, 1048x889 - viewed 35 times.)
Logged
deusex
Newbie
*
Posts: 7


View Profile
Re: Deus Ex 2000 models distorted?
« Reply #11 on: March 22, 2023, 22:14 »

So the reason I wanted to extract JC Denton’s 3D model, was to use it as a starting point for making it into in a papercraft model. So I did.  Smiley
And then I did the same for the female verson from the Lay D Denton Project fan mod. Smiley

I put Both Deus Ex papercraft models on my webpage to download and enjoy (with lots more from lots of other video games mostly):
https://ninjatoes.wordpress.com/tag/3d-shooter/

Thanks for everybody’s help and I hope everbody keeps enjoying their new projects made possible with the tools created by the fan community like here!


* deusexpapercrafts.jpg (334.39 KB, 800x600 - viewed 29 times.)
Logged
Jump to:  

Powered by SMF | SMF © 2006-2009, Simple Machines LLC
Leviathan design by Bloc | XHTML | CSS