Forum

Node Change Color

19 February 2016 17:07
up :)
19 February 2016 17:44

I finally reproduce the issue
.blend attached

I thnink there's something i'm doing wrongly
Yes, you have been misguided by the Color node. I think you don't understand what it exactly do. It transfer only color not it's saturation, so the saturation of the color will be ignored.

Blend4web and that kind of thing.
19 February 2016 18:05
Thanks again for your quick reponse, i try to finish this point before the week end.
Now i understand well.

So maybe i'm on the wrong way, my purpose is to change an object color by javascript (color given by a colorpicker HTML).
Any advice?
19 February 2016 18:14
So maybe i'm on the wrong way, my purpose is to change an object color by javascript (color given by a colorpicker HTML).
Any advice?
See this code example to get an idea how to change material params in runtime:
https://www.blend4web.com/apps/code_snippets/code_snippets.html?scene=material_api
The Founder | Twitter | Facebook | Linkedin
19 February 2016 18:35
perfect.
I have see it, without noticing it was what i was looking for.
Diffuse color is the thing i was looking for.

Thanks.
04 August 2016 07:41
Hi Roman Sementsov,

i want to change the diffuse color color of the material.
The console message shows the following error
[Couldn't not set property "diffuse color"! error]
when try to change diffuse color,

Pls help me,thanks in advance
04 August 2016 09:41
Hi

Hi.

Be sure that your object is dynamic (enable the Force Dynamic Object property on the object properties panel). Also take a look at this example.
You need the following code line:
m_mat.set_diffuse_color(cube_diffuse_color, "mat_diffuse_color", [0.5,0,0]);


And don't forget, that r,g,b values should be < 1 and > 0
05 August 2016 02:30
Thank you for reply,

It really works[Enable the Force Dynamic Object property]
05 August 2016 08:03
Hi. I have tried to change the color of the object. (With node)
I add here an example and source code.
http://naviris.ru/

I'm sorry for my bad English…
05 August 2016 08:29
hi,
I want to update the Annotation's title,description using API.
pls help me,
Thanks in advance
 
Please register or log in to leave a reply.