Page 2 of 3

Re: t3d to obj

Posted: Mon Jan 27, 2020 7:22 pm
by kmar
___ wrote: Mon Jan 27, 2020 6:20 pm I managed to export all the textures with UModel, but noticed that subdirectories in t3d_tex aren't searched during the conversion. So basically it seems to assume a flat hierarchy of files, but this is a bit of a problem since package X and package Y can both have a texture with the same name which causes a conflict. The .t3d file actually doesn't seem to specify the texture package either so maybe this is a limitation of the format?
Yes, unfortunately I can't do much about that, t3d for old Unreal/UT99 doesn't export package.group.name but only name; the only workaround is to export what the map actually needs, but this would require extra effort.
Right now you have to merge-copy all subfolders into one to make it work as you probably figured out yourself.
I should probably scan the texture folder for all the textures recursively, but I'm afraid that it would slow down the importer (imagine thousands of files in various subfolders)

I've noticed, however, that UT2004 exports t3d textures as package.group.name; but the problem is that most of the detail world geometry is composed of static meshes, which are not saved in t3d
I think UT2004 can export to obj directly, but the UVs are messed up as far as I can remember and it exports geometry for all items as well, so you get a huge mess with a ton of triangles.

UModel doesn't export animated textures (this is why you get purple water) and exporting animated textures in UnrealEd crashes the editor.
However, it's possible to look up the base texture and simply copy that as the animated one.

As for UVs: if you provide the importer with textures, then I'll parse image headers to determine texture dims, this is why it's not messed up.
Other tools typically require to either transform permanently (this already messes up the UVs) or make a huge brush and intersect with the whole map,
but this creates lots of holes and breaks CSG in my experience, probably due to semisolids. Turning semisolids into solids may help, but I remember
having CSG robustness issues in this case as well (plus you get way more polygons).

So thanks again for the feedback, I'm happy to see that it works for you.

Re: t3d to obj

Posted: Mon Jan 27, 2020 8:59 pm
by ___
kmar wrote: Mon Jan 27, 2020 7:22 pm
___ wrote: Mon Jan 27, 2020 6:20 pm I managed to export all the textures with UModel, but noticed that subdirectories in t3d_tex aren't searched during the conversion. So basically it seems to assume a flat hierarchy of files, but this is a bit of a problem since package X and package Y can both have a texture with the same name which causes a conflict. The .t3d file actually doesn't seem to specify the texture package either so maybe this is a limitation of the format?
I've noticed, however, that UT2004 exports t3d textures as package.group.name; but the problem is that most of the detail world geometry is composed of static meshes, which are not saved in t3d
I think UT2004 can export to obj directly, but the UVs are messed up as far as I can remember and it exports geometry for all items as well, so you get a huge mess with a ton of triangles.
You can easily remove all the extra items and stuff in the editor with the following commands. Each command will select the actors specified and then you just have to press delete.

ACTOR SELECT OFSUBCLASS CLASS=PickUp
ACTOR SELECT OFSUBCLASS CLASS=xPickUpBase


UT2004 obj export preserves UVs for BSP geometry and most static meshes. Terrain seems to be limited to a single texture layer.

For whatever reason, certain meshes come out wrong though. Here's an example: the right side wall is ok, but for some reason the left side is broken and the support structures on both sides also have broken UVs. The pink parts again are complex materials that have to be fixed manually. This is doable but time consuming since you have to open the materials in the editor to see how they're set up.
gael.JPG

Re: t3d to obj

Posted: Mon Jan 27, 2020 9:41 pm
by Feralidragon
kmar wrote: Mon Jan 27, 2020 7:22 pm Yes, unfortunately I can't do much about that, t3d for old Unreal/UT99 doesn't export package.group.name but only name; the only workaround is to export what the map actually needs, but this would require extra effort.
Right now you have to merge-copy all subfolders into one to make it work as you probably figured out yourself.
I should probably scan the texture folder for all the textures recursively, but I'm afraid that it would slow down the importer (imagine thousands of files in various subfolders)
This is something that maybe @anth can address in the new v469 patch.
Not sure why Epic made the exporter to only contain the name of the asset, it's pretty useless that way.

Re: t3d to obj

Posted: Mon Jan 27, 2020 10:10 pm
by kmar
Feralidragon wrote: Mon Jan 27, 2020 9:41 pm
kmar wrote: Mon Jan 27, 2020 7:22 pm Yes, unfortunately I can't do much about that, t3d for old Unreal/UT99 doesn't export package.group.name but only name; the only workaround is to export what the map actually needs, but this would require extra effort.
Right now you have to merge-copy all subfolders into one to make it work as you probably figured out yourself.
I should probably scan the texture folder for all the textures recursively, but I'm afraid that it would slow down the importer (imagine thousands of files in various subfolders)
This is something that maybe @anth can address in the new v469 patch.
Not sure why Epic made the exporter to only contain the name of the asset, it's pretty useless that way.
That would be pretty cool actually, assuming that . is not a valid part of a name in Unreal. I could then parse the name and change it so that it conforms to UModel export structure
(no group folders but Texture subfolder for each exported package), eliminating name clashes.

Not sure how groups work exactly, whether they're just informative or whether they actually play
a role when resolving full names, but this could be easily tested (is it possible to have two objects of same name in the same package but under different groups?)

I didn't know UnrealEd was open source, unless the patch is at binary level, but I can't imagine how that would work.

Re: t3d to obj

