Bentley Communities
Bentley Communities
  • Site
  • User
  • Site
  • Search
  • User
MicroStation
  • Product Communities
MicroStation
MicroStation Wiki Physics Simulation with Blender
    • Sign In

    • +MicroStation Wiki
    • +Administration Wiki
    • +Annotations Wiki
    • +Bentley View Wiki
    • +MicroStation PowerDraft
    • +Programming Wiki
    • -Visualization Wiki
      • Assigned Material will not render
      • +Bentley LumenRT
      • Customize the list of cities available to Solar Position
      • How to: Smart way to place a camera
      • Image from reference appears darker in MicroStation V8i (SELECTseries 3)
      • KEYIN: RENDER VIEW DOES NOT WORK
      • +Luxology beginners guide
      • Luxology Presets and additional Light Probes
      • Luxology Rendering Engine Failed
      • Particle Trace Rendering
      • Photomatch demonstration
      • Physics Simulation with Blender
      • UV Editing with MicroStation, Blender and Photoshop
      • Warning message when placing RPC cell

     
     Questions about this article, topic, or product? Click here. 

    Physics Simulation with Blender

    Cloth Simulation with Blender

    Introduction

    This tutorial covers exporting models from Microstation as .OBJ Files, importing them into Blender for softbody or cloth ohysics simulation, and importing them back into Microstation for rendering with Luxology. Blender is a free 3D modeling, rendering, animation, and game engine software available at http://www.blender.org.

    This tutorial assumes the following:

    • User has downloaded and installed Blender (2.49 and not the 2.5 alpha).
    • User has downloaded and installed Python to match blender requirements. This may or may not be absolutely necessary, but is highly recommended.
    • User has some understanding of Blender and will consult Blender Tutorials and quickstart guide for basic use. I have tried to break this down step-by-step so if you don't have working knowledge of Blender you may be able to survive through the end of the tutorial. Also note if you never have used Blender before you will probably struggle with the interface.
    • Design File Master unites set to Meters. I feel like this works best for the importing and exporting.

    If you have any questions, please post a comment, and I will do my best to answer it.

    Also, I am well aware this is mostly a Blender Tutorial on the Microstation Visualization Wiki. If you know how to do this in Microstation, feel free to post it, otherwise this is the best, and cheapest option I know of.

    Tutorial

    Isolate the items you would like to include in the simulation. In this case, I am creating a table cloth, so all I want to import into Blender will be the table.

     

     

     

    Draw a plane over the table. This will become the tablecloth. Two important things to note:

     

    1. Make sure the table cloth is above the table and not at the same elevation as the table. This will make it harder to separate in Blender.
    2. You can also create the cloth in Blender, but I am better with MS so I tend to model what I can prior to import.

     

     

    Export the Model as an .obj file. I adjust the stroke tolerance (not sure why), and I invert the X and Y so that it is in the correct orientation when imported in Blender.

     

     

    Open Blender (You already installed it right? www.blender.org). Installation and setup is outside the scope of this tutorial.

    Delete the default cube (Right click to select->press delete->confirm).

     

     

    Import the .obj file of the table and tablecloth. (Fire->Import->Wavefront obj).

     

     

     

    You should see the table in the 3D view.

     

     

     

    The Blender importer imports the entire .obj as a single Blender object. We need to separate the table cloth from the table. Make sure the object is selected (pink outline) and press tab to enter edit mode.

     

    Press (A) to deselect all of the vertices (yellow selected, purple deselected).

     

     

     

     

     

    Press “1” or “3” on the number pad to enter the front view.

     

    Press “b” and box select just the table cloth. You can also hold down shift and right click individual vertices.

     

     

     

    Press P and click “Selected” in the context menu to separate the tablecloth and table into separate objects.

     

    Press Tab to leave edit mode. Now you should be able to select the table cloth and table separately in object mode.

     

    Select the tablecloth and press tab to edit its vertices.

     

    Enter Face Mode

     

     

    Select both triangles making up the table cloth and click “Join Triangles” in the mesh tools.

     

    With the single quad now selected press subdivide 5 to 7 times. Subdivide is also located in the Mesh Tools. (The more times you press, the better the simulation and the more time it takes to process).

     

    Now may be a good time to save the file.

     

    Go back to vertex edit mode and make sure all of the vertices are selected in the table cloth.

     

    Under Link and Materials in the button window, create a new vertex group, name it “TableCloth”, set the weight to 0, and click assign to assign the vertices to a vertex group. By clicking select and deselect, you can make sure you have properly assigned the vertices to the vertex group.

     

     

    Go back to object mode (F7) and select the physics buttons.

     

     

    With the table cloth selected click the “Cloth” Button and set a preferred material preset. Enable Pinning of cloth and make sure the vertex group is selected. Enable self collisions under the Collision Tab.

     

     

     

     Select the Table and enable table collision.

     

     

     

     Press Alt-A to watch the animation. It will take time, but Blender will cache it so subsequent replays are faster.

     

     Move your mouse all of the way to one side of the screen until your cursor turns into two sideways arrows.  Right click and select split area.

     

    Split the screen similar to the screenshot and change the panel type to IPO.

    Click on the IPO to advance to the desired animation frame for export.

     

    Save your blender file. I would also advise making a backup as I don’t know how to undo the next few changes without rework.

     

    In the button window go to the object buttons and click to apply the cloth modifier. This will freeze a selected frame of the animation into the mesh so we can export the results.

     

     

    File-> Export and use the settings shown. You only want to export the table cloth, so make sure you have it selected. Also, make sure rotate X90 is disabled.

     

     

    Close Blender when export complete.

     

    In Microstation, delete or hide your original plane.

     

    Reference in the object file you exported from blender. It should land right on top of the table. Make a copy of the mesh and detach the reference.

     

     

    Assign a material and have fun!

     

    I will post a second tutorial explaining how to pin vertices of the cloth in a particular location in order to create curtains, drapes, flags, and etc.

    • Share
    • History
    • More
    • Cancel
    • Dan Koval Created by Bentley Colleague Dan Koval
    • When: Thu, Sep 5 2013 3:21 PM
    • Revisions: 1
    • Comments: 0
    Recommended
    Related
    Communities
    • Home
    • Getting Started
    • Community Central
    • Products
    • Support
    • Secure File Upload
    • Feedback
    Support and Services
    • Home
    • Product Support
    • Downloads
    • Subscription Services Portal
    Training and Learning
    • Home
    • About Bentley Institute
    • My Learning History
    • Reference Books
    Social Media
    •    LinkedIn
    •    Facebook
    •    Twitter
    •    YouTube
    •    RSS Feed
    •    Email

    © 2023 Bentley Systems, Incorporated  |  Contact Us  |  Privacy |  Terms of Use  |  Cookies