### "Chrome" Material

There are no stupid questions, just stupid answers.

#### "Chrome" Material

subabrain
Posts: 190
Joined: Sat Aug 20, 2016 4:58 pm

Hello together,

i have a question to you again

So now i try to make a "chrome" effect material on a shape in torque 3d.
Ive read some things but i dont get the key to work. So i have to use shaders but how can i do that - there is no good tutorial about that.

Would be nice if you could help me

Thanks a lot!

Greetings
Robert

#### Re: "Chrome" Material

Duion
Posts: 1047
Joined: Sun Feb 08, 2015 1:51 am

Two options:
1: Wait for 4.0 with PBR which will more accurately simulate material effects by default. -Takes long and is difficult.
2. Use a cubemap for reflections, this will simulate something being metallic and use lots of specular. -This is fast and easy.

Also remember that to use cubemap reflections you need an alpha channel in the diffuse texture, that will determine how reflective somehing is. I don't know if more transparency made it more reflective or less reflective, but you can just try it out, it was a weird system, but don't invest too much into it, since I think it will get replaced relatively soon or at least it should.

#### Re: "Chrome" Material

subabrain
Posts: 190
Joined: Sat Aug 20, 2016 4:58 pm

Hello Duion,

Thanks a lot! I think ill try it with the cubemap - but theres one strange thing.
If i try to modify the cubemap i cant select the cubemap - its not visible to see the cubemaps - but only with the precompiled version its shown - why that?

I dont know what to do - maybe you can help me?

Thanks!

Greetz
Robert

#### Re: "Chrome" Material

Duion
Posts: 1047
Joined: Sun Feb 08, 2015 1:51 am

Maybe you broke it, you would have to document the exact steps you did to find out what went wrong.
The cubemap editor is known to be a bit complicated.
Try just adding the default skybox cubemap to a material to see if it works, without messing with cubemaps at all. In the material settings you can just apply an existing cubemap for reflections, just pick one there, do not edit them.

#### Re: "Chrome" Material

Johxz
Posts: 441
Joined: Sat Feb 07, 2015 11:37 pm
The dev branch have a broken GUI for the cubemap.

You can still use it with TorqueScript perfectly.

1) define a material, 2) define a cubemap.
singleton Material( DesertSkyMat )
{
cubemap = DesertSkyCubemap;
materialTag0 = "Skies";
};

singleton CubemapData( DesertSkyCubemap )
{
cubeFace[0] = "./cubemap/skybox_1";
cubeFace[1] = "./cubemap/skybox_2";
cubeFace[2] = "./cubemap/skybox_3";
cubeFace[3] = "./cubemap/skybox_4";
cubeFace[4] = "./cubemap/skybox_5";
cubeFace[5] = "./cubemap/skybox_6";
};
Last edited by Johxz on Wed Jan 31, 2018 10:59 pm, edited 1 time in total.

#### Re: "Chrome" Material

subabrain
Posts: 190
Joined: Sat Aug 20, 2016 4:58 pm

hi,

thank you very much - now i know that i'm not alone
and of course thanks for the answer!

ill try

Thx and greetz
Robert

#### Re: "Chrome" Material

JeffR
Steering Committee
Posts: 834
Joined: Tue Feb 03, 2015 9:49 pm

Yeah, the cubemap editor UI being buggy was noted by Bloodknight. I've looked into it and started fixing it up, but I'm not quite done yet.

For now, defining it in script as @
Johxz
said is a good workaround.

#### Re: "Chrome" Material

subabrain
Posts: 190
Joined: Sat Aug 20, 2016 4:58 pm

hi there,

ok i think there are more bugs in the gui - f.e. to delete some elements in the scene, to delete it with the options menu (right click) isnt working ... but the good answer is that it works good with reflection
singleton CubemapData( DesertSkyCubemap )
{
cubeFace[0] = "./art/skies/Desert_Sky/cubemap/skybox_1.png";
cubeFace[1] = "./art/skies/Desert_Sky/cubemap/skybox_2.png";
cubeFace[2] = "./art/skies/Desert_Sky/cubemap/skybox_3.png";
cubeFace[3] = "./art/skies/Desert_Sky/cubemap/skybox_4.png";
cubeFace[4] = "./art/skies/Desert_Sky/cubemap/skybox_5.png";
cubeFace[5] = "./art/skies/Desert_Sky/cubemap/skybox_6.png";
};
...

i did this - thanks a lot!

Greetz
Robert

#### Re: "Chrome" Material

Duion
Posts: 1047
Joined: Sun Feb 08, 2015 1:51 am

An additional tip, the default skybox may not fit your scene for reflections on your objects, but what you can do is make a generic cubemap without much detail, that way it still looks like metallic reflections, but you no longer notice that much that the cubemap does not fit the environment.

#### Re: "Chrome" Material

Timmy
Posts: 360
Joined: Thu Feb 05, 2015 3:20 am
It should be pointed out that if you are using the development branch i added support for dds cubemap files
singleton CubemapData( MyCubemap )
{
cubeMap = "path/to/my/cubemap.dds";
};
I totally forgot to post about this before, i can post further instructions if anyone is having trouble creating the cubemap file.

#### Who is online

Users browsing this forum: No registered users and 1 guest