By kami
#364114
Hi everyone

I've seen some threads concerning rhino+bongo+maxwell, but didn't find mich information about how its working and how good. So I wanted to give it a go and try some things myself. I will report my findings in this thread.
(If I've missed anything crucial, so that my thread would become irrelevant, please let me know!)

First steps:
Rhino5+Maxwell installed
Downloading Bongo2 beta (Beta available at http://bongo3d.ning.com/)
Installing Bongo2
Starting Rhino5 -> there is a new Bongo tab.

Via Bongo tab, you can enable some toolbars. I didn't find out yet what they all are good for, but I'm pretty sure that this stuff has a pretty good documentary on the bongo website :)
Basically all you need to do to create a very simple animation and see how it's working is:
- Enable the timeline
- Click on the Animate-Button (in the timeline). The timeline turns red.
- Change the current frame (with the slider in the timeline)
- Rotate your camera a bit, or move any objects etc.
- hit "Animate" again.
Your animation is now recorded.

If you move the slider now, you'll see your animation in the camera window.
Now go to Bongo > Render Animation ...
In the popup window you can select maxwell as a target render. When you do so, it exports all frames as a .mxs.
I think it ignores most of the settings in this tab then. The resolution is taken from your camera settings in the maxwell scene manager. And it exports a not working .jpg as well.

If you press "Render Animation", it creates one .mxs for every frame in your output location.
To render all frames out, you need to batch render all .mxs.
You can do this by opening a Maxwell Render window, go to Scripting -> Scripts -> batch rendering. Then put in your folders (you can also define a resolution and sample level there, if you want to).
Or you could use the batch option of the network render.

Once all frames ar rendered out, you can use Virtual Dub (as described here) or any other software that can create video files from single files to create an animation.

That's it for today. Please let me know if I did anything too complicated.
I hope, I'll have the time to play around with it a little more any maybe show some results.
Cheers,
Kami
By kami
#366530
Hi Jeremy

I came to a problem with Bongo and Maxwell.

The way I am using it is to render via Bongo -> Render Animation. (Bongo 2.0 Beta, not the very latest Rhino Plugin for Maxwell)
Then he writes out all the mxs into the folder I specify. It works fine, if I have no moving objects and can cash the meshes.
My scene file is 200 MB big and it takes half a minute to export usually.
It need almost a minute in the beginning for the first framte to export and then it exports 1 frame every 5 seconds.

Now the problem starts, when I have moving objects in the scene.
I am trying to export the same scene now and it takes 20 minutes per frame just to export it ... thats more than the render takes!
Even when I have an animation and only in the ending some moving objects, the cash meshes does not speed things up ...
I got the impression that somehow bongo is taking ages before it starts to export the meshes for maxwell.
Is that possible? And would there be a way to avoid it?

Is there another way to start an animation with maxwell that might work faster?

Thanks
Christoph
By JDHill
#366540
If you have moving objects, then cache meshes will not help, that is for camera-only animations.
kami wrote:I got the impression that somehow bongo is taking ages before it starts to export the meshes for maxwell. Is that possible? And would there be a way to avoid it?
I don't know that I'd specifically say it's Bongo, I recall that a couple of times over the last months, I have encountered a situation where, for no apparent reason, Rhino was regenerating meshes (meaning, you see Rhino's "Creating meshes... Press Esc to cancel" message in the command line) multiple times, every time I would export a particular model. I did not find what was causing that, though, so even if it is the same problem, I can't really tell you how to avoid it. I'd be interested to find if you see Rhino printing "Creating meshes... Press Esc to cancel" to the command-line a lot though.
kami wrote:Is there another way to start an animation with maxwell that might work faster?
No, and you shouldn't need one, since you say the scene normally takes half a minute to export. We need to find the problem, not just try to find a way around it. I'm going through some models to see if I can reproduce that issue again.
By JDHill
#366549
I've gone through almost all of my test models, and have not been able to observe that problem I mentioned. I would just check out anything having to do with render mesh generation -- plugins dealing with rendering (Neon, etc), RDK functions (edge softening, etc). That, and pay attention to the Rhino command line, and the plugin Log Viewer; maybe you will be able to see where the time is being spent.
By kami
#366563
Hey Jeremy

