Game Development Community

[Beta 2 Bug] Reflections section in Material Editor is not working

by Tobias B. · in Torque 3D Professional · 05/29/2009 (12:47 am) · 6 replies

Hi,

I just started to play around with The T3D Beta 2.

One point I don't get: I need some reflections, e.g. on a simple sphere. I imported a simple COLLADA sphere which displays fine. Originally, it had no textures but only a diffuse color. Optionally, I created a simple PNG texture.

My goal is to get some reflectiveness onto the cube, but I don't know how to get this. There is a section "Advanced Properties" in the Material Editor, and I can select some shaders under "Reflection Mode". Addtionally, there is a blank field plus an "Edit" button, denoted "Cube Map".

The material editor seems no to be finished in the reflections section: Choosing cubeMap reflections, it adds the following line to the material.cs:

cubemap[0] = "matEd_staticCubemapTextCtrl";

This seems to be crap.

Replacing the line (by manual editing!) by
...
new CubemapData( mySkybox )
{
cubeFace[0] = "art/skies/cubemap/skybox_1";
cubeFace[1] = "art/skies/cubemap/skybox_2";
cubeFace[2] = "art/skies/cubemap/skybox_3";
cubeFace[3] = "art/skies/cubemap/skybox_4";
cubeFace[4] = "art/skies/cubemap/skybox_5";
cubeFace[5] = "art/skies/cubemap/skybox_6";
};
...
cubemap[0] = "mySkybox";

works perfectly.

How will be the workflow to specify skyboxes in the material editor? Will it be possible to define the cubeMap via the editor? That would be helpful.

Additionally, planarReflections also seems to be unimplemented! In fact, this is the feature I was originally interested in.

Thanks for help,

Tobias


#1
05/29/2009 (9:08 am)
Quote:How will be the workflow to specify skyboxes in the material editor? Will it be possible to define the cubeMap via the editor? That would be helpful.

Edit specifically the material and Yes. We're working on it right now.
#2
06/02/2009 (12:32 am)
Hi,

and thanks for the quick (and positive!) answer.

Just to close the topic: Originally I tried to get planar reflections working - will this also be part of the functionality of the Material Editor?
#3
06/03/2009 (1:28 pm)
I believe the planar reflection flag is for making Interior surfaces reflective, like a glossy tile floor. So just checking this box is definitely not going to make an arbitrary mesh using that material reflective.

However planar reflective Interior surfaces are "also" broken, so I would guess this is still on the to-fix list.
#4
06/03/2009 (1:40 pm)
Tobias,
a few days ago i shared a shader, an example of environment cubic reflection.
Search for a thread,called "Shader Documentation" in T3D section.
That's exactly what you are searching for.
#5
06/04/2009 (8:44 am)
@Picasso: Thanks for that - I will test that code for my purpose, but it sounds great! One question which comes to my mind - I'm not really familiar with shader programming: Wouldn't it be helpful if one could choose the (custom) shaders applied to a material via the editor?

@James: In TGEA I got planar reflections working just by editing the material - the respective surfaces looked like mirrors. As far as I get it, checking the box should do it...? If not, why not?
If there is something broken, maybe we should post it as a separate bug report - what do your think?
#6
06/04/2009 (12:44 pm)
I already have a task logged THREED-453 - for working on dynamic cubemap and planar reflections. When I get to the planar reflections part I'll definitely have to take a look at how it was working in TGEA, just haven't gotten that far yet - thanks!