Scolring - Forum

Entraides et échanges autour de la technologie Scol - Informations and exchanges on the Scol technology

Vous pouvez changer la langue de l'interface une fois inscrit - You can change the language once registered

You are not logged in.

#1 2-Jul-2018 13:22:20

GeoffCtec3D
Member
Registered: 2-Jul-2018
Posts: 32

Plug it - Change Object color

Hello,

I'm currently using OpenSpace for my final projet in engineering. I have to create a full interactivity in our office's 3D model.
As an exemple I would like to change the color of the lights by clicking on the switch. I tried with the Material color Plug it, it works but unfotunately it turns on and off all the other lights of the project, which I d'ont want.
Could someone give me some tips on how to change the colors by objetc end not by material please?

Thank you verry much

Geoffrey

Offline

#2 2-Jul-2018 14:01:17

arkeon
Admin. / Scol language & OpenSpace3D developer
From: Nantes
Registered: 30-Mar-2009
Posts: 5,089
Website

Re: Plug it - Change Object color

Hello,

to change the light color you can use the object > light plugIT and use the "set diffuse" action
it takes an hexadecimal color input in the link parameter
ex: ff0000f for red 00ff00f for green, 0000fff for blue

Materials will use the light diffuse color to multiply their own diffuse colors.
So you don't need to change the materials.

Offline

#3 2-Jul-2018 14:26:40

GeoffCtec3D
Member
Registered: 2-Jul-2018
Posts: 32

Re: Plug it - Change Object color

Thanks for your response.

But It still doesnt work.
The problem is:
     - I create a light for the object I want to switch on.
     -It's one unique light I want to switch among many others.
     -I first created the switch with the Plug it Objetc click; sequence; light.
     -And then when I click on the switch its all the lights of the project that switch on and off therefore I didn't set them to.

After that I just tried to change it of color with the plug it Materila color, and then it went the same: every lights changed of color therefore I didn't set them.

Offline

#4 2-Jul-2018 14:35:40

arkeon
Admin. / Scol language & OpenSpace3D developer
From: Nantes
Registered: 30-Mar-2009
Posts: 5,089
Website

Re: Plug it - Change Object color

OS3D shaders only support a maximum of 3 lights on an object.
this means it will enable only the 3 lights near the object.

Maybe it should be easier to use only one light and change it's color ?

I'm not sure to understand your problem. can you send me the project ?

Offline

#5 2-Jul-2018 14:52:01

GeoffCtec3D
Member
Registered: 2-Jul-2018
Posts: 32

Re: Plug it - Change Object color

Ok Sorry I was't clear enough smile

It's an industrial pupose project. So visually I d'ont realy care to switch lights. What I want is to change the color of the object to indicate that the light is on or off. But there isn't a Plug it to change the color of the object apparently.
My project is made of four different rooms. Everey room got it's switches and lights.
I want to attribute to the switch it's corresponding light (which is an object that i want to change of color in my case).
I tried to change the color of the kitchen light by clickin on the switch. But all the lights of the project are taken in the loop.

I hope It's more clear smile

Offline

#6 2-Jul-2018 15:45:41

arkeon
Admin. / Scol language & OpenSpace3D developer
From: Nantes
Registered: 30-Mar-2009
Posts: 5,089
Website

Re: Plug it - Change Object color

Ho ok ^^
if you want the objets to change their colors indepently, you must have a different material name for each room.
Material parameters are shared between objects using the same material.
If you use a different material for each object or room object, you will be able to change the material color or texture in a room

Offline

#7 3-Jul-2018 07:41:58

GeoffCtec3D
Member
Registered: 2-Jul-2018
Posts: 32

Re: Plug it - Change Object color

Thank you verry much smile

Offline

#8 3-Jul-2018 12:09:13

GeoffCtec3D
Member
Registered: 2-Jul-2018
Posts: 32

Re: Plug it - Change Object color

Hello I would have some more questions about some other tasks that I m trying to make.
Would it be ok for you?

Offline

#9 3-Jul-2018 12:34:55

arkeon
Admin. / Scol language & OpenSpace3D developer
From: Nantes
Registered: 30-Mar-2009
Posts: 5,089
Website

Re: Plug it - Change Object color

sure please create new topics for new questions smile

Offline

Board footer

Powered by FluxBB