3D Customizer: Colors, Patterns

I will have graphic designers draw an awning to use in the project. However, I do not know how to change the colors and patterns of the 3D image in the project. Does the graphic designer need to draw all color and pattern combinations, or


can we adjust situations such as color options in the project ourselves?

Hi @Batuhan, thank you for getting in touch.
You can change the color of specific materials using Parameters.

Viewer3d.materialParameter("nameOfMaterial", "color", "(255, 0, 0)")

Looking at your screenshot, I’m not sure if your 3d model has dedicated materials for the individual parts of the awning. Feel free to attach your model so we can have a look into it.

Hope this helps!

Regards,
David

Thanks David, you can see my awnings details in image. I could not change that

image

Hi @LEI any update for my question?

Hi @Batuhan,
Sorry for not getting back to you sooner.

Please keep in mind that the materialParameter expects the first parameter to be the name of the material - not of the mesh.
In your particular case you are trying to change the color of the Object_3 material which most likely doesn’t exist in your model.

Hope this helps!

David

I get an error like that @LEI

Hi @Batuhan,

just replace nameOfMaterial with the name of the material assigned to the Object_3 mesh.

Okay it fixed. But i need some info. about changing materials. When i click the munster buttons it should be change color. How can i connect them.


Hi @Batuhan,

I suppose your myColorSelection component holds some kind of rgb or hex value? If so you can simply use this component within your materialParameter.

So instead of

Viewer3d.materialParameter("nameOfMaterial", "color", "(255, 0, 0)")

it could be something like this. (depending on how your columns are named)

Viewer3d.materialParameter("nameOfMaterial", "color", myColorSelection.hexValue)

Regards,
David

Hi again @LEI. No myColorSelection just an image list. I should change the color(3D Model) just before you wrote. I add some information about that. Sorry about much questions :slight_smile:

If it is okay for you we can quick meet and then fix that.

@LEI Any update David?

Hi @Batuhan,
I guess this question is resolved now as you had a call with one of my colleagues yesterday?

Regards,
David