Example Code

3D Picture Control - Create a Moving Texture Using a Series of Images Using LabVIEW

Products and Environment

This section reflects the products and operating system used to create the example.

To download NI software, including the products shown below, visit ni.com/downloads.

    Software

  • LabVIEW

Code and Documents

Attachment

Overview

This VI uses a series of JPEG Images to create a moving texture

 

Description

There are several ways to create a moving texture in the LabVIEW 3D picture control, each with pro's and con's. This method loads a series of JPEG images and stores the data for every image in an array before the main loop.

The advantage of this is the data is already stored in memory which allows the image to be updated very rapidly without much of a performance hit, this is due to very little processing required within the main loop.

The disadvantage of this method is that it requires a series of images, and will take up a large amount of memory depending on the number of images.

The code loads any JPEG images that are located in the same folder as the VI so leave the unzipped file structure intact, or modify the code to point at the correct series of images.

This is a simple demo using a sphere and (a rather bad!) video to create a rotating earth with the weather clouds moving.

 

Requirements

LabVIEW Full Development System 2012 (or compatible)

 

Steps to Implement or Execute Code

  1. Run the VI
  2. Use Rotation Speed and Texture Update Speed Picture Controls
  3. To stop the VI, press the Stop button

Additional Information or References

VI Block Diagram

3d.png

 

To convert any AVI file to a series of images, take a look at 

Convert AVI File to Series of JPEG Images

 

**This document has been updated to meet the current required format for the NI Code Exchange. **

------
John.P | Certified LabVIEW Architect | NI Alliance Member

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.

Comments
one3seven5
Member
Member
on

can i use this VI for simulation??