Hello,
I´m currently trying to render a car driving down the road as a movie out of unreal.
I am having problems importing the car that was animated in 3dsmax and exported as fbx.
It is a highpoly mesh with approximately 6 mio triangles. The rig is very simple. There is one bone (dummy)
all the car body parts are parented to and one bone for the meshes of each wheel. The wheel bones are also
parented to the body/root bone.
If I import the highpoly car as a static mesh it works. It takes some time, but I get the car into unreal perfectly.
If I export my bones and animation with simple box geometry parented to my bones (one box for the body and a box for each wheel) out of 3dsmax, the
import into unreal as skeletal mesh also works perfectly. The Box-car is on the right world position and the animation plays correctly.
However the import of the rigged highpoly car with the animation fails. Or at least it seems to take forever. Nothing happend in three hours.
The import dialog just says importing fbx mesh, processing sections and stays at 100%.
Is there a triangle limit for skeletal meshes?
Any idea what might be the problem or what can be checked/unchecked in the import dialog that could solve the problem?
I also thought about using datasmith. But because I didn´t find anything in the documentation I assume I cannot import animations with datasmith, or am I wrong?
Thanks
Hello ,
It is probably of the very high polycount on a skeletal mesh…my advice will be to follow what they did for the McLaren demo, in your case it means that you have to unskin all the meshes from the skeletal hierarcy, then skin a simple plane, in order to import the entire ( animated ) skeletal hierarhcy inside UE4.
Then import the entire car as a static mesh, with hunders/thousands of parts I suppose.
What you can do is to import the entire car as a static mesh, create a BP and drop there all the static meshes as a child of the skeletal mesh you previously imported, then use/create joints sockets in order to snap into position the static meshes you need to animate, which will inherit the animation from the animated joint.
The main issue could be the pivot of each mesh, and by default UE4 assume that for each static mesh the pivot is at 0,0,0, while I suppose that in 3ds you have each pivot for each mesh to be different ( or somewhat towards the center of the mesh itself if you’re using a CAD file ), so you might want to also try Datasmith, since it keeps the pivot for each mesh ( at least for CAD files )…I’m mentioning this because the use of the socket is based on the mesh pivot origin, so if it match the same position as in 3ds you’re good, but if the pivot in UE4 are always at 0,0,0 for each mesh you need to find a solution for that…or alternatively use a scene component, get the pivot location/orientation from 3ds, copy the value onto the scene component, and make the static mesh a child of that scene component…which is a very tedious operation, but doable.
BR,
Hello ,
thanks a lot for the help. A lot of information to check out.
Yes, I was afraid the highpoly count might be the problem.
Since I already have imported my rig and animation with simple box geometry I will try the appoach with parenting
the highpoly static meshes to the simple animated mesh. Don´t know exactly how this works via a blueprint but I will find out.
Yes you are right about the pivot problem. Unreal ignores the pivot location of 3dsmax. But shouldn´t this be negligible if the meshes are then parented
to an animated bone in unreal? For example if the tire mesh does not have his pivot in the center of the mesh but instead at world 0,0,0 but is then parented
to a bone that is rotating around his own center, the rotation of the tire should look fine, or not?
At least this is the case in 3dsmax.
Datasmith import works great. And you are right, the pivot point position of 3dsmax is kept. But these objects then are “actors” and “not static mesh actors”
This is somewhat annoying, because you cannot select all of them and set them to “movable”. Instead you have to change this for each single mesh, because
you have to select it and go down one step of the hierarchy to get to the static/movable settings. Is there a solution for that?
I haven’t tested the latest Datasmith version, but as far as I remember the entire car is imported as a BP, but all the meshes are saved into a specific folder, so you might want to create a BP, put skeletal mesh there, then add the meshes that need to be animated first, attach them to the socket, then select all the other meshes and just drop them into the BP, and make everything a child of the skeletal mesh.
By doing this you first took care of the animated meshes and see if everything works accordingly, then you can add the “static” parts which are just being moved without any specific animations.
The problem with the pivots is that UE4 assume that if there is a rotation, the center of the mesh is what will be rotated, and it’s convenient for gaming, but terrible for CAD related stuff, since it mess up everything…thank god for Datasmith that solve this issue!
Regarding Datasmith importing everything as an actor, you can convert an Actor into a Static mesh using the right-click menu ( check this), not sure if it works if you try to bulk-convert them.
An alternative-hybrid solution would be, in 3ds, to remove all the non animated meshes, and keep skinned only the animated ones ( tyres? and I guess more stuff as well ), so that you will completely avoid the pivot center issue, and attach all the static meshes directly onto the root of the car.
Since I guess you already have all the car skinned, it will be a matter of removing the unwanted meshes, then export the skeletal mesh with a reasonable polycount ( even if I know that tyres are usually hyper-detailed ) and see if UE4 is able to handle this…but be aware, having a skeletal mesh with a huge number of polys is a huge issue in general, that’s why the trick of using a proxy skeletal mesh is a better solution, but you need to take care of how to handle different things, such as the nightmarish pivot issue
So I read and learned some stuff about skeletal mesh sockets Thank you for pointing me in to the right direction.
Creating sockets in the bone hierarchy of the lowpoly skeletal mesh and attaching the imported highpoly static meshes to them works perfectly!
There is not even the need for creating a blueprint. Took me just some time to figure out, that you first have to set the highpoly meshes to movable, before you can attach it to a skeletal mesh via
rightclick. Before that my skeletal mesh was just not found in the search bar.
So there is no problem with the pivots of the highpoly static meshes beeing at 0.0.0.
After import and setting the position to 0,0,0 it was in the exact same position as my animated skeletal mesh. After attaching everything the car moves perfectly as well as the wheel rotation.
Completely forgot about attaching directly onto the socket!
Glad that everything worked out
But thanks for all the other tipps especially regarding datasmith.
I´will definitely check that out and play around with that some more.
Its definitively worthed to spend some time experimenting, and for CAD files is a real time saver