Posted: Wed Jan 29, 2020 1:14 am
by Feralidragon
kmar wrote: Mon Jan 27, 2020 10:10 pm Not sure how groups work exactly, whether they're just informative or whether they actually play
a role when resolving full names, but this could be easily tested (is it possible to have two objects of same name in the same package but under different groups?)
Yes, they do.
A simple experiment can be made by simply creating 2 textures with the same name, but residing in 2 different groups in the same package.
Also, I believe you can have multiple group levels, and not just one, although UEd only provides the interface to define 1 (but I am not 100% sure on this anymore, and is unlikely you will ever see anything deeper around).
kmar wrote: Mon Jan 27, 2020 10:10 pm I didn't know UnrealEd was open source, unless the patch is at binary level, but I can't imagine how that would work.
It's not.
It's just that Epic has granted a specific group of people access to the source code a little while ago, and as such a new patch is being worked on by that group.
You can see all about it here: viewtopic.php?f=12&t=13572

Re: t3d to obj

Posted: Fri Feb 14, 2020 10:09 pm
by kmar
Just wanted to let you know that I've uploaded a new version (0.6) that (hopefully) fixes last issues with sheerRate snapping (fixes CTF-Terra).
(link still the same as in my first post)

Re: t3d to obj

Posted: Wed Apr 15, 2020 4:03 pm
by weke88
Hey, first thanks for the guide and the tool. Im a complete beginner to this and I tinkered around with this for an hour or two and get absolutly nothing done. Can you explain step by step (for beginners) how to make the .unr to .obj?

I used the UnrealED to export the .unr to .t3d - but im not even sure thats right. Then I used your tool, but it doesnt finde the textures. If I open the .obj it shows something like this: Image

I would be really grateful if someone could just make Deck16 and Faces into .obj for me too! :)

Re: t3d to obj

Posted: Sat Apr 18, 2020 6:42 pm
by kmar
There should be no extra steps involed, just open in UnrealEd and export as .t3d. I tried DM-Deck16 and CTF-Face and both export just fine.
I've no idea what happened, are you sure the program you use to open obj files displays everything it should? I tried to open the exported files Blender and saw no problems at all.
What map have you tried to export so that I can investigate and rule out a possible CSG bug?

Even with missing textures, the geometry should export just fine (except that uvs will be off).
Here's the zip with the obj files for Deck16 and Face:
deck_face.zip
(124.28 KiB) Downloaded 56 times
I've uploaded a new version (0.7) that can triangulate the polygons before exporting, just specify -t at command line to see if it helps with your problem (by default, polygons are not triangulated)

Re: t3d to obj

Posted: Tue Apr 21, 2020 9:03 pm
by weke88
Hey thanks for all the work! It probably is the problem with the program becasue Im getting the same results with your files... I'm using Tinkercad because it has a function to transform .obj into minecraft schematics (want to make a UT map in minecraft) - I tried to convert Deck16 and faces ... here is the deck16.obj i used ... i will try some different files with Tinkercad and report if there is any solution.

Ty for the work!

Re: t3d to obj

Posted: Wed Apr 22, 2020 7:10 pm
by kmar
I don't know about Tinkercad so I'm afraid I cannot help you. Your obj file however loads fine in Blender and the geometry is indeed the familiar Deck16.

Re: t3d to obj

Posted: Sat Jan 30, 2021 12:01 am
by o2344nktr3owfe
kmar wrote: Sat Jan 25, 2020 3:19 pm You don't have to be, but I understand. 1st post and already posting a link to a zip file (not to an executable though).
The zip file and the executable have been checked with virustotal.com, none of the 71 AV engines found anything malicious
(you can see for yourself as downloading the zip file doesn't run anything)

I think there are better ways to bait people to download malware rather than to use a functional t3d to obj converter for old Unreal.
But I can't force anyone to download my converter. If you're really afraid, it may be possible to run in a virtual machine.

To prove that the program actually works, if you could provide me with a link to a t3d file then I can upload the converted obj and mtl files if you wish.

=MERGED=

Here's an example exported map (Liberty island from DeusEx) in Blender:
Image

(I forgot to write that the exported units are metres, not Unreal units)
(Here's a necro-post..)

I AM actually trying to convert that Liberty Island map but whenever I launch the EXE, it just instantly closes, no popup, no dialog, nothing. Is there a way to make it work on Windows 10? Or am I doing something wrong launching it directly? Even placed the exe in same directory as exported t3d data, but nothing happens.

Re: t3d to obj

Posted: Wed Feb 03, 2021 6:46 pm
by kmar
well it's a command-line tool. hit win+R, type cmd, then cd to the directory with the tool and run the tool with arguments (file.t3d)

Re: t3d to obj

Posted: Fri Feb 05, 2021 1:47 am
by o2344nktr3owfe
kmar wrote: Wed Feb 03, 2021 6:46 pm well it's a command-line tool. hit win+R, type cmd, then cd to the directory with the tool and run the tool with arguments (file.t3d)
Nice, I was able to export and import the model into Max using this, thanks. :D

Though still confused about the process of exporting textures. Will have to try all commands then.


EDIT: Ah figured it out. Had to extract textures with other tool to make it work.

Re: t3d to obj

Posted: Mon Sep 20, 2021 4:01 am
by MikMogus
Hi, I made my account just to post this, apologies for the necro. Wanted to say thanks for making this converter, been having a blast with it.

Here are some renders of Deus Ex levels I've created using it. I imported them to Blender and rendered them in Cycles.




Re: t3d to obj

Posted: Mon Sep 20, 2021 5:24 am
by o2344nktr3owfe
Nice.

Working on something similar myself.