I did a lot of tests and think I can narrow it down to maybe a point where you could help. I'm not sure if this really connected to the issue mentioned before, but it is a weird behavoir anyway.

My step-by-step:
I opened a not too complex scene without any animation information in it. Switched Cache Meshes off.
Just exporting and rendering it takes about 12 seconds if I count it with a watch. Maxwell says 6 seconds for the meshing.
The exported MXS has a size of 40 MB

I now created a quick animation of 10 frames with a simple camera move in that scene.
I rendered the animation via Bongo -> Render Animation ... chose Maxwell Render and a path on my hard disk.
When I click 'Render Animation' it takes around the same 12 seconds per frame and starts directly, leading up to 1min50 for the whole animation.

I then tested switched the cache meshes on to see how that influences the times.
Same procedure as before: Render Animation! Now it takes around 1min15 before it starts exporting the meshes for the first frame.
What I see in the command line is:
Code: Select all
Command: _BongoRenderAnimation
Command: _Render
Command: -_SaveRenderWindowAs
Save file name ( Browse ): "D:\TESTRENDER\13024 Expo Milano\130329 animtest\13024 Milano 130329 animation test scene_00.BMP"
And the little Maxwell window with the "Exporting frame ...". It stays in that state for the mentioned 1min15, then exports the meshes for the first frame, then the same for all the other frames which is very fast then due to the cached meshes and takes around 2min05 for the whole export of all frames.

I then disabled the cache meshes again and rendered it again.
Now, it takes the same 1min15 before it starts exporting the first frame. Weird, right? But The cached meshes seem to have nothing to do with the problem.

I saved the scene and reopened it, started to render the animation again and it started meshing directly.
After that finished, I directly started a second run and it takes 1min15 longer again!

