cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Adding a background image to a modelitem

Highlighted
Level 7

Adding a background image to a modelitem

Hi,

 

I am wanting to add (wrap around) a png picture to a specific part of my model to act as a brand logo.

 

From my experience textures/decals don't play nice when transferring from creo to studio, so I am attempting to do this through studio by using the model-item widget to position the picture in the correct place.

However I have notice model-item does not have class property and so I cannot write CSS to apply a background-image to it.

 

Is there any way, or another method, to wrap an image around a model (cylindrical shape) so it can act as a brand logo label.

 

Thanks in advance,

Atif

3 REPLIES

Re: Adding a background image to a modelitem

If you were trying to apply this image to a planar surface you could achieve what you want by adding a "3D image" with your branding and then placing it just above the surface you want it on.

 

But if you want this on a non-planar surface there if no way to do it in Studio. You will need to apply the image texture in something like Blender or 3DSMax and then export and obj with texture files out of that and import into Studio.

Re: Adding a background image to a modelitem

Texture images can be made to work from Creo into Vuforia Studio, but there's a bit of noodling involved. Here's what I've found about using textures in Creo:

 

1) Textures must be applied at the Part level, not at the Assembly level. If you apply appearances (including textures) at the assembly level, Vuforia Studio will ignore them. In Creo, you need to open the Part in its own window, apply the appearance/texture, save, close, and update the assembly. Then the texture will stick when you save as PVZ and load it into either Creo Illustrate or Studio.

2) You need to modify the "export to CreoView" recipe in Creo to tell it to include textures in the resulting PVZ, and you need to add a Creo configuration parameter to tell it to store texture image files with the PVZ. You can find more information about this here: https://www.ptc.com/en/support/article?n=CS75925&language=en&posno=3&q=texture%20pvz&source=search

3) DO NOT use the CAD optimizer when reading the PVZ into Vuforia Studio. For whatever reason, the CAD optimizer strips out textures, so make sure it's switched off when loading your PVZ into Studio.

Re: Adding a background image to a modelitem

To add to @ClayHelberg's comments, there is a way to use the CAD optimizer but keep the textures on a single part, but it's a bit of a manual hack.  I've had to use this method when I had a really big PVZ file that I needed to run the CAD optimizer on the get the file size down, but wanted to have a couple of parts with textures.

 

The thing to remember is that a PVZ file is just a ZIP file with all the viewables contained inside.

 

So you can do the following:

  1. Upload your PVZ file and use the CAD optimizer to create the 3 versions - high, medium and low.
  2. Browse into the folder VuforiaStudio\Projects\<project_name>\src\phone\resources\Uploaded and copy out the optimized PVZ that you want to use and the original PVZ.
  3. Open up the original PVZ file in Creo View.  If you don't have it, you can download and install the free version Creo View Express from the PTC website here.
  4. Select the part that has the textures on it.
  5. Open the lower data panel (F7) and look for the OL File Name of the part
  6. Extract the original PVZ file into its own folder.  Now you should have a bunch of OL files that represent each part in the assembly.
  7. Copy the OL file of the textured part that you worked out in step 5 and add it into the optimized PVZ file and replace the file when asked - you've just replaced the optimized version that has no textures with an unoptimzed version that has textures.
  8. Copy the PVZ back into you Project folder and use that for the model widget.

 

Now you'll have a mainly optimized model that keeps the file size small, but still has the textures on the parts that you need them on.

 

I've also used this method where the optimization process removes too much detail on certain complex parts, so I put the original version into the optimized PVZ.  

 

In both cases it means you'll end up with a bigger PVZ file, but it has the details that you need in it.

 

Hope this helps.

 

Allan