All posts related to V3
By kami
#378894
I am trying to do a timelapse sun animation with maxwell and am not able to get it fluently. I created a script which adds one minute every frame. That means I have mxs with the following time:
000 = 17:00
001 = 17:01
002 = 17:02
003 = 17:03
004 = 17:04
005 = 17:05
etc

When I render these, the frame 000 and 001 show exactly the same image, then there is a larger jump of the shadow on frame 002 and a small one on frame 003, a small one on frame 004 and again no difference between frame 004 and 005.
The result is an animation which looks pretty unbalanced and not fluent.

I've tried the same with Maxwell v2 one year ago and there I had the same problem, but back then I was not able to get the times to show the correct minute. It was like:
000 = 17:00
001 = 17:00
002 = 17:02
003 = 17:03
004 = 17:04
005 = 17:04
So now with Maxwell v3 and the correct times displaying, I hoped that problem would be fixed but it seams just to be a cosmetical change.
User avatar
By Brany
#378990
Can you post the script? At least the part where you compute the hour for the sun position.
Last edited by Brany on Tue Mar 25, 2014 11:13 am, edited 1 time in total.
By kami
#379024
Hi Brany

This is the script (it is a rhino script):
Code: Select all
Dim mw, startTime, endTime, startFrame, frameCount, startMove, finalMove, timeSpan, increment, currentTime,endFrame, currentFrame, frameDuration, cmdPrefix
Dim promptForValues, setTimelineRange, RangeCmd

Sub Maxwell_Bongo2SunStudy()

	Set mw = CreateObject("Maxwell.Script.ScriptObject")   

	' scene options
   
	mw.Environment.SunEnabled = True
	mw.Environment.EnvironmentType = "PhysicalSky"
	mw.PluginOptions.CacheMXSMeshes = True 

	' animation options
   
	startTime = 17.0  ' start 
	endTime = 19.5 ' end   
	startFrame = 0    ' start @ frame 0 for the sun-Animation
	frameCount = 150  ' 1 minute per frame
	
	startMove = 0
	finalMove = 0
  
	
	' internal variables

	timeSpan = endTime - startTime
	increment = timeSpan / frameCount
	currentTime = startTime
	endFrame = startFrame + frameCount - 1
	currentFrame = startFrame
	frameDuration = increment * 60.0
	cmdPrefix = "_ClearUndo _BongoSetCurrentTick "
   
	' abort if frame length is less than 1 minute
   
	If frameDuration < 1.0 Then
		Rhino.Print("Too many frames: minimum time per frame is 1 minute.")
		Exit Sub
	End If
   
	' optionally, ensure timeline range is sufficient
   
	setTimelineRange = False
   
	If setTimelineRange Then
   
		rangeCmd = "-_BongoSetTimelineDisplayRange"
		rangeCmd = rangeCmd & " Start=" & startFrame
		rangeCmd = rangeCmd & " Stop=" & endFrame + 1
		rangeCmd = rangeCmd & " _Enter"
		Rhino.Command rangeCmd, False
     
	End If
   
	' export the animation
   
	Rhino.Print("Maxwell_Bongo2SunStudy info:")
	Rhino.Print(" - time span:   " & startTime & "-" & endTime)
	Rhino.Print(" - frame range: " & startFrame & "-" & endFrame)
	Rhino.Print(" - frame time:  " & frameDuration & " min.")
	Rhino.Print("Exporting animation...")
   
	mw.Rendering.BeginAnimation()
   	
	
	While currentTime <= endTime
   
		Rhino.Command "_ClearUndo"
		mw.DateAndTime.TimeOfDay = currentTime
		Rhino.Print("Exporting Time:  " & currentTime)

		mw.Rendering.RenderToMxs()
		currentFrame = currentFrame + 1
		currentTime = currentTime + increment
     
	Wend
   
	
	'	mw.Rendering.EndAnimation()
   
	Rhino.Print("Animation export done.")
   
End Sub

  Call Maxwell_Bongo2SunStudy()
It might be a bit too complicated, because it is combined to work with rhino-bongo. I was also hoping to be able to have a time difference of less than one minute per frame to have a slower timelapse.

Thanks for having a look, Kami
User avatar
By Brany
#379092
The script seems right. I guess you checked out that the hours are set as you expected in the MXS. In that case it can be an internal problem.

I'm trying to reproduce your problem here. I'll let you know if I find out something
User avatar
By Brany
#379134
I made a sun animation just like you did (150 frames, from 17:00 to 19:30, 1 minute per frame), and it went fine:

Image
(frames 0-9)


Can you send me a set of MXS that reproduces the problem?
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[…]