Maxwell Render

Maxwell Render Information Repository
It is currently Sun May 26, 2013 2:43 am

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 11 posts ] 
Author Message
PostPosted: Sat Mar 12, 2011 12:43 am 

Joined: Mon May 17, 2010 11:33 pm
Posts: 8
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.


Top
 Profile  
 
PostPosted: Sat Mar 12, 2011 12:49 am 
User avatar

Joined: Tue Apr 07, 2009 5:28 pm
Posts: 1888
Location: Tampa FL, USA
I've asked about this in the past -- I think it can't be done (unless there is some hidden code) right now, but certainly should be something for the plugin wishlist.

Best,
Jason.

_________________
My Tutorial Video Series: Maxwell Render 2 - SketchUp to Maxwell Workflow - ZBrush 4 - Corel Painter 12 Advanced - Substance Designer 2.1


Top
 Profile  
 
PostPosted: Sat Mar 12, 2011 1:46 am 
User avatar

Joined: Wed Nov 16, 2005 3:02 am
Posts: 7586
Location: desk #861
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:
// 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!!");
}

_________________
Next Limit Team


Top
 Profile  
 
PostPosted: Mon Mar 14, 2011 8:14 pm 

Joined: Mon May 17, 2010 11:33 pm
Posts: 8
Thanks, I will see if we can get this to work.


Top
 Profile  
 
PostPosted: Mon Mar 14, 2011 8:36 pm 
User avatar

Joined: Wed Nov 16, 2005 3:02 am
Posts: 7586
Location: desk #861
Just give it a try and let me know if you run into any problems. imho, this is really the best way of doing such camera-based animations, since it requires only one MXS file.

_________________
Next Limit Team


Top
 Profile  
 
PostPosted: Mon Mar 14, 2011 8:53 pm 
User avatar

Joined: Tue Apr 07, 2009 5:28 pm
Posts: 1888
Location: Tampa FL, USA
With the small exception of no motion blur in the animation...

Best,
Jason.

_________________
My Tutorial Video Series: Maxwell Render 2 - SketchUp to Maxwell Workflow - ZBrush 4 - Corel Painter 12 Advanced - Substance Designer 2.1


Top
 Profile  
 
PostPosted: Mon Mar 14, 2011 10:01 pm 
User avatar

Joined: Wed Nov 16, 2005 3:02 am
Posts: 7586
Location: desk #861
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.

_________________
Next Limit Team


Top
 Profile  
 
PostPosted: Mon Mar 14, 2011 11:45 pm 
User avatar

Joined: Tue Apr 07, 2009 5:28 pm
Posts: 1888
Location: Tampa FL, USA
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.

_________________
My Tutorial Video Series: Maxwell Render 2 - SketchUp to Maxwell Workflow - ZBrush 4 - Corel Painter 12 Advanced - Substance Designer 2.1


Top
 Profile  
 
PostPosted: Mon May 09, 2011 8:02 pm 
User avatar

Joined: Mon May 15, 2006 9:40 am
Posts: 860
Location: Marseille - France
hello,
can you explain me how to export XXX frames from a SU animation ?

Thank you.

Roch


Top
 Profile  
 
PostPosted: Mon May 09, 2011 8:22 pm 
User avatar

Joined: Wed Nov 16, 2005 3:02 am
Posts: 7586
Location: desk #861
Are you also using the SU Animate plugin, like the original poster in this thread?

_________________
Next Limit Team


Top
 Profile  
 
PostPosted: Mon May 09, 2011 9:42 pm 
User avatar

Joined: Mon May 15, 2006 9:40 am
Posts: 860
Location: Marseille - France
No, it is a recurrent request on the french forum so I've got an interest.

I will have a look to animate plugin.

Thank you,

Roch


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 11 posts ] 

All times are UTC + 1 hour [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group