U3D: Blender&etc .obj Animation Importer

External tools, software and sites for creating or editing UT99 resources.
Post Reply
User avatar
Gustavo6046
Godlike
Posts: 1462
Joined: Mon Jun 01, 2015 7:08 pm
Personal rank: Resident Wallaby
Location: Porto Alegre, Brazil
Contact:

U3D: Blender&etc .obj Animation Importer

Post by Gustavo6046 »

I have recently found out of a tool that I was looking for for very long: U3D (which I really hope I can distribute here, since I don't want to do anything other than good). I'm sure many of you were also looking for a way to convert .obj animations exported from Blender into .3d files for Unreal! So, why not rejoice? :)

I only want to help, so please don't think I'm posting this for some bad reason. If you already know about the tool, or if I misunderstood something, please let me know.

(crosspost from OldUnreal)
"Everyone is an idea man. Everybody thinks they have a revolutionary new game concept that no one else has ever thought of. Having cool ideas will rarely get you anywhere in the games industry. You have to be able to implement your ideas or provide some useful skill. Never join a project whose idea man or leader has no obvious development skills. Never join a project that only has a web designer. You have your own ideas. Focus on them carefully and in small chunks and you will be able to develop cool projects."

Weapon of Destruction
nogardilaref
Masterful
Posts: 577
Joined: Tue Jun 20, 2017 1:00 pm
Personal rank: ⚋⚊⚌☰⚞⌖⚟☰⚌⚊⚋

Re: U3D: Blender&etc .obj Animation Importer

Post by nogardilaref »

I didn't really try it yet, but if it really works, that would be awesome.

However, the cherry on top of the cake would be something which could be used to either turn those into .psk/.psa files (skeletal meshes), or a plugin for Blender itself.
I tried one a few years ago as an experiment (which claimed to export to .psk/.psa) and it simply didn't work, at least with the latest version from back then (I am not sure if it got fixed in the meanwhile, probably not, but I didn't check either).

Skeletal meshes are theoretically much better than normal meshes, not only for animation, but even as a normal mesh (although it requires at least 1 single bone for all vertices) since they do not suffer from the same annoying rounding problems as .3d files, as they use different structures to be represented internally, namely using floats instead of integers for example from what I checked years ago.

I never tried them myself, but theoretically this would mean that you can build any mesh of any size in any editor, and import into UT with all coordinates, including the UV mapping, without any distortions or offsets, unlike .3d files.
User avatar
Barbie
Godlike
Posts: 2792
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

Re: U3D: Blender&etc .obj Animation Importer

Post by Barbie »

For reader's convenience the README contained in that download:
readme.txt
Unreal .3d model viewer/converter
Version 3
Created by Yrex in 2015.

Things which you should remember while using this software:
- This program uses standard 3D coordinates, where Y axis is vertical. UV values start from left bottom corner and increase up right. When reading .3d files, vertex order is inverted. This way it works well in OpenGL and 3D software (OBJ files).
- In Poly Edit window, changes are not applied instantly, instead you must press Apply button.
- I don't know what is the standard way to store texture numbers and polygon effects in OBJ files. This program will store them in polygon group names in such way:
Group name starts with: G_
Then combination of these elements separated with "_" is used:

Tex# - specifies texture slot number (0-255)
Color# - specifies PolyColor (whatever this means) (0-255)

Only one of these can be used:
TwoSided
Translucent
Masked
Modulated

These can be used simultanously:
Weapon
FullBright
NoCurvy
Enviro
NoSmooth

Known bugs:
- Sometimes when moving camera mouse does not wrap around.
- When "Smooth animation" is on, first and last frame are not displayed properly.
- When "Select polys by clicking" is on, and you click just to move camera, the poly will be selected anyway.
- EnviroMap/Masked/NoCurvy effects are not displayed.

