LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

texturing vrml models

I'm trying to work with the 3d picture control:  I have some models built in vrml, and I'm importing them into labview successfully.  However, no textures specified in the wrml file appear on the objects.  So I tried the get.object invoke node, to just get the one part to apply the texture to...the part seperates, but no texture is applied.  So I tried creating a new object, and setting its geomtery to the geometery of the grabed object above...the geometry appears to set correctly, I have the new object, but again, no texture.  So I simply created a box and applied the texture - success - the box shows the texture.
 
I saw something on a search of this board that had texture setting to a vrml file, but when I downloaded that and ran it, then changed the color of the texture bmp from blue to red, the object changed just the slightest hint of a shade.
 
Included vrml import.zip with my test program, model and texture...the texture should be applied to index = 2
0 Kudos
Message 1 of 6
(4,040 Views)

I might have it partially figured out:  It appears that in the "load vrml" vi, that it creates a mesh out of the object verticies (no surprise here).  However, when it defines the mesh, it never defines the texture array.  So I wrote a vi to extract the texture array from the vrml file, and tied it to input on the define mesh invoke node and textures started showing.  I'm doing something wrong right now, because the texture is rotated/streached/distored, but I got something that shows up at least.  I'm going to keep chugging at it, but I don't know what else to say, except to NI, could you please fix this in a future release?

0 Kudos
Message 2 of 6
(4,033 Views)
Hi tiemanj,

Could you please post a screen shot of the rotated/streached/distored texture as well as the texture you are expecting to see? I would like to look into this. Thanks and have a great day!

Best regards,

Steven
0 Kudos
Message 3 of 6
(4,008 Views)
sorry for the delay.  I got it working by changing the texture from "clamp" to "repeat".  I don't know why that should make a difference, but it did.  If you still want pictures reply back.
0 Kudos
Message 4 of 6
(3,951 Views)

Hi tiemanj

I´m having a hard time here trying to open solidworks models with the 3d picture controls vi´s. Could you send me your working vi?

Thanks

Breno

0 Kudos
Message 5 of 6
(3,912 Views)

Hi tiemanj,

Nice work getting this to work.  Could you post your example of a vrml file with a working loading texture I would love to learn from it.  SS



0 Kudos
Message 6 of 6
(3,668 Views)