![]() |
|
|
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.
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.
There are no comments on this document