#339516
Is this possible? With SU Animate i can create lets say 800 scences in sketchup for an animation, each scene represents a frame in the animation. Is there a way to export all of these scenes to mxs or once in studio export out all 800 cameras to mxs so i can batch render an animation? Seems pretty simple to me but can find out how to do it.

Thanks.
#339519
In the exported MXS, you should find one camera for each Scene in the SKP. I assume that there is some method to their names, as created by your plugin, such that you could script Maxwell Render to render each camera using its setActiveCamera(name) function. I quickly threw such a script together; it assumes SketchUp's own default Scene-naming convention:
Code: Select all
// This script loops through a set of cameras, specified by name and
// index. It must be customized to fit the characteristics of the given
// MXS file. As set up, it expects to find the MXS filled with cameras
// whose names begin with 'Scene '. This base name is stored below
// in the 'baseName' variable. It expects the scene numbers to begin
// at 1 and to end at 3, with these limits being stored below in the
// 'firstFrame' and 'lastFrame' variables. It will loop through the frame
// range looking for cameras which fit the pattern 'Scene 1', rendering
// each one as it is found.

var firstFrame = 1;
var lastFrame = 3;
var baseName = "Scene ";

// internal vars & events

var isRendering = 0;
var currentFrame = firstFrame;
var outputFolder = FileManager.getFileFolder(Scene.mxsPath);
RenderEvents["renderFinished()"].connect(renderHasFinished);

// render loop

while (currentFrame <= lastFrame)
{
  renderCamera(currentFrame);
  while(1)
  {
    if(isRendering == 0)
    {
        break;
    }
  }
  currentFrame++;
}

// functions

function renderCamera(frameNumber)
{
  var sceneName = baseName + frameNumber;
  Scene.setActiveCamera(sceneName);

  if (Scene.activeCameraName != sceneName)
  {
    Maxwell.print("The MXS contains no camera named '" + sceneName + "'!");
  }
  else
  {
    Maxwell.print("rendering Scene: " + sceneName);
    Scene.setMxiPath(outputFolder +  "\" + sceneName + ".mxi");
    Scene.setImagePath(outputFolder + "\" + sceneName + ".png");    
    isRendering = 1;
    Maxwell.startRender();
  }
}

function renderHasFinished()
{
  isRendering = 0;
  Maxwell.print("Render finished!!");
}
#339661
I'm not sure what you mean by that; camera motion blur is property of the camera -- each camera. If each of his 800 cameras was written with two positions, then all 800 would render with motion blur, and still using just the one MXS. How the plugin would know what those two positions are supposed to be is another question; that is something which can be inferred frame-to-frame when using SketchUp to transition between one Scene and the next, but in this case, the only ways of tying one scene to the next conceptually are (a) start at the left and move to the right, or (b) analyze the Scene names and try to infer a sequence.
#339668
Exactly -- and this is precisely how the Sketchup native animation accomplishes it's task... I'm not saying it is (or should be) a one-to-one conversion between Sketchup "animation" and Maxwell animation, I'm just pointing out that while we can render "animations" from Sketchup to Maxwell we do not have access to motion blur because each camera is exported as a "still" camera via the plugin, regardless of the positional changes of the cameras on either side of it.

This is easily corrected in post production using things like AfterEffects motion blur settings... but an animation from Sketchup to Maxwell is not equal to an animation from other (more animation-centric) programs to Maxwell.

I have pointed out in the past that these types of plugins do create the cameras so that they represent a single frame (at whatever frames per second) in a very structured way, so conceptually it would be possible to properly infer what positional information is needed... but in all reality it seems likely that the Sketchup Dev team is going to include improved animation features in the next major release and so I would not bother trying to work in motion blur as it stands now because it will likely change soon (unless you consider it as a favor to legacy Sketchup version users).

Best,
Jason.
Sketchup 2025 Released

Thank you Fernando!!!!!!!!!!!!!!!!!!!!!!!!!!! hwol[…]

I've noticed that "export all" creates l[…]

hmmm can you elaborate a bit about the the use of […]

render engines and Maxwell

Funny, I think, that when I check CG sites they ar[…]