Limitations of .3d files:
- All vertices must be in range -128..+128 (I recommend leaving some margin)
- The horizontal axes will be rounded to 0.125 (256/2048)
- The vertical axis will be rounded to 0.25 (256/1024)
- UV coords are stored as bytes, so they must be in range 0..1 and will be rounded to 1/255
- Max polygon count is 65536
- Max vertex count is 16384
- Max frame count is 65536
- Max texture count is 256
What virustotal thinks of the contained executable. (I didn't check the 4 contained DLL files.)
"Multiple exclamation marks," he went on, shaking his head, "are a sure sign of a diseased mind." --Terry Pratchett
User avatar
Gustavo6046
Godlike
Posts: 1462
Joined: Mon Jun 01, 2015 7:08 pm
Personal rank: Resident Wallaby
Location: Porto Alegre, Brazil
Contact:

Re: U3D: Blender&etc .obj Animation Importer

Post by Gustavo6046 »

Thank you, Barbie. Should I append that to the first post?
"Everyone is an idea man. Everybody thinks they have a revolutionary new game concept that no one else has ever thought of. Having cool ideas will rarely get you anywhere in the games industry. You have to be able to implement your ideas or provide some useful skill. Never join a project whose idea man or leader has no obvious development skills. Never join a project that only has a web designer. You have your own ideas. Focus on them carefully and in small chunks and you will be able to develop cool projects."

Weapon of Destruction
JackGriffin
Godlike
Posts: 3774
Joined: Fri Jan 14, 2011 1:53 pm
Personal rank: -Retired-

Re: U3D: Blender&etc .obj Animation Importer

Post by JackGriffin »

You can do this from within the editor using Unreal and Smirf's update. Grab it from Old Unreal. There's no need to use external programs for almost all of the conversions from obj.
So long, and thanks for all the fish
nogardilaref
Masterful
Posts: 577
Joined: Tue Jun 20, 2017 1:00 pm
Personal rank: ⚋⚊⚌☰⚞⌖⚟☰⚌⚊⚋

Re: U3D: Blender&etc .obj Animation Importer

Post by nogardilaref »

JackGriffin wrote:You can do this from within the editor using Unreal and Smirf's update. Grab it from Old Unreal. There's no need to use external programs for almost all of the conversions from obj.
Just tried, and it really works, thanks. :D

Apparently that editor does a lot of nice things, although skeletal meshes import/export doesn't seem to be one of them... I didn't have any package with skeletals for Unreal at hand when I tested it, but since it only imports and exports to obj (which doesn't support animation, skeletal at least)...

Does anyone have a .psk/.psa model at hand so I can check it out?
Even if it doesn't export, it probably is able to import at least, and I would like to see how they're visualized in the new editor.

In the meanwhile I found out however that there's at least an updated plugin for Blender which is able to export to a format which can be read by Milkshape, which in turn is able to export to .psk/.psa. Didn't try it yet though.
User avatar
Gustavo6046
Godlike
Posts: 1462
Joined: Mon Jun 01, 2015 7:08 pm
Personal rank: Resident Wallaby
Location: Porto Alegre, Brazil
Contact:

Re: U3D: Blender&etc .obj Animation Importer

Post by Gustavo6046 »

Sorry for the bump.
JackGriffin wrote:You can do this from within the editor using Unreal and Smirf's update. Grab it from Old Unreal. There's no need to use external programs for almost all of the conversions from obj.
I mean with vertex animations. I didn't find UnrealEd 2.1 (227i)'s option - only for boring static meshes...
"Everyone is an idea man. Everybody thinks they have a revolutionary new game concept that no one else has ever thought of. Having cool ideas will rarely get you anywhere in the games industry. You have to be able to implement your ideas or provide some useful skill. Never join a project whose idea man or leader has no obvious development skills. Never join a project that only has a web designer. You have your own ideas. Focus on them carefully and in small chunks and you will be able to develop cool projects."

Weapon of Destruction
User avatar
PrinceOfFunky
Godlike
Posts: 1200
Joined: Mon Aug 31, 2015 10:31 pm

Re: U3D: Blender&etc .obj Animation Importer

Post by PrinceOfFunky »

nogardilaref wrote:However, the cherry on top of the cake would be something which could be used to either turn those into .psk/.psa files (skeletal meshes), or a plugin for Blender itself.
You mean something like this?
"Your stuff is known to be buggy and unfinished/not properly tested"
JackGriffin
Godlike
Posts: 3774
Joined: Fri Jan 14, 2011 1:53 pm
Personal rank: -Retired-

Re: U3D: Blender&etc .obj Animation Importer

Post by JackGriffin »

If you start working in psk/psa you'll for sure need the DN UnPSA Toolkit: http://www.gildor.org/smf/index.php?topic=89.0

I'll attach the exe file in case anyone needs it
DN UnPSA Toolkit.zip
(21.38 KiB) Downloaded 149 times
Unzip to desktop, no install needed. Bob made a demo use vid that walks you through
0xS5E9Ojhjs

Between this tool and UModel (with a dash of milkshape) it's not hard to import assets from a hugely wide array of engines and games. Polygons are polygons, so as long as the models are not too high poly there's a good possibility they can squeeze into an Unreal level. Bob and I have playtested imports from all kinds of places. In fact it became a bit of a challenge to find something we couldn't import.
So long, and thanks for all the fish
nogardilaref
Masterful
Posts: 577
Joined: Tue Jun 20, 2017 1:00 pm
Personal rank: ⚋⚊⚌☰⚞⌖⚟☰⚌⚊⚋

Re: U3D: Blender&etc .obj Animation Importer

Post by nogardilaref »

PrinceOfFunky wrote:
nogardilaref wrote:However, the cherry on top of the cake would be something which could be used to either turn those into .psk/.psa files (skeletal meshes), or a plugin for Blender itself.
You mean something like this?
Already tried it in the past, but it was in Blender 2.7.x and it was broken at least in that version. I am not sure now since it has been a long while, but plugins like that tend to break in new major versions of Blender, even because they generally also use newer versions of Python, which are exemplar in breaking things up from version to version.
Post Reply