Community
Maya Forum
Welcome to Autodesk’s Maya Forums. Share your knowledge, ask questions, and explore popular Maya topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

[ERROR] Importing from Unreal Engine

10 REPLIES 10
Reply
Message 1 of 11
Anonymous
3294 Views, 10 Replies

[ERROR] Importing from Unreal Engine

I'm having problems using Maya and Ue4 Together, I'm trying to take elements
from the scene I built in Ue4, use them in conjunction with Mash to create animations/mograph, and then export back to the engine

I use content from Maya all the time in the engine, however when I do, the assets were built solely in maya.

With the workflow I'm trying here, these are game assets that are placed in
my Ue4 Scenes, then imported to Maya.

The problem in this case presented here (or in all cases i'm having) is that Mash/Maya is getting stumbled on position data (or so it seems to me).

 

The idea behind this (for context) is that I do my level design in Unreal engine, great, lets say I've got a wall of rocks I want the user to be able to interact with and have some cool motion graphics things happen to the rocks, great, export rocks from Ue4 into maya and then make the animations and export back to Ue4, preserving the inital state of the objects in the level through out the pipeline, so the level design doesn't change, just the assets in the level design have optional animations (all the animations I'm creating are starting from the object(s) original static position within the unreal scene).


For this example I have a wall of rocks, I'm trying to have the rocks slowly fade off into the distance as the user approches.


First thing I try:

Export Rocks from Ue4
Import into Maya
Create Mash Network out of rocks
Add ID Node
Change distribute to Initial State (it's important to peresve the rocks original placement in the Ue4 Scene).


The problem here is that this does not replicate the inital positions of the rocks, in fact it only will show me one rock (You can confirm all my settings are correct in the attached project file).

Also I'm given this console error; Warning: file: C:/Program Files/Autodesk/Maya2018/plug-ins/MASH/scripts/isMashObject.mel line 18: Starting position (1) is invalid. It must be in the range from 1 to the length of the string. Clamping index to range. //


Okay, so lets try another method.

I'm going to take the objects and convert them from Instances to Objects using Modify > Convert > Instance to Object, then repeat the same settings for creating a mash network and distrubting.

 

Upon creating my mash network I receive this error:# Error: TypeError: file C:\Program Files\Autodesk\Maya2018\plug-ins\MASH\scripts\mash_repro_utils.py line 202: unhashable type: 'list' #

 

but its all good because the same position settings from Ue4 are translating to Maya, the distribute node is working properly!

 

So i'll create my little animation, Oh wait, the mash network is now treating the rocks collectively as one, so I can't create the style of animation I'd like to because I have no fine control over individual objects of the network. (ex: offset node will rotate all the rocks as if they share one pivot point).


Maybe If i freeze my transforms that will do it, lets give it a try.

 

Freeze transformations then rinse and repeat the steps to create the animation. Things are looking good but NOPE! Objects are now  rotating and scaling seperately as the should, but it seems the are rotating around some crazy weird pivot points (Even though when observed the pivot points are centerly placed on the individual rocks). Not giving even close to the results you'd expect. (I use mash regularly, I'm not expert but I know what things should look like to some extent.)

 

I'm out of ideas, and frankly time.


I feel like there is something very obviously wrong here, but I've been dealing with this problem for 2 weeks now (at least), and haven't been able to find a solution.

Shouldn't the workflow from Ue4 Into maya and back be smooth? What am I missing? I've tried to be as detailed as I can with this problem, really hoping to get an answer soon.

Thank you.

 

I've attach a .mb with 3 Mash Networks, and three groups of rocks, all labeled. Each group corresponds to a mash network and each mash network is an example of the methods discussed above.  Please go in and play around with any settings you'd like and observe the things I'm talking about, I really hope there is a clear solution!


PS: Yes maya is up-to-date 

 

 

 

 

 

10 REPLIES 10
Message 2 of 11
Anonymous
in reply to: Anonymous

For some reason It's not letting me attach my .mb to the forum post. Here is a google drive link https://drive.google.com/file/d/1p3rA64GK1HckxdxqN1NtPu2xFjMGfZ9c/view?usp=sharing

Message 3 of 11
laurence.cymet
in reply to: Anonymous

Hey Sahhar,

 

Thanks for bringing this up and sharing your scene data.  If it's possible to share the fbx file coming from Unreal it would help.  Just to troubleshoot: If you take the Unreal data out of the equation, eg. try your workflow with a bunch of spheres - are you getting what you expect?  If not - I suspect the fact that your Unreal data is Z-up and your Maya scene is in Y-up is causing the problem. Try switching Maya to z-up in the prefs and try again - I think this will solve many of your problems. 

 

I have to play a bit further with your scene - but if that doesn't work you can try baking the pivots of your input objects. For export to Unreal you can take your repromesh duplicate it and separate to get the resulting meshes, or try switching MASH to use the instancer instead of the repro mesh mode, and then use the bake to object MASH utility.  For me, it appeared that switching to z-up solved the problem.  

 

Message 4 of 11
Anonymous
in reply to: laurence.cymet

It's weird that my scene showed that it was using Y as the up axis for you, my default setting is Z axis up, and when I open that .mb it is set to Z axis up for me.

 

I'll try the other methods and get back to you.

 

Yes if I do a similar animation with spheres things work how they are supposed to  (or any primitive geo).

 

 

Message 5 of 11
laurence.cymet
in reply to: Anonymous

Yeah, that's my mistake as it's a system pref. Generally you should avoid freezing transform in this situation as that will definitely lead to weird transformations in Mash like with the offset node you are seeing . 

 

I can see the issue you have and reproduce it, we'll get a bug logged and see if we can find a better workaround.  In the meantime try this: Un-parent your original rocks from the group, export them as alembic (single frame), then re-import them into a clean scene and you should be good to go.  If you can send the original FBX we can see if something is going weird there.  

 

Thanks! 

 

L

Message 6 of 11
Anonymous
in reply to: laurence.cymet

Okay, thanks for your help. Here's a link to the original FBX File: https://drive.google.com/file/d/11zpsTOfQwIiK9EscAHVkpwqyIVKcZs9n/view?usp=sharing

Message 7 of 11
Anonymous
in reply to: laurence.cymet

As a side note, I see you mentioned turning my mash repro into an instancer and baking to an object. This is the workflow I use as it's the only way that I know of to go from MASH to unreal and have all my animations etc load in properly as separate files for further manipulation. Compared to a Alembic Cache will just give me one looping animation/file, which, in most cases, will not fit my needs within the engine. 

Message 8 of 11
laurence.cymet
in reply to: Anonymous

Thanks for sharing your scene data. You could also just separate your repro mesh to get individual objects and export FBX from that, but both should work fine. 

Message 9 of 11
Anonymous
in reply to: laurence.cymet

How do you separate a repromesh and get animations out of it?

Message 10 of 11
laurence.cymet
in reply to: Anonymous

In the modeling menu set, hit mesh/separate. Then you have animated individual objects you can use. The only caveat is that the objects won't have their transform animated - so you need to either keep the history or use edit/keys/bake simulation with control-points on. . Or you could export alembic too.   

 

The tricky bit is getting this animation into FBX, for this you will likely be better off working with instances.  I will look into this deeper and let you know if there's a better solution.  

Message 11 of 11
Anonymous
in reply to: Anonymous

dude, there's nothing inside UnrealToMayaProblem.mb


@Anonymous wrote:

For some reason It's not letting me attach my .mb to the forum post. Here is a google drive link https://drive.google.com/file/d/1p3rA64GK1HckxdxqN1NtPu2xFjMGfZ9c/view?usp=sharing


 

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report