Download

Online

Gallery

Blog

Sweet Home 3D Blog

This blog presents news and tips about Sweet Home 3D.

And you, how do you use your Sweet Home 3D? Episode 17

A few months ago, Robin87105 posted in Sweet Home 3D forum that he was looking for a plug-in able to import files at IFC format in a simulation environment project named MASSIS. Intrigued by this new software based on Sweet Home 3D, we contacted Rafael Pax, its author who is a Spanish engineer and researcher. He kindly answered to our questions.

- Can you describe MASSIS?

MASSIS is a software framework intended for simulating indoor scenarios (a house, a facility, etc.) with multiple agents. These agents can represent people, robots, or even sensors (e.g. presence detectors). The main idea is to provide a framework for rapid prototyping. Usually, there is a gap between general purpose simulators and specific tools: Some are too open, while others are too specialized, or they do not fully integrate design, modeling and simulation. Usually, the workflow for defining, developing and running a simulation is not easy, and may take too much time.
MASSIS tries to accelerate this process integrating together awesome environment editor (Sweet Home 3D) with modeling and simulation libraries, and providing the ability to visualize the simulation progress in 2D and 3D (with Sweet Home 3D libraries) like in this Demo video:

- Why did you choose Sweet Home 3D to work with? How difficult was it to create a derived version like MASSIS?

I am a programmer, not a graphic designer. Designing a building with tools like 3DMax, AutoCad or blender requires time and dedication, and I don't have that time. Sweet Home 3D is a great tool for this kind of task: The learning curve is minimal, and the results are spectacular. Also, the way it is coded is fantastic: It has been developed following well known programming patterns. No comments are needed in the source code: it is clean, concise and self-explanatory. A great work.
Thanks to how well Sweet Home 3D is designed internally, there was no need to create a derived version of it: Sweet Home 3D has the capability of being extended via plug-ins. So, every extension related with the editor can be coded without modifying Sweet Home 3D source code. Since the development of MASSIS started, Sweet Home 3D has been improving considerably. These improvements have meant minimal changes in the MASSIS source code, and most of the time, there has been no need to make any changes.

The simulator transforms Sweet Home 3D model into another model, which makes the geometric computations easier, path finding and collision detection. Sweet Home 3D interfaces are well designed, and converting Sweet Home 3D model to MASSIS model was easy.

A note about the plug-ins: The process for developing plug-ins for Sweet Home 3D seemed a bit slow to me. That's why I developed a Dynamic Plugin Manager that allows to launch and debug the plug-in directly, without any configuration. This code is intended only for the developing stage, before it is released. There is no need to make configuration files, or copying libraries to any folder. However, when the plug-in is ready,should be packed following Sweet Home 3D standards.

- How did you make characters move in the MASSIS showcase video? How were rendered the simulation animations generated by MASSIS?

The objects composing the Sweet Home 3D building are kept in the MASSIS model. In Sweet Home 3D you can move a character right? So does MASSIS. Looking at the code of Sweet Home 3D, the same functionality was replicated with some adaptation.

Although 3D display is more realistic, the 2D view is useful for analysis and debugging. It was designed taking into account the creation of user-defined layers in order to filter the different elements involved in the simulation. For example: the crowd density, or the state of an agent involved in the simulation is easier with a 2D view.
The 2D view is part of the simulator graphical interface. Currently, it has three types of visualization:

  • Building Map → The 2D view shown in the videos
  • Building 2D → The 2D view of SweetHome3D
  • Building 3D → The 3D view of SweetHome3D

For example: The following image is a screenshot of the 2D view during a MASSIS simulation and shows the possible paths that people can take, and how are being located in the simulation space.

Instead, this is showing the paths that agents are following.

Another thing that is useful for analysis is the capability for saving the progress of a simulation, in order to analyze it later. It is saved in plain JSON text, and can be played directly in MASSIS. Moreover, this data could come from the output of a simulation or from another source, so MASSIS with the appropriate data input could reproduce behaviors generated in another platform.

- Did you think yourself about adding compatibility with IFC format?

Yes. However, the IFC format is complex, and translating it into Sweet Home 3D is not an easy task. However, with the new functionalities that the version 5.3 offers, such as the XML entry, or the possibility to add/remove custom properties to home objects from external code, it would be easier to develop a plug-in for adding IFC attributes to elements, much more advanced that the MASSIS' metadata plug-in.

- How MASSIS is going to evolve?

MASSIS was the first prototype for a bigger project: MOSI-AGIL (sorry, most of the information is in Spanish). The acronym could be translated to English as Social Modeling of Ambient Intelligence Applied to Large Installations. Some of the objectives of the project are designing new models for simulating social behaviors in large facilities, and the interrelation with smart services (sensors and actuators). For these tasks, a simulation framework is needed, so MASSIS was chosen.
There have been many changes over the past year: Now it relies heavily on a 3D model, taking into account more parameters (such as stair slopes, and we're working on elevators). We have switched from Java3D to JMonkey Engine 3.The main reason for this change is compatibility: We have other projects, such as ColoSAAL, that use this engine.

Here are some screenshots of simulations. The simulations can be observed from multiple cameras in real time, and the output of the cameras can be saved into video files. Simulations can run on remote servers, and several clients can connect in real time to the running simulation, with a desktop application or via API.
Among other things, we try to replicate people behavior in a building (in this case, in a university building) based on real data, and see how this behavior can be influenced. We have developed algorithms and methods for this task. But we not only try to replicate and influence behaviors, but also to infer some behaviors based on sensor data. The activity recognizing system has been developed in the context of the ColoSAAL project, and has been awarded by IBM.

The characters now are animated, and can be customized with MakeHuman. We have developed tools that integrate the animations of Mixamo (which are free) with MakeHuman models. This adds more realism to the simulations, and allows to represent human behaviors that cannot be represented without an animation (e.g. yelling). The source code of this tool, and the source code of the simulator will be released as soon as possible (next year or so).

Although we are improving our simulation tools, Sweet Home 3D is still a very important part of our development. There are two main reasons:

  • Designing buildings is very easy.
  • It provides very valuable information about the environment: In Sweet Home 3D there are rooms, walls, furniture, doors and levels. This information can be retrieved from the source code. Thanks to this, developing the AI (Artificial intelligence) of the agents in our simulations is much more easier: The "concept" of a zone/area, obstacle or point of interest is implicit in the information that SweetHome3D provides.

The development of simulations is normally divided into three phases: Design, Simulation and Analysis. Sweet Home 3D is heavily used in the design phase, and it saves a lot of time for the software engineer, who can focus on the other two phases.

Additional Notes

I would like to suggest the use of Maven or Gradle for Sweet Home 3D, makes easier the development of tools based on Sweet Home 3D, such as MASSIS. A repository on GitHub would be great too.
Finally, I would like to thank Emmanuel Puybaret, and all the people who have made it possible for Sweet Home 3D to be an excellent tool.
Additional information about MASSIS can be found in its homepage http://www.massisframework.com, or in my BSc. final work.

Thank you very much, Rafael, for answering to our questions. Good luck for your project. Let us know.
Note to SourceForge.net: don't worry, we don't plan to leave you for GitHub!



    Get Sweet Home 3D at SourceForge.net. Fast, secure and Free Open Source software downloads
   
© Copyright 2006-2024 eTeks - All rights reserved