This is the code from the Log Window. The difference between the first two runs are line 979 to 1028 which take 1min15. He did not show similar lines on the first eport!
Code: Select all
* line 979: Add, created or modified Rhino material at index 18600
* line 980: Add, created or modified Rhino material at index 18604
* line 981: Add, created or modified 2 Rhino materials
* line 982: Add, created or modified Rhino material at index 18585
* line 983: Add, created or modified Rhino material at index 18586
* line 984: Add, created or modified Rhino material at index 19434
* line 985: Add, created or modified Rhino material at index 20098
* line 986: Add, created or modified Rhino material at index 20096
* line 987: Add, created or modified Rhino material at index 20614
* line 988: Add, created or modified Rhino material at index 20622
* line 989: Add, created or modified Rhino material at index 20635
* line 990: Add, created or modified Rhino material at index 20634
* line 991: Add, created or modified Rhino material at index 21181
* line 992: Add, created or modified 5 Rhino materials
* line 993: Add, created or modified Rhino material at index 21188
* line 994: Add, created or modified 34 Rhino materials
* line 995: Add, created or modified 4 Rhino materials
* line 996: Add, created or modified Rhino material at index 21387
* line 997: Add, created or modified Rhino material at index 21396
* line 998: Add, created or modified 2 Rhino materials
* line 999: Add, created or modified Rhino material at index 21389
* line 1000: Add, created or modified Rhino material at index 21216
* line 1001: Add, created or modified Rhino material at index 21394
* line 1002: Add, created or modified Rhino material at index 21185
* line 1003: Add, created or modified Rhino material at index 21180
* line 1004: Add, created or modified 2 Rhino materials
* line 1005: Add, created or modified 2 Rhino materials
* line 1006: Add, created or modified 4 Rhino materials
* line 1007: Add, created or modified 3 Rhino materials
* line 1008: Add, created or modified Rhino material at index 20097
* line 1009: Add, created or modified Rhino material at index 20094
* line 1010: Add, created or modified Rhino material at index 20095
* line 1011: Add, created or modified Rhino material at index 19778
* line 1012: Add, created or modified 2 Rhino materials
* line 1013: Add, created or modified Rhino material at index 19433
* line 1014: Add, created or modified Rhino material at index 19098
* line 1015: Add, created or modified 4 Rhino materials
* line 1016: Add, created or modified Rhino material at index 20588
* line 1017: Add, created or modified 2 Rhino materials
* line 1018: Add, created or modified Rhino material at index 20587
* line 1019: Add, created or modified Rhino material at index 18559
* line 1020: Add, created or modified 4 Rhino materials
* line 1021: Add, created or modified 2 Rhino materials
* line 1022: Add, created or modified 3 Rhino materials
* line 1023: Add, created or modified 7 Rhino materials
* line 1024: Add, created or modified Rhino material at index 18603
* line 1025: Add, created or modified 9 Rhino materials
* line 1026: Add, created or modified 8 Rhino materials
* line 1027: Add, created or modified 2 Rhino materials
* line 1028: Add, created or modified 6 Rhino materials
* line 1029: ExportGeometry, Exporting meshes...
* line 1030: ExportStatus, mesh transfer 10.00% completed (1619 of 16191)
* line 1031: ExportStatus, mesh transfer 20.00% completed (3238 of 16191)
* line 1032: ExportStatus, mesh transfer 30.00% completed (4857 of 16191)
* line 1033: ExportStatus, mesh transfer 40.00% completed (6476 of 16191)
* line 1034: ExportStatus, mesh transfer 50.00% completed (8095 of 16191)
* line 1035: ExportStatus, mesh transfer 60.00% completed (9714 of 16191)
* line 1036: ExportStatus, mesh transfer 70.00% completed (11333 of 16191)
* line 1037: ExportStatus, mesh transfer 80.00% completed (12952 of 16191)
* line 1038: ExportStatus, mesh transfer 89.99% completed (14571 of 16191)
* line 1039: ExportStatus, mesh transfer 99.99% completed (16190 of 16191)
* line 1040: ExportStatus, mesh transfer 100.00% completed (16191 of 16191)
* line 1041: Render, total export time: 00:00:05.9873424
* line 1042: Render, frame was written to 'D:\TESTRENDER\13024 Expo Milano\130329 animtest\13024 Milano 130329 animation test scene_0000.mxs'
* line 1043: ExportGeometry, Exporting meshes...
* line 1044: ExportStatus, mesh transfer 10.00% completed (1619 of 16191)
* line 1045: ExportStatus, mesh transfer 20.00% completed (3238 of 16191)
* line 1046: ExportStatus, mesh transfer 30.00% completed (4857 of 16191)
* line 1047: ExportStatus, mesh transfer 40.00% completed (6476 of 16191)
* line 1048: ExportStatus, mesh transfer 50.00% completed (8095 of 16191)
* line 1049: ExportStatus, mesh transfer 60.00% completed (9714 of 16191)
* line 1050: ExportStatus, mesh transfer 70.00% completed (11333 of 16191)
* line 1051: ExportStatus, mesh transfer 80.00% completed (12952 of 16191)
* line 1052: ExportStatus, mesh transfer 89.99% completed (14571 of 16191)
* line 1053: ExportStatus, mesh transfer 99.99% completed (16190 of 16191)
* line 1054: ExportStatus, mesh transfer 100.00% completed (16191 of 16191)
* line 1055: Render, total export time: 00:00:05.8983373
* line 1056: Render, frame was written to 'D:\TESTRENDER\13024 Expo Milano\130329 animtest\13024 Milano 130329 animation test scene_0001.mxs'

...

