User can change colours on model

(Racecar) #1


I now I read somewhere about someone testing out how to present a model to a user and have them change colour as they navigate in the scene.
The test in question was actually a scene with several chairs and by clicking on colour buttons one would switch the visibility so that only the model with that colour would show. Anybody have the link to that demo?

Also, does anybody know if this is possible to do another way?

(Racecar) #3

And I just found it again...

(Bart) #4

You can access the live version here:

To see how it was done, just grab the code from Github.

(Racecar) #5

Cool! Thanks :smile:
Is this something you think "normal" users will be able to create sometime in the future?
Meaning, people without much knowledge with coding?


It's always going to require a little bit of coding, but I suppose someone could create a kind of system/GUI for others to build their own without coding.

(Klaasnienhuis) #7

Hey @racecar, I'm actually planning to build a such a tool, time permitting. It would be an expanded version of the 3dsMax exporter which generates the material variations and a basic html-page with the required code.

You'd set up the material variations in 3dsMax with a multi/sub material for instance. Each sub-material would then be converted to a material option. The result will be a basic html page with teh embedded model and a series of buttons to trigger the material changes.

Are there specific features you're thinking about?

(Racecar) #8

This seems like a great option! We do not use Max in our studio so I guess we will have to get our hands dirty when doing some tests.

Anyways, the idea for this is a very valuable add-on to Sketchfab. Especially when thinking about it in more business related 3D scenes like products and architecture. Making it easier for us users to achieve this (regardless of 3D software), I'm guessing would make this even more popular.

Looking forward to test this out

(Jrgration) #9

This sounds like an excellent contribution to the options already offered. I'd be very interested in using it for heritage visualisations. For instance to switch from one phase of a building / object to another, which could be done by switching between different colours / finishes.

(Klaasnienhuis) #10

I'm making good progress with my configurator generator called OptionsOptions (I'm open to ideas for a better name).

Currently it exports a scene from 3ds Max. Each multi/sub material is converted to an optiongroup (Pot, Ball and Box in this case). Each submaterial is converted to an individual option and used to change the diffuse color on the object. Once this thing is working smoothly I'm planning to add support for more material properties.

All material properties are formatted into a little webpage template with the iframe and a dropdown menu to configure the model. This page will be completely automatically generated, ready to go.

(Klaasnienhuis) #11

Well, this demo is coming together nicely. Here's a video showing the entire process, from uploading to configuring.

(Bart) #12

Hey Klaas, that's impressive! Will it also work for different objects, like giving him a different helmet or pose?

(Klaasnienhuis) #13

Thanks Bart.
Swapping objects isn't implemented but is of course possible. Though that will be harder for users to grasp. Making material variations with a multi/sub material is really easy to understand: a multi/sub material will be a group of options and each sub material is an individual option.
There isn't a similar process for objects. One idea is to group objects (helmets) together. The group in 3dsMax will ge a group of options and each individual group-member is an individual option. That could work actually but you have to make sure not to use any other groups for non-configuration purposes in your scene.
About the poses: do you mean animated poses? That would be very cool!

(Bart) #14

Hey Klaas!

yeah, agreed - the simplicity of the interface is a definite plus.

What are your plans for this? Is the demo available for users to try?

(Klaasnienhuis) #15

Still working on the script and documentation. Here's example output based on a model by

(Zargonstudios) #16

Is it possible to get something like this to work with Lightwave?

(Zargonstudios) #17

Hi, trying this with our own model exported from lightwave I can get it to kind of work.
It does change the material of the bench by selecting from the drop down, but you have to move the model after selection to get the color change to render.

We want to have a configurator option where you can change the material of the seat and the frame similar idea to the monkey head demo or the watch configurator demo. There is just not to much documentation on how to achieve that.

Specifically coming from lightwave. The prefix, node, objects, etc. How do I set/discover those so I can select them?

(Klaasnienhuis) #18

Yes, I've also noticed you sometimes need to move the model a bit to actually see the changes made through the viewer API. This seems to depend on the browser you're using.

Basically what I do when changing the materials is look for a specific material name. Loop over all materials in the sketchfab scene and find the one with the name you're looking for. Then apply your changes to that material. Although I haven't worked with hiding/showing options yet I assume it works the same way. This means you have to keep track of your object and material names very carefully.

(Stephomi) #19

It's probably a bug on our side, we'll look into it.


Yes, I've noticed it with supersampling, even when continuousRender is enabled.