Page 1 of 1

U3D: Blender&etc .obj Animation Importer

Posted: Sun Jul 02, 2017 5:01 pm
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)

Re: U3D: Blender&etc .obj Animation Importer

Posted: Sun Jul 02, 2017 8:00 pm
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.

Re: U3D: Blender&etc .obj Animation Importer

Posted: Sun Jul 02, 2017 9:54 pm
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.)

Re: U3D: Blender&etc .obj Animation Importer

Posted: Sun Jul 02, 2017 10:32 pm
by Gustavo6046
Thank you, Barbie. Should I append that to the first post?

Re: U3D: Blender&etc .obj Animation Importer

Posted: Mon Jul 03, 2017 2:27 pm
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.

Re: U3D: Blender&etc .obj Animation Importer

Posted: Tue Jul 04, 2017 2:16 pm
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.

Re: U3D: Blender&etc .obj Animation Importer

Posted: Thu Sep 28, 2017 12:16 am
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...

Re: U3D: Blender&etc .obj Animation Importer

Posted: Thu Sep 28, 2017 3:23 am
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?

Re: U3D: Blender&etc .obj Animation Importer

Posted: Thu Sep 28, 2017 3:40 am
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 150 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.

Re: U3D: Blender&etc .obj Animation Importer

Posted: Thu Sep 28, 2017 1:38 pm
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.