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

Community Tip - Did you get called away in the middle of writing a post? Don't worry you can find your unfinished post later in the Drafts section of your profile page. X

How to add/change pictures on a model in TW Studio?

汐xie
5-Regular Member

How to add/change pictures on a model in TW Studio?

Hi,

We are now using ThingWorx studio to modify a panel model, and we want to add/change pictures on the panel surface.

We can add the picture to panel surface in Creo 2, but it can not be display in ThingWorx Studio. So our question is how can we add/change picture on a model in ThingWorx studio? Do we need install other TW tools for the action?

Thanks.

1 ACCEPTED SOLUTION

Accepted Solutions

You can use the 3D Image widget, place it on the panel surface and size it so that it fits the screen. If you want to change the image interactively e.g. with a button click, you have two options:

  1. you can add a second 3D image widget at the same place and toggle the visibility with the button. I'd use a ToggleButton for it (it has true/false values) and a binding filter (return !value;) if you have just two images.
  2. you can use javascript to change the src value of the 3D image and this way toggle the shown images. I'd recommend this approach if you have more than 2 images because you'll need javascript in this case anyways.

Cheers, moritz

View solution in original post

8 REPLIES 8
TajuJoseph
6-Contributor
(To:汐xie)

Hi I don't think we can export creo models with texture and decal image to a pvz file

Regards

Taju Joseph

汐xie
5-Regular Member
(To:TajuJoseph)

, How can I achieve the function... That is what we want to add in current model....Is there a tool to do this?

You can use the 3D Image widget, place it on the panel surface and size it so that it fits the screen. If you want to change the image interactively e.g. with a button click, you have two options:

  1. you can add a second 3D image widget at the same place and toggle the visibility with the button. I'd use a ToggleButton for it (it has true/false values) and a binding filter (return !value;) if you have just two images.
  2. you can use javascript to change the src value of the 3D image and this way toggle the shown images. I'd recommend this approach if you have more than 2 images because you'll need javascript in this case anyways.

Cheers, moritz

汐xie
5-Regular Member
(To:mvonhasselbach)

Hi,Moritz

Thanks for your reply.

Actually, I have ever tried your ways by using JS, but it only applys to a plane and it cannot cover perfectly or move with the model.

So,I think I have to temporarily give up.

Cheers.

there are ways to override textures down to the surface level using lower level javascript APIs, right down to being able to apply surface diffuse and composite decal textures etc.  the platform supports this, but its not exposed at a level that users can easily access (it is aimed at platform/widget developers)

 

so you don't have to give up as such, but you should probably start by explaining why this capability is needed - from there we can help you understand how to achieve what you want to achieve.

Hi Moritz,

I am currently trying to bring an image in 2d panel using image widget but finding difficulty to fit the image in the given area. Kindly let me know how we can size the image.

Thanks,

Avinash

Hi Avinash,

No sure to understand the context, but in a 2D panel you have two fields WITH & HEIGHT, do ot forget to indicate "px" for sizing

  Not Capture.JPG

Nithin
10-Marble
(To:汐xie)

How to change resource of 3d gauge randomly using script ? i.e change different color svg file by loading them to resource.
I am very new to javascript
Any help is much appreciated 

Top Tags