NI Home
Cart Cart | Help
Company Events Academic NI Developer Zone Support Solutions Products & Services Contact NI MyNI

Currently Being Moderated

Using the 3D Picture Control 'Create Height Field VI' to convert a 2D image into a 3D textured heightmap

VERSION 5

Created on: May 12, 2009 9:51 AM by John.P - Last Modified:  Jun 29, 2009 4:23 AM by AshishN

Functional Description

 

This VI is an example of using the 3D picture control and the Create Height Field VI to convert an image into a 3D height map.

The original image is analyzed and each pixel is converted to a height based on its colour: pure white will be the highest point on the map, pure black the lowest.

This data is then passed into the Create Height Field VI to create a height map of the original image.

 

The object and camera are positioned so the object is clearly visible when the program starts

 

A series of textures are also loaded and depending on a front panel control, different textures can be applied to the object while the program is running.

3d heightmap.JPGtc.JPG

Feedback welcome. Block Diagram has been also attached as a picture file.

 

Caveats and Additional Notes

The texture is applied on ever iteration of the loop, this is just to keep the example simple but in a larger application it would be worth some additional code to only apply a texture when a new one has been selected.

 

Average User Rating
(2 ratings)




There are no comments on this document

More Like This

  • Retrieving data ...