Using .csv data to generate objects in level

I’m also very interested in this workflow. I came across RAMA’s blueprint plugin library recently and there’s a node in there called load string array from file. This lets you read in any txt file and seperate each line into an index to form an array. I tried using this to bring in transforms from Maya. It works for the most part, but I’m having an issue getting the rotations to match from Maya to UE4…

For anyone that’s willing to help out, here’s my mel script to save out transform data from Maya as a txt file

//STEP 1: // Define Your File Path
// folder must exist for it to save the file.

string $filePath = “C:/mel/ue4CSV_test001.txt”;

//STEP 2: // select all the objects you want to send then run this:

$fileId = fopen $filePath "w";
string $sel[] = ls -sl;
int $count = size $sel;
for ($i=0; $i<$count; $i++)
{
select $sel[$i];
string $transform;
vector $p = xform -q -ws -t;
vector $r = xform -q -ws -ro;
vector $s = xform -q -ws -s;
$transform = ($p.x + “,” + $p.y + “,” + $p.z + “,” + $r.x + “,” + $r.y + “,” + $r.z + “,” + $s.x + “,” + $s.y + “,” + $s.z);

fprint $fileId ($transform + "\n");

}
fclose $fileId;

You can find Rama’s plugin here:

Here’s my simple blueprint for getting the values from the txt file

This is what the layout looks like in Maya:

notice how the shapes follow the pattern and don’t intersect with one another

Here’s my result in UE4:

you can see that they follow for the most part, but some of them are rotated incorrectly and intersect with one another. This is a simple example, but it looks even worse trying to populate a scene as most of the objects are rotated incorectly.

I know Maya is Y up and UE4 is Z up, so thats why I have swapped the Y and Z inputs in the blueprint. I also found that inverting the yaw gave better results in some orientations, but broke in others…

I know this must be possible as things like mtu exist…

If anyone could help out with a solution to this I would be very grateful! :smiley:

thanks,
Richard