Dynamic Cubemap on TestSphere
by Gordon Walton · in Torque Game Engine Advanced · 11/25/2005 (8:36 am) · 5 replies
I added the TestSphere from the Torque Features demo to my own world. When i enter the world, i don't see the cubemap i get a solid blue texture. I can't find what makes this work in the features demo. Has anyone got any ideas? I've checked the materials and datablocks and that all seems to be fine.
About the author
#2
11/29/2005 (1:17 pm)
Yes i have checked the log, everything seems to load but the cubemap doesn't appear. I even tried moving the materials/scripts from demo to the water demo and i get the same results.
#3
Edit: Wait my build is acting up too.. not showing a true reflective... Looking at the problem again.
11/29/2005 (1:31 pm)
You might need the materials code .. I copied this from the demo materials.csQuote:// cube & tendril test
//
//*****************************************************************************
// Sphere
//*****************************************************************************
new Material(SphereGlow)
{
mapTo = sphere_metal;
baseTex[0] = "~/data/shapes/test/blobtex1";
emissive[0] = true;
glow[0] = true;
};
new Material(SphereKnobGlow)
{
mapTo = sphere_rubber;
baseTex[0] = "~/data/shapes/test/glowGrad";
emissive[0] = true;
glow[0] = true;
animFlags[0] = $scroll;
scrollDir[0] = "0.0 -1.0";
scrollSpeed[0] = 0.2;
};
new CustomMaterial( DynCubeSphereFallback )
{
texture[0] = "$dynamicCubemap";
shader = ReflectSphere1_1;
version = 1.1;
};
new CustomMaterial( DynCubeSphere )
{
mapTo = sphere_reflect;
texture[0] = "$dynamicCubemap";
shader = ReflectSphere;
version = 2.0;
fallback = DynCubeSphereFallback;
};
new CustomMaterial( TendrilFallback )
{
texture[0] = "$backbuff";
shader = TendrilShader1_1;
specular[0] = "1.0 1.0 1.0 1.0";
specularPower[0] = 16.0;
refract = true;
version = 1.1;
};
new CustomMaterial( Tendril )
{
mapTo = sphere_refract;
texture[0] = "$backbuff";
shader = TendrilShader;
specular[0] = "1.0 1.0 1.0 1.0";
specularPower[0] = 16.0;
refract = true;
version = 2.0;
fallback = TendrilFallback;
};
Edit: Wait my build is acting up too.. not showing a true reflective... Looking at the problem again.
#4
half is just the texture.
Edit: Added image
11/30/2005 (11:56 am)
Ok I took out the fallback for the DynCubeSphere and fixed it at sm2.0. Half of the sphere is reflective now and the otherhalf is just the texture.
Quote:new CustomMaterial( DynCubeSphere )
{
mapTo = sphere_reflect;
texture[0] = "$dynamicCubemap";
shader = ReflectSphere;
version = 2.0;
};
Edit: Added image
#5
09/09/2006 (8:13 pm)
In case anyone runs into this problem again, it appears that you need to set dynamicReflection = true; within the object's datablock, for example:datablock ItemData( TestSphere )
{
shapeFile = "~/data/shapes/test/sphere_all.dts";
dynamicReflection = true;
};
Torque Owner Vashner