Difference between revisions of "Blender"

From OpenFOAMWiki
(Updates for new Blender 2.80)
(Introduction)
 
(6 intermediate revisions by the same user not shown)
Line 8: Line 8:
  
 
<noinclude>
 
<noinclude>
Most of [https://www.blender.org/features/ Blender features] are targeted for 3D artists. For OpenFOAM users, the most interesting Blender features include [https://en.wikipedia.org/wiki/Polygonal_modeling polygon surface mesh modelling], photo-realistic visualization, animation, and Python programming interface (for automation and creating add-ons that extend the software). Pros of Blender include a large on-line community, lot of on-line material, and add-ons. Cons of Blender include a steep learning curve, and fast changing / evolving software (tutorials get outdated quickly). The [https://www.blender.org/download/releases/2-80/ new Blender version 2.80 and later] includes a completely new UI compared to previous version 2.79.
+
Most of [https://www.blender.org/features/ Blender features] are targeted for 3D artists. For OpenFOAM users, the most interesting Blender features include [https://en.wikipedia.org/wiki/Polygonal_modeling polygon surface mesh modelling], photo-realistic visualization, animation, and Python programming interface (for automation and creating add-ons that extend the software). Pros of Blender include a large on-line community, lot of on-line material, and add-ons. Cons of Blender include a steep learning curve, and fast changing / evolving software (tutorials get outdated quickly). It is suggested to use the [https://www.blender.org/download/LTS/ latest Blender LTS version] to avoid compatibility issues.
  
 
= Learning Blender =
 
= Learning Blender =
 
Links for OpenFOAM users to get familiar with Blender:
 
Links for OpenFOAM users to get familiar with Blender:
* [https://www.blender.org/ Blender.org main page]
+
* [https://www.blender.org/ Official Blender website] has a [https://www.blender.org/support/ support section]
* Youtube video series: [https://www.youtube.com/playlist?list=PLa1F2ddGya_-UvuAqHAksYnB0qL9yWDO6 Blender 2.8 fundamentals]
+
* Video tutorial series [http://tkeskita.kapsi.fi/blender/ Blender for OpenFOAM Users] using Blender LTS version 3.6 (published 2023)
 +
* Youtube video series: [https://www.youtube.com/playlist?list=PLa1F2ddGya_-UvuAqHAksYnB0qL9yWDO6 Blender 2.8 fundamentals] (published in 2019, after the major GUI update)
 +
* Search on-line for the topic you want to learn, e.g. "Blender 3.6 mesh modelling tutorial"
  
 
= List of links =
 
= List of links =
 
Wiki pages for using Blender with OpenFOAM:
 
Wiki pages for using Blender with OpenFOAM:
* [[Contrib/Unstructured_Grids_Addon_for_Blender | Unstructured Grids Addon for  Blender 2.8]]
+
* [[Contrib/Unstructured_Grids_Addon_for_Blender | Unstructured Grids Addon for  Blender]]
* [[Contrib/SnappyHexMesh_GUI_Addon_for_Blender | SnappyHexMesh GUI Addon for Blender 2.8]]
+
* [[Contrib/SnappyHexMesh_GUI_Addon_for_Blender | SnappyHexMesh GUI Addon for Blender]]
 
* [[Contrib/SwiftBlock|SwiftBlock]] - An addon for Blender acting as a GUI for creating the dictionary <tt>blockMeshDict</tt>, that lets the user create the desired hexahedral block structure as a mesh object within Blender 3D.
 
* [[Contrib/SwiftBlock|SwiftBlock]] - An addon for Blender acting as a GUI for creating the dictionary <tt>blockMeshDict</tt>, that lets the user create the desired hexahedral block structure as a mesh object within Blender 3D.
 
* [[Contrib/SwiftSnap|SwiftSnap]] - Another addon for Blender that acts as a GUI for creating the dictionary <tt>snappyHexMeshDict</tt>, that lets the user have full control over how and which feature lines are provided to [[snappyHexMesh]]. Further, the addon utilises Blender materials to let the user specify patches' names, resolution settings and mesh wall layers.
 
* [[Contrib/SwiftSnap|SwiftSnap]] - Another addon for Blender that acts as a GUI for creating the dictionary <tt>snappyHexMeshDict</tt>, that lets the user have full control over how and which feature lines are provided to [[snappyHexMesh]]. Further, the addon utilises Blender materials to let the user specify patches' names, resolution settings and mesh wall layers.
Line 25: Line 27:
 
Blender related links outside wiki which OpenFOAM users may find useful:
 
Blender related links outside wiki which OpenFOAM users may find useful:
 
* [https://github.com/tkeskita/mesh_heal Surface Mesh Healing Tools Add-on for Blender]
 
* [https://github.com/tkeskita/mesh_heal Surface Mesh Healing Tools Add-on for Blender]
* [https://github.com/tkeskita/BVtkNodes Blender VTK Nodes add-on for version 2.8] and [https://github.com/simboden/BVtkNodes original version for 2.7] - Use Blender for running VTK pipelines for post-processing (warning: experimental). There is [https://blenderartists.org/t/bvtknodes-gallery/1161079 example gallery of visualization results at BlenderArtists].
+
* [https://github.com/tkeskita/BVtkNodes Blender VTK Nodes add-on] and [https://github.com/simboden/BVtkNodes original version for 2.7] - Use Blender for running VTK pipelines for post-processing (warning: experimental). There is [https://blenderartists.org/t/bvtknodes-gallery/1161079 example gallery of visualization results at BlenderArtists].
 
* [https://github.com/tkeskita/io_mesh_vtk VTK polydata surface mesh Import-Export Add-on for Blender]
 
* [https://github.com/tkeskita/io_mesh_vtk VTK polydata surface mesh Import-Export Add-on for Blender]
  

Latest revision as of 14:28, 11 November 2023



1 Introduction

Blender is the free open source 3D content creation suite, available for all major operating systems under the GNU General Public License. This page lists links for using Blender with/for OpenFOAM.


Most of Blender features are targeted for 3D artists. For OpenFOAM users, the most interesting Blender features include polygon surface mesh modelling, photo-realistic visualization, animation, and Python programming interface (for automation and creating add-ons that extend the software). Pros of Blender include a large on-line community, lot of on-line material, and add-ons. Cons of Blender include a steep learning curve, and fast changing / evolving software (tutorials get outdated quickly). It is suggested to use the latest Blender LTS version to avoid compatibility issues.

2 Learning Blender

Links for OpenFOAM users to get familiar with Blender:

3 List of links

Wiki pages for using Blender with OpenFOAM:

  • Unstructured Grids Addon for Blender
  • SnappyHexMesh GUI Addon for Blender
  • SwiftBlock - An addon for Blender acting as a GUI for creating the dictionary blockMeshDict, that lets the user create the desired hexahedral block structure as a mesh object within Blender 3D.
  • SwiftSnap - Another addon for Blender that acts as a GUI for creating the dictionary snappyHexMeshDict, that lets the user have full control over how and which feature lines are provided to snappyHexMesh. Further, the addon utilises Blender materials to let the user specify patches' names, resolution settings and mesh wall layers.


Blender related links outside wiki which OpenFOAM users may find useful:

4 Old information

Here is a complete reference list of wiki pages that describe how to use Blender with/for OpenFOAM:


4.1 Render OpenFOAM solutions with Blender

All who are interested for rendering numerical solutions using Blender can start with the following scripts build by T. Holzmann: Blender Scripts You will find two python scripts. One is for Paraview (export x3d scenes) that is not complicated. The other one is used by Blender. You have to modify the Blender script in a way that it fit to your simulation and exported x3d scene. Good luck and have fun.

4.1.1 General proceeding

  • Run your simulation
  • Open Paraview and create your scene (save view)
  • Modify the paraview.py python script
  • Run the paraview.py script to export all timesteps (or only one time step) as *.x3d file(s)
  • Modify the blender.py python script that it fit to your simulation
    • Tipp: Start without the loop (500 replaced with 1) and see how the script works
    • Tipp: Uncomment the last lines in the script (remove files and rendering)
    • Take a half day and watch tutorials for Blender (to get a bit more familiar), I recommend Jacob Lewis
  • After the python script works well and like you want, take a rest and render the guys