* line 1155: ExportGeometry, Exporting meshes...
* line 1156: ExportStatus, mesh transfer 10.00% completed (1619 of 16191)
* line 1157: ExportStatus, mesh transfer 20.00% completed (3238 of 16191)
* line 1158: ExportStatus, mesh transfer 30.00% completed (4857 of 16191)
* line 1159: ExportStatus, mesh transfer 40.00% completed (6476 of 16191)
* line 1160: ExportStatus, mesh transfer 50.00% completed (8095 of 16191)
* line 1161: ExportStatus, mesh transfer 60.00% completed (9714 of 16191)
* line 1162: ExportStatus, mesh transfer 70.00% completed (11333 of 16191)
* line 1163: ExportStatus, mesh transfer 80.00% completed (12952 of 16191)
* line 1164: ExportStatus, mesh transfer 89.99% completed (14571 of 16191)
* line 1165: ExportStatus, mesh transfer 99.99% completed (16190 of 16191)
* line 1166: ExportStatus, mesh transfer 100.00% completed (16191 of 16191)
* line 1167: Render, total export time: 00:00:05.7913312
* line 1168: Render, frame was written to 'D:\TESTRENDER\13024 Expo Milano\130329 animtest\13024 Milano 130329 animation test scene_0009.mxs'
Now comes a funny part :)
After that export I tried to render a still image again, by clicking on "Rendering" in the Maxwell toolbar. This happens:
Code: Select all
Command: _Maxwell_Render
Maxwell: Rendering Animation Frame to MXS (frame 1)
Maxwell: Cached MXS meshes have been invalidated.
Maxwell: Exporting meshes...
Maxwell: mesh transfer 10.00% completed (1619 of 16191)
Maxwell: mesh transfer 20.00% completed (3238 of 16191)
Maxwell: mesh transfer 30.00% completed (4857 of 16191)
Maxwell: mesh transfer 40.00% completed (6476 of 16191)
Maxwell: mesh transfer 50.00% completed (8095 of 16191)
Maxwell: mesh transfer 60.00% completed (9714 of 16191)
Maxwell: mesh transfer 70.00% completed (11333 of 16191)
Maxwell: mesh transfer 80.00% completed (12952 of 16191)
Maxwell: mesh transfer 89.99% completed (14571 of 16191)
Maxwell: mesh transfer 99.99% completed (16190 of 16191)
Maxwell: mesh transfer 100.00% completed (16191 of 16191)
Maxwell: total export time: 00:00:06.1973545
Maxwell: frame was written to 'C:\Users\nightnurse\Documents\Maxwell\output\unnamed.mxs'
Command: RenderScene
Unknown command: RenderScene
And it does not start the render. (a bug?) I have also no idea where that path comes from as it I have it nowhere in my settings.
Nevermind ... but the cool thing is, when I now start to render the animation again, it starts directly as if I had just opened the file!

I hope that all makes any sense to you, it does not really for me. :) Feel free to ask any questions if it's not clear.
I also added some moving objects to see if it makes any difference, but it does not.
I think I'll repeat some tests with a heavier scene to check if this has anything to do with the issue I had yesterday and exporting times of 20 min per frame.

Cheers,
Christoph

PS: I could also send you my test scene if that helps ...
Last edited by kami on Fri Mar 29, 2013 1:57 pm, edited 1 time in total.
By kami
#366564
one addition to the scene mentioned above: just doing a viewport rendering of each frame (renderer=viewport instead of maxwell render) is done in a few seconds, so I think/hope it has something to do with the maxwell plugin and hope it is something that can be fixed.

Scenario 1, real life conditions:
A different scene - different problems :)

(We are having two animations we have to produce at the moment. This is the smaller but more urgent one. The longest shot has a legth of 1000 frames)

First test: Exporting a still image!
Maxwell starts meshing and then does not show something for more then a minute, then quickly jumps to 10%,20%, ... 100%. Total export time shows 1min33 which is about what I stopped with a watch.
The MXS has a size of 118 MB. Usually the percentage counts up more steadily. I started narrowing down if some specific objects are the reason for that.
I find that some lights behave weirdly. If I remove them, the scene exports in 22sec. Okay, that is way faster...
The lights alone export in 27 sec. Both together is much slower than both separately, why is that?
Scene with lights and rest: 1min33 export (2.7 Mio Polygons)
Scene without lights: 0min22 (1.7 Mio Polygons)
Only lights: 0min27 (1 Mio Polygons)

I remove the lights and continue working with the faster exporting scene (0min22 - MXS 74MB).

Animation tests:
I only do a testrun with 20 exported frames.
Starting the animation via Bongo: The first frame exports immediately - 22sec and done. Next frame. Now it stops for around 2-3 minutes before it continues to export and then needs again 22sec for the export of the meshes. It stops between every frame at this point (one CPU-Core has 100%):
Code: Select all
...
Maxwell: mesh transfer 60.02% completed (7974 of 13286)
Maxwell: mesh transfer 70.02% completed (9303 of 13286)
Maxwell: mesh transfer 80.02% completed (10632 of 13286)
Maxwell: mesh transfer 90.03% completed (11961 of 13286)
Maxwell: mesh transfer 100.00% completed (13286 of 13286)
Maxwell: total export time: 00:00:23.0103161
Maxwell: frame was written to 'C:\Users\nightnurse\Desktop\animation tests\brian exp\13049_BIG_0006.mxs'
Image successfully saved as C:\Users\nightnurse\Desktop\animation tests\brian exp\13049_BIG_6.JPG
Command: _CloseRenderWindow
Maxwell: Cached MXS meshes have been invalidated.
Command: _Render
Command: -_SaveRenderWindowAs
Save file name ( Browse ): "C:\Users\nightnurse\Desktop\animation tests\brian exp\13049_BIG_7.JPG"
I do not know why he stops, but this is where it becomes a problem.
Also I don't have CachedMXS activated. Don't know why he displays that they have been invalidated

The weird thing is, after having exported this animation I tried to render a simple frame via the Rendering button again. Now it also takes 2-3 minutes before he starts to export the meshes. When the mxs is exported successfully (showing 22sec again) and I hit render again, it starts exporting immediately again (also showing 22sec). So somehow after every frame that is exported via bongo, the next export takes 2-3 minutes longer. Is that any clue?
Also: He does not show anything in the Maxwell Log window as in the scene before.

Next test: Cached meshes
My next test is to check how cached meshes influence this.
I render out a still image, cached meshes is now on. Exporting meshes ... 22sec. Next test: Exported the mxs immediately. good.
Render animation! First frame: he newly starts to export the meshes. 22sec. Then he stops for the next frame for 2-3 minutes, then does not need to export any meshes as they are cached.
The same procedure between every frame. At the end of the animation, there are some moving objects. He automatically detects that and starts exporting the meshes again then (with that pause of 2-3 minutes). So the good thing is, that cashing meshes works fine theoretically and it detects if some objects have moved from one frame to the other or not.

That 2-3 minutes pause is something weird as rhino does not show anything in the command line nor in the maxwell log window. But I think that is the only thing not working as expected. Especially as this pause also occurs when rendering a still image after the animation.
Is that anything where you could help me with?
I'll try to run some test with my second animation this afternoon/tomorrow and maybe report back if I find something else ...

Thank you very much
Christoph

