LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

3D Picture: Applying Different Textures to Faces of a Cube

Solved!
Go to solution

I would like to create a fancy splash screen that consists of 4 different images applied to vertical faces of a parallelepiped (using 3D picture controls). Periodically this parallelepiped will rotate smoothly around its vertical axis. I have two questions about it:

 

1. I've been able to apply one image as a texture to a parallelepiped or a cube ("as a decal"), but this image repeats itself. Is it possible to have different textures applied to different faces?

2. How can I ensure that when a face of the parallelepiped is looked at orthogonally, the picture is pixel-perfect - no resampling, no perspective?

 

Thanks,

 

Sergey

0 Kudos
Message 1 of 20
(5,933 Views)

I figured out how to get rid of perspective - set AutoProjection property of the 3D picture indicator to "none". The other questions still remain: how to apply different textures to different faces of the cube and how to make them map 1 to 1 in terms of image pixels and 3D indicator pixels.

 

Thanks!

 

Sergey

0 Kudos
Message 2 of 20
(5,926 Views)

I guess I should use a quad mesh... Sounds like a pain to program!

0 Kudos
Message 3 of 20
(5,923 Views)

Haha! Sounds like you answered your own questions. I just wanted to let you know that I read your posts and I'm happy to help if you have more questions!

0 Kudos
Message 4 of 20
(5,909 Views)

@Kevin H. wrote:

Haha! Sounds like you answered your own questions. I just wanted to let you know that I read your posts and I'm happy to help if you have more questions!


Where can I find an example of a quad mesh?

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 5 of 20
(5,907 Views)

https://www.ni.com/docs/en-US/bundle/labview/page/using-meshes-to-draw-3d-objects.html

 

See that for a good reference on meshes.

 

https://www.ni.com/docs/en-US/bundle/labview/page/changing-the-surface-appearance-of-a-3d-object.htm...

 

See that for information on texture application.

 

On top of that, make sure to consult the LabVIEW help on all the VIs you're using! They're very useful resources when you get stuck!

 

Let me know if that isn't specific enough or doesn't answer your question!

0 Kudos
Message 6 of 20
(5,902 Views)

I couldn't find a particular example of a Quad Mesh in LabVIEW. It's just a Polygon Mesh (http://en.wikipedia.org/wiki/Polygon_mesh) consisting of quadrilaterals if I understand correctly. The term is indicitive of the structure of the mesh, not of a particular VI or example beyond normal mesh building and texturing.

0 Kudos
Message 7 of 20
(5,900 Views)

Hi Kevin,

 

If you happen to have an example of creating a quad mesh with textures (ideally a cube), could you post it? That would save me a lot of time... If not, I guess I'll have to bite the bullet and do the grunt work myself 😞

 

Thanks,

 

Sergey

0 Kudos
Message 8 of 20
(5,892 Views)

The second link I linked (https://www.ni.com/docs/en-US/bundle/labview/page/changing-the-surface-appearance-of-a-3d-object.htm...) has a picture of a VI in it (which I, strangely, could not find in actual code form) which will texture a cube. Or was that not what you were looking for?

0 Kudos
Message 9 of 20
(5,888 Views)

This example applies one texture to all faces of a cube, cube generation is prepackaged. If I want to apply a unique texture to each face of a cube, I'll need to do low-level programming (definition of cube vertices, etc)...

0 Kudos
Message 10 of 20
(5,881 Views)