More likely that the obj was already Z_UP. I guess i still have to try Y_UP export.so it had less to do with the z_isup in the exported file and more to do with the exporter? Wierd shit.
Blender animation export has been deployed!
Moderators: MR.D, Moderators
Re: Blender animation export has been deployed!
Re: Blender animation export has been deployed!
Never shared how i prep these exported script for journeywar s3o use:
Tutorial on using Anarchids
exchanged z - y axis
inverted rotations for y_axis
undo axischange for movement
Regexes to find those:
Tutorial on using Anarchids
exchanged z - y axis
inverted rotations for y_axis
undo axischange for movement
Regexes to find those:
Code: Select all
{\['c']='turn',\['p']=([^\s]+), \['a']=y_axis, \['t']=-1\*
{\['c']='move',\['p']=([^\s]+), \['a']=y_axis, \['t']=-1\*
{\['c']='move',\['p']=\1, \['a']=y_axis, \['t']=\*
{\['c']='move',\['p']=([^\s]+), \['a']=([^\s]+), \['t']=([^\n]+), \['s']=([^\n]+)\}\,
Re: Blender animation export has been deployed!
Update: I got this working in blender 2.8.
I modified the setup animation function, to allow for a easier axis switch. z_axis -> y_axis and y_axis -> z_axis. The spring way.
After that i ran into the problem, that the move commands had the erronous offsets. In my case i removed them..
I also run into the problem, that any exported piece needed not only to be properly linked, but the also the rotation and scaling applied, otherwise the animation would be off.
This was for the original 3d editor to export this and for blender.
Hey, i finally got a animation pipeline.. the world is mine.
I modified the setup animation function, to allow for a easier axis switch. z_axis -> y_axis and y_axis -> z_axis. The spring way.
Code: Select all
function setupAnimation()
local map = Spring.GetUnitPieceMap(unitID);
local switchAxis = function(axis)
if axis == z_axis then return y_axis end
if axis == y_axis then return z_axis end
return axis
end
local offsets = constructSkeleton(unitID, map.root, {0,0,0});
for a,anim in pairs(Animations) do
for i,keyframe in pairs(anim) do
local commands = keyframe.commands;
for k,command in pairs(commands) do
-- commands are described in (c)ommand,(p)iece,(a)xis,(t)arget,(s)peed format
-- the t attribute needs to be adjusted for move commands from blender's absolute values
if (command.c == "move") then
local adjusted = command.t - (offsets[command.p][command.a]);
Animations[a][i]['commands'][k].t = command.t - (offsets[command.p][command.a]);
end
Animations[a][i]['commands'][k].a = switchAxis(command.a)
end
end
end
end
I also run into the problem, that any exported piece needed not only to be properly linked, but the also the rotation and scaling applied, otherwise the animation would be off.
This was for the original 3d editor to export this and for blender.
Hey, i finally got a animation pipeline.. the world is mine.