Hi,<br><br>I&#39;ve been trying for a couple of days to draw an Unstructured Grid of vtkTetra points that I was previously drawing using volume render, but now want to draw using &quot;normal&quot; rendering because I want to be able to use the VRML exporation functionality. I&#39;ve tried a lot of things, but the simplest thing (that I don&#39;t understand why it doesn&#39;t work) is the following code, which draws absolutely nothing. I&#39;m confident that the rendering code is correct, because if I replace the visualization pipeline code with the &quot;combxyz.bin&quot;, &quot;combq.bin&quot; vtkPLOT3DReader to vtkContourFilter example (i forgot the filename), I see the graph appear. Clearly what I&#39;m doing doesn&#39;t work, but it would help me learn VTK if someone would explain what my code ACTUALLY does in the background (and hence why it fails):<br>
<br>=== start of code ===<br><br>    // Create the UNstructured grid for the 3D model<br>    vtkUnstructuredGrid *ugrid = vtkUnstructuredGrid::New();<br>    vtkPoints *tetraPoints = vtkPoints::New();<br>    vtkDoubleArray *scalars = vtkDoubleArray::New();<br>
<br>    // generate 3D model<br>    for (int p = 0; p &lt; m_fusion-&gt;GetNumPoints(); p++)<br>    {<br>        vtkTetra *aTetra = vtkTetra::New();<br><br>        CEvidencePoint *pt = m_fusion-&gt;GetPoint(p);<br>    <br>
        if (pt == NULL)<br>            continue;<br><br>        if (pt-&gt;evidence_for &lt; 0.0)<br>            pt-&gt;evidence_for = 0.0;<br><br>        if (pt-&gt;evidence_for &gt; 1.0)<br>            pt-&gt;evidence_for = 1.0;<br>
<br>        tetraPoints-&gt;InsertPoint((p * 4) + 0, (double)((pt-&gt;x * DEFAULT_X_WIDTH) / x_dim) + 0.0,<br>            ((pt-&gt;y * DEFAULT_X_WIDTH) / x_dim) + 0.0,<br>            ((pt-&gt;z * DEFAULT_X_WIDTH) / x_dim) + 0.0);<br>
        scalars-&gt;InsertValue((p * 4) + 0, pt-&gt;evidence_for * 100);<br><br>        tetraPoints-&gt;InsertPoint((p * 4) + 1, (double)((pt-&gt;x * DEFAULT_X_WIDTH) / x_dim) + 1.0,<br>            ((pt-&gt;y * DEFAULT_X_WIDTH) / x_dim) + 0.0,<br>
            ((pt-&gt;z * DEFAULT_X_WIDTH) / x_dim) + 0.0);<br>        scalars-&gt;InsertValue((p * 4) + 1, pt-&gt;evidence_for * 100);<br><br>        tetraPoints-&gt;InsertPoint((p * 4) + 2, (double)((pt-&gt;x * DEFAULT_X_WIDTH) / x_dim) + 0.5,<br>
            ((pt-&gt;y * DEFAULT_X_WIDTH) / x_dim) + 1.0,<br>            ((pt-&gt;z * DEFAULT_X_WIDTH) / x_dim) + 0.0);<br>        scalars-&gt;InsertValue((p * 4) + 2, pt-&gt;evidence_for * 100);<br><br>        tetraPoints-&gt;InsertPoint((p * 4) + 3, (double)((pt-&gt;x * DEFAULT_X_WIDTH) / x_dim) + 0.5,<br>
            ((pt-&gt;y * DEFAULT_X_WIDTH) / x_dim) + 0.5,<br>            ((pt-&gt;z * DEFAULT_X_WIDTH) / x_dim) + 1.0);<br>        scalars-&gt;InsertValue((p * 4) + 3, pt-&gt;evidence_for * 100);<br><br>        for (int i = 0; i &lt; 4; i++)<br>
            (aTetra-&gt;GetPointIds())-&gt;InsertId(i, (p * 4) + i);<br><br>        // add voxel to the list<br>        ugrid-&gt;InsertNextCell(aTetra-&gt;GetCellType(), aTetra-&gt;GetPointIds());<br>        <br>        ugrid-&gt;SetPoints(tetraPoints);<br>
        (ugrid-&gt;GetPointData())-&gt;SetScalars(scalars);<br><br>        aTetra-&gt;Delete();<br>    }<br><br>    // transform to poly data<br>    vtkUnstructuredGridGeometryFilter *ugrid_to_poly = vtkUnstructuredGridGeometryFilter::New();<br>
    ugrid_to_poly-&gt;SetInput(ugrid);<br>    ugrid_to_poly-&gt;Update();<br><br>    vtkPolyDataNormals *normals = vtkPolyDataNormals::New();<br>    normals-&gt;SetInputConnection(ugrid_to_poly-&gt;GetOutputPort());<br>    normals-&gt;SetFeatureAngle(45.0);<br>
<br>    vtkPolyDataMapper *mapper = vtkPolyDataMapper::New();<br>    mapper-&gt;ScalarVisibilityOn();<br>    mapper-&gt;SetInputConnection(normals-&gt;GetOutputPort());<br>    mapper-&gt;SetScalarRange(0.0, 1500.0);<br>    mapper-&gt;SetScalarModeToUsePointData();<br>
    mapper-&gt;ColorByArrayComponent(&quot;Velocity Magnitude&quot;, 0.0);<br><br>    vtkActor *graph = vtkActor::New();<br>    <br>    graph-&gt;SetMapper(mapper);<br>    graph-&gt;SetNumberOfCloudPoints(1000.0);<br><br>
    this-&gt;Props-&gt;AddItem(graph);<br><br>== end of code ==<br><br>I can also confirm that there ARE points of data (m_fusion-&gt;GetNumPoints() &gt; 0) because the exact same code was correctly generating my unstructured grid when it was rendered using volume rendering.<br>
<br>I also tried without the vtkPolyDataNormals (not sure why it&#39;s even there anyway), and I get some assert on a ComputeBounds() somewhere in the rendering code.<br><br>Thanks,<br>Simon<br>