PS: again, if you need that scene I could send it to you. Also the lights which make me curious why it takes so much longer with them in the scene file.
By JDHill
#366572
Lots of information to digest here. :) Yes, I think it should help if I could see the scene (if small enough for email, it is jeremy at nextlimit dotcom, otherwise use dropbox or similar).
By kami
#366576
Hehe sorry, I tried to post the results of all tests I did :)
I'll send you an email with a dropbox link. Sorry, I did not reduce the scene so they are quite heavy, but I did not want to change anything that could affect the results. Even though in the first scene a lot of items are hidden ...
Thank you so much for having a look at it! And feel free to ask, if there are any questions or I should try something. I haven't installed the latest plugin and will do so to see if anything differs.
It would be really cool if this would be a malfunction and easily fixable. Or if there would be some kind of a workaround ...
For example I have no idea how the maxwell animation buttons work or if it could be faster if the animation was started as a script (like in the other message in the board, or the sunstudy script you wrote).
I also think, I did not come across the "Creating meshes ..." issue
By kami
#366595
I just updated Bongo+the Rhino Plugin and the first issue remains. Haven't tested the second scene again yet.
But I did notice another issue for scene2:
When you start to render it loses all its realscale mappings. You can see this on the render output or in the rendered view. Shortly after you click "Render Animation" this happens. And when you cancel the animation it gets back to its normal state. Can you reproduce this?
By JDHill
#366596
Well, first of all, it is not unexpected that you get funny behavior with cache meshes (and related messages) when using Bongo 2, because the plugin is not designed to work with that. So its detection of whether you are rendering an animation and such can get screwed up, which is why you are not seeing the "would you like to render the frames in Maxwell" dialog at the end of the export. That's also why you get into funny states with respect to clicking Render and having nothing happen, i.e.:
And it does not start the render. (a bug?) I have also no idea where that path comes from as it I have it nowhere in my settings.
Nevermind ... but the cool thing is, when I now start to render the animation again, it starts directly as if I had just opened the file!
Theoretically, if you click the End Animation button after exporting one, you should see that window, but I don't guarantee it. In fact, I don't guarantee *anything* using this combination of software. :) Anyway, I'll write more when I know more...
By JDHill
#366600
Ah, I found a set of circumstances that might be in play. For object motion blur to work automatically with Bongo, when exporting an animation, the plugin must check all the objects to see if they need to have motion blur data updated, and this can be pretty time-consuming. So indeed, you may see a difference when using a custom script to drive Bongo and Maxwell, because it would not attempt to do this work (unless you called the Maxwell plugin commands for setting initial camera and object positions in the script). So, I will see if I can optimize the check, and in the meantime, please try doing your animation with the custom script and let me know if it does speed things up.

Now, on the realscale question, are you still talking about Bongo 2? I don't have that installed.
By kami
#366601
Of course I am experimenting with that unfinished software again :), but as I started to look into bongo a short time ago, I decided to start with the latest version right away, before learning an older version which works differently.

I did not expect everything to run perfectly smooth (eg. exporting an image when in animation mode, or having to launch the animation manually after the mxs are generated). I found these issue while I was experimenting around a bit before any projects. But the problem with the exporting times getting much huger than I expected is killing me... Would it help if I would deactivate any motion blur?
The real scale issue is just another thing, I could temporarily avoid by texturing all objects.

Would I have none of these problem if I switched to Bongo 1? I would have to redo all the animation options I guess, but maybe in the end beeing able to export the scenes in time.
I was not able to do a bongo animation with a rhino script yet, as I don't know much about rhino script. I only was able so far to change your sunstudy script, that it would render out the same frame several times. Don't know how to control bongo yet. But I'll look at that tomorrow.

Besides all that issues that I knew I might have to face, the network render is killing me as well, at is is randomly stopping with weird or no error messages at all ... :)

Well, I'll try again tomorrow. Thanks you so much for your help!
By JDHill
#366602
You won't avoid the motion blur check by using Bongo 1, and it can take a good deal of time, even if there are no objects with motion blur enabled (though more if there are). I would recommend driving Bongo and Maxwell from a script, as given here. Give me a little time, and I'll write another version of that which allows you to pick the frames to render without editing the script.
By kami
#366612
I slightly modified it for bongo2 and am going to try it our right now!
Code: Select all
_NoEcho

_-RunScript (

  firstFrame = 0
  finalFrame = 10
  
  Rhino.Command "_Maxwell_BeginAnimation"

  For f = firstFrame To finalFrame
    Rhino.Command "_BongoSetCurrentTick " & f
    Rhino.Command "_Maxwell_Render"
    Rhino.Command "_ClearUndo"
  Next

  Rhino.Command "_Maxwell_EndAnimation"

)
Help with swimming pool water

Hi Andreas " I would say the above "fake[…]

render engines and Maxwell

Other rendering engines are evolving day by day, m[…]