I have a very simple python script to generate planes in the scene. I want to generate 50000 planes in a scene, to compensate for unavailability of POINT primitive, so that i can render a point cloud. It runs at a good pace till 2000 th plane is added , then starts slowing down, and gets very slow. My computer's config is - i7 3.4 GHz, 16GB RAM, GeForce 9800 GTX graphic card.

here is the python script-

import bpy 
from math import *
import random

for i in range(2000):

Any Help on why it is slowing down? How can this be fixed ? Any alternate approach to render point cloud in blender? would be much appreciated...

Thanks for your time and attention

  • $\begingroup$ It would be better to use Instances, which use less memory (and may run faster too, but I haven't tested this). Probably the best way to do is by using Dupliverts to instance a tri to a point cloud object made up of verts. $\endgroup$
    – gandalf3
    Commented Mar 7, 2014 at 7:30

2 Answers 2


Dupli objects

Try using Dupliverts (instances):

  1. Create/import the point cloud as a mesh with only vertices:

    enter image description here

  2. Create a single tri by adding a plane (ShiftA> Mesh > Plane) and merging one edge with AltM:

    enter image description here enter image description here

  3. Parent the tri to the point cloud by selecting both objects with the point cloud active (last selected) and pressing CtrlP.

  4. With the point cloud active, enable Verts in Properties > Object > Duplication:

    enter image description here

  5. Add a track to constraint to the tri with the camera object as the target so that all the tris face the camera:

    enter image description here

This has performed fine for me with point/vertex clouds of over 7000 vertices. This will work with both BI and Cycles.


Another method for rendering point clouds is to use a Halo Material:

  1. Create/Import a point cloud as vertex only mesh (no edges or faces):

    enter image description here

  2. Create a Halo material:

    enter image description here

Note that this only works for BI.


The python script that i used earlier used a function call inside the loop


As a result of which the blender was updating the scene by iterating over all the previously existing objects in the scene in each loop iteration. Below link explains the problem and gives the solution.

Python performance with Blender operators


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .