![]() ![]() To create a light source: light_data = ('light', type='POINT') Without a light source, when rendering in Blender, everything will be dark. In order to render a scene, we need a light source. ![]() There is definitely value in learning how to use this function for more complex meshes of your own design. You can always do it the hard way, by specifying the vertices and faces of the cube using the from_pydata function. To create a cube there is more than one way of doing it. I know that Blender already comes with a default cube, but since we want to learn Blender, better delete it, and create our own cube, right? To be able to use the Blender Python API you always need to import the bpy python library: import bpy Creating a cube the hard way And Then click New Importing bpy Python package The first thing to do is to open Blender and click on the scripting tab. Then I will show you how you can rotate a virtual camera around a cube and use it to render from 3D to 2D from different viewpoints using the Blender API. We will create a simple scene with a plane, a cube, texture, a light source, and a camera. In this article, I will show you how you can create a scene in Blender, using the Python 2.93 Blender API. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |