t3d to obj

External tools, software and sites for creating or editing UT99 resources.
kmar
Novice
Posts: 11
Joined: Sat Jan 25, 2020 12:18 pm
Location: Czech Republic

Re: t3d to obj

Post by kmar » 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?
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.

___
Novice
Posts: 4
Joined: Sun Jan 26, 2020 2:48 pm

Re: t3d to obj

Post by ___ » Mon Jan 27, 2020 8:59 pm

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

User avatar
Feralidragon
Godlike
Posts: 5214
Joined: Wed Feb 27, 2008 6:24 pm
Personal rank: Work In Progress
Location: Liandri

Re: t3d to obj

Post by Feralidragon » 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.

kmar
Novice
Posts: 11
Joined: Sat Jan 25, 2020 12:18 pm
Location: Czech Republic

Re: t3d to obj

Post by kmar » Mon Jan 27, 2020 10:10 pm

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.

User avatar
Feralidragon
Godlike
Posts: 5214
Joined: Wed Feb 27, 2008 6:24 pm
Personal rank: Work In Progress
Location: Liandri

Re: t3d to obj

Post by Feralidragon » Wed Jan 29, 2020 1:14 am

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

kmar
Novice
Posts: 11
Joined: Sat Jan 25, 2020 12:18 pm
Location: Czech Republic

Re: t3d to obj

Post by kmar » Fri Feb 14, 2020 10:09 pm

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)

weke88
Posts: 2
Joined: Wed Apr 15, 2020 3:57 pm

Re: t3d to obj

Post by weke88 » Wed Apr 15, 2020 4:03 pm

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! :)

kmar
Novice
Posts: 11
Joined: Sat Jan 25, 2020 12:18 pm
Location: Czech Republic

Re: t3d to obj

Post by kmar » Sat Apr 18, 2020 6:42 pm

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 13 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)

weke88
Posts: 2
Joined: Wed Apr 15, 2020 3:57 pm

Re: t3d to obj

Post by weke88 » Tue Apr 21, 2020 9:03 pm

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!
Attachments
deck16.rar
(40.74 KiB) Downloaded 12 times

kmar
Novice
Posts: 11
Joined: Sat Jan 25, 2020 12:18 pm
Location: Czech Republic

Re: t3d to obj

Post by kmar » Wed Apr 22, 2020 7:10 pm

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.

Post Reply