Blender Addon - Blenderer

Hey there!
Thanks for this add-on. It is very cool rendering!

But I wonder is it possible to render a huge scenes? When I am trying to render that way the VC is freezes. Please, send me if someone solved this problem.

1 Like

Some of my renders took about 30-45 minutes (on a better than average computer) to write the scene data for Blender. For this time VC is frozen, but in the end these renders came out alright.

Depending on your idea of ā€œhugeā€ I would say itā€™s probably possible. Iā€™ve rendered simulated scenes with 15 Million faces using the addon. I always choose to open the scenes in Blender, so I canā€™t say for sure you will get the same result if you render directly from VC, but when Iā€™ve tried to render directly from VC Iā€™ve had the same experience as @hannuhoo. It may take some time, but VC usually recovers and the renders come out alright.

Btw, using the tools in VC to simplify the geometry can make a huge difference on the face count, without any noticeable visual difference. Depending on the geometries, 30-50% face count reduction is not unusual.

Thanks for your advice!
I just donā€™t know about simplify geometry tool in VC.
Now I can reduce poly count in scenes.

Thanks Hannuhoo for the bug report. Havenā€™t noticed that. Weā€™ll fix that in the upcoming version. Itā€™ll also convert scenes from VC to Blender faster.

There seems to be something wrong with animation rendering. If i set the animation step size to 0.04 (== 25 fps) and try to record a 10 sec animation i should get 250 frames in total. But instead Blenderer says ā€œAnimation rendering: 125 framesā€, so my animation gets recorded at ā€œdouble speed/half the number of framesā€, resulting in 25 fps video that lasts only 5 seconds.

I did some digging in the addon code and it looks like the keyframe generation relies on app.OnRender events to record frames. These are intended to happen at simulation speed stepsize intervals (in my case every 0.04 s). I added a print command to OnSimRender to get timestamps whenever OnRender calls this function, and it looks like the interval is always double to what the stepsize value is (0.08s instead of 0.04s or 0.04s intead of 0.02s, etc). Also did some testing completely without Blenderer and indeed it looks like app.OnRender events happen at 2 * app.Simulation.SimSpeed intervals, when running the simulation in virtual time.

Something i tried is to use half the correct stepsize (0.02 instead of 0.04) and then set the FPS to 25 manually. Now we get 250 frames total, but the video gets encoded at 50 fps despite the FPS setting. So at the moment the only way to get a video with the correct number of frames and fps is to use some external encoder (FFMPEG etc).

You are right. Thereā€™s a bug in the 4.2 version that is already been reported and hopefully gets fixed soon. That causes this issue in the animation recording and rendering. In 4.1 version it works as expected.
Follow these steps to get 25 fps video using 4.2 version.

  • Set the recording step to 0.02 on the animation tab (half of what it should be)
  • Record the animation
  • When recording is done, set the FPS property on the animation tab to 25
  • Render the animation
  • Profit!
1 Like

A new improved version of this addon was just released today. Please find the download link in the original post (top most post) in this forum thread. Please report here (on this thread) if you find any bugs or other issues.
The new 2.1.0 version mainly improves the reliability and performance of the addon. Itā€™s a lot faster with heavier CAD models.
Thereā€™s also some new features that are listed in the original post EDIT5 section. One of the new features is a shadow catcher floor, that Iā€™d like to show how to utilize in this simple video. The example rendering in the video is not that impressive, but hopefully shows what it is all about. In the video itā€™s also shown how to locate the blender executable if itā€™s not configured properly.

2 Likes

Iā€™m trying to record simulation used physics engines and render it. In this simulation, we would like to reproduce many sphere objects fall and see their behavior. The many spheres should be created in short time and I programmed that the sphere is deleted when itā€™s close to floor. The following error message is displayed when I did under the condition. How should I do to solve this?

