Game Development Community

Reflection

by Barry Gallagher · in Torque Game Engine Advanced · 05/08/2007 (4:24 pm) · 8 replies

All I really want to do is apply a reflection/environment map to a dts model of a window in TGEA. Thing is I cant apply environment maps to anything that isnt a vehicle or player.

Plan B is to do this with shaders... Is there a stock shader suited to this?

#1
05/08/2007 (11:09 pm)
There is reflection that you can do with the shaders that come with TGEA, look at the examples and you will see there is stuff like what you want to do in the materials scripts. I would just play with the blobs in the demo, and keep switching out the effects calls in their perspective materials scripts, you'll find it im sure. If you cant I will check back in if you update your progress here, and I will make a script for you and provide a model if you want for a demo:) Good Luck, and for a slightly quicker response...my email is lmaceleighton@msn.com
#2
05/09/2007 (7:14 am)
All I want to do is add reflection to a texture called "window.jpg" which is applied to a dts window model named "window.dts" .

here is an example of what I tried earlier with no success.
I added what is below to a material.cs file in the same folder as the window model.

Quote:
datablock CustomMaterial( ReflectBumpMat )
{
texture[1] = "$backbuff";
texture[0] = "~/data/interiors/House_of_future/Dts_Models/window";
shader = ReflectBump;
version = 2.0;
planarReflection = true;
};
#3
05/09/2007 (7:15 am)
Im not really set on any method. Reflection of any kind would be good.
#4
05/09/2007 (8:43 am)
Okay I have done some more research and now realise I also have to define the material in materialmap.cs ..

I dont actually have that file in my demo/data folder .. should I create it? ..or has the technique changed.

Another question is do I have to use Png instead of Jpg when applying shaders.
#5
05/12/2007 (2:53 am)
You can use either:)
#6
05/12/2007 (5:59 am)
Png is a far superior format though.
#7
05/12/2007 (7:33 am)
With bigger sized bitmaps...
#8
05/13/2007 (1:45 am)
Whenever you need the correct color not some strange approx through wavelets