Traceback (most recent call last):
  File "file:///C:\Users\xxxx\Documents\Visual Components\4.2\My Commands\Blenderer.py::", line 877, in OnSimRender
  File "file:///C:\Users\xxxx\Documents\Visual Components\4.2\My Commands\Blenderer.py::", line 640, in exportGeo
ReferenceError: Object no longer exists.

@pm
Is it possible to get the layout in order to test it. Maybe you could create a simplified scenario if you donā€™t want to share the complete project here. Or maybe a snippet showing how you delete the items if thatā€™s what causing the issue.

Thank you for your reply.

Yes, I can share it with you. Please find the attached file.

I would like to reproduce the behavior of disinfection robot. I think it is needed to be changed the code of ā€œBlender.pyā€ and I donā€™t understand its logic yet.

robot_20200930.zip (5.4 MB)

Hi, I tried to look into your layout and Iā€™m not quite sure why the exporting fails. In any case I think if you are trying to visualize some spray effect there with physical spheres, you are not going to succeed that too well with that approach. Maybe you could try to use the particle systems in blender. The VC addon already uses that for visualizing the weld sparks. Itā€™s probably not what you need out of the box as that particle system is hard coded to create sparks like particles. But you could edit the particle system that the addon creates in blender on import_to_blender.py file between lines 403ā€¦503.
To get started with the sparks emitter, create 1 in the scene on the lights tab, then attach that emitter to your mobile robot and locate it where you want it. Then connect a signal to the sparks emitter signal ā€œSparksSignalā€. Set the signal to True when you want to ā€˜sprayā€™ sparks and set it to false when to stop them.

1 Like

Thank you for trying that.
Could it be possible to repeat following processes from python script?

  1. halt simulation temporally and start Blender add-on and export a picture
  2. resume simulation after the rendering process finish

Maybe possible but would be very slow. We at VC wonā€™t implement that. You may try to do it on your side. But I highly recommend getting into particle systems in order to visualize that nicely. Or shoot the video from VC rendering without Blender.

As you said, I tried the particle systems and confirmed it works to visualize the weld sparks.
After that, I changed/added some parametersā€™ value in/to ā€œimport_to_blender.pyā€ file between lines 403ā€¦503 but I couldnā€™t reproduce particles like a mist.

Would you let me know how to:

  1. decelerate fall speed
  2. make each particle transparent
  3. change the material

Sorry didnā€™t realize earlier that you tried to visualize mist with the spheres. Visualizing mist is not supported out of the box in VC and not in the addon. Maybe you could open the animation on Blender using the ā€œOpen in Blenderā€ check box and do the rest on Blender side. Refer to blender tutorials online. How to write that mist feature in the addon, is not something I can explain on the forum as Iā€™m not so sure how to do it without experimenting.

Hi,

I installed ā€œblender-2.82-windows64.msiā€ and afterwards put the ā€œBlenderer_2_1_0__2020_09_29ā€ folder under ā€œMy commandsā€. All seems OK until I push ā€œRenderā€. I get this:

NameError: Attribute or method ā€˜TEMPDATA_URIā€™ not found.

Any clues?

@simfact
Is that all you get in the Message panel?

No, I get a traceback too:

Traceback (most recent call last):
File ā€œfile:///C:\Users\JH\Documents\Delfoi\4.2\My Commands\Blenderer_2_1_0__2020_09_29\Blenderer.py::ā€, line 813, in CallStill
File ā€œfile:///C:\Users\JH\Documents\Delfoi\4.2\My Commands\Blenderer_2_1_0__2020_09_29\Blenderer.py::ā€, line 570, in getMaterialFiles
NameError: Attribute or method ā€˜TEMPDATA_URIā€™ not found.

The path is because I use a Delfoi installer, but this has not been causing any problems with previous versions.

@simfact
If you edit the blenderer.py file on line 76 so that you change the flags for visibility and overwrite to True for that property and launch the addon again. Do you see that property in the UI?
And if you see, whatā€™s the value of that property?