question about Terrain shadows
by Mquaker · in Torque 3D Professional · 04/04/2011 (10:46 pm) · 18 replies

cast shadow of sun apply at all world
I hope
Does not Terrain render shadows to way?
(over figure)TSStatic same..
About the author
visit : http://www.quakedev.net
#2
Or are you trying to make a second terrain block that does not cast shadows underneath it ? If its the terrain, then I am pretty sure you cant without some some source changes.
04/05/2011 (3:26 pm)
If you do not want the shape to be affected by shadows/lighting, set the texture material to "emissive". That will stop your object from recieving shadow or any lighting other then i think off my head, the ambient level.Or are you trying to make a second terrain block that does not cast shadows underneath it ? If its the terrain, then I am pretty sure you cant without some some source changes.
#3
04/05/2011 (6:14 pm)
It appears that the OP wants to know why the TSStatic's castShadows property is unchecked when the sun's castShadows property is unchecked. This would be a strange way to have the sun stop casting shadows - by walking all objects and un-checking their castShadows property....
#4
Sorry for my bad english
I want to know is to avoid the terrain casting shadows.
04/05/2011 (6:39 pm)
Thanks Oscar Velzi , Andy Wright, Richard Ranft Sorry for my bad english
I want to know is to avoid the terrain casting shadows.
#6
04/05/2011 (7:44 pm)
You can find here Terrain Tiling / Shadow a small resource I did which removes the terrain shadow and also allows some terrain tiling in T3D
#7
04/05/2011 (9:06 pm)
So a question for everyone... should we add a 'NoShadows' option to TerrainBlock? In what cases would you not want shadowing from the terrain?
#8
04/06/2011 (2:32 am)
Yep, and if possible try to solve also the issue of light-map when tiling terrain ^_^
#9
The problem was solved by courtesy of Steve.
Thanks to you all.
04/06/2011 (7:37 am)
Thank you very much,Steve! The problem was solved by courtesy of Steve.
Thanks to you all.
#10
Almost as usual, I would say ;P
04/06/2011 (2:18 pm)
Quote:The problem was solved by courtesy of Steve
Almost as usual, I would say ;P
#11
04/06/2011 (8:42 pm)
@FrankQuote:try to solve also the issue of light-map when tiling terrainI don't think i know that issue... is there a forum thread for it?
#12
Just checkout link in reply #6, right here in this topic.
04/06/2011 (9:04 pm)
>I don't think i know that issue... is there a forum thread for it?Just checkout link in reply #6, right here in this topic.
#13
We already have that in our game. It's a top down / isometric game, and most terrain is flat, so shadows being cast by it it's not reflected anywhere.
04/06/2011 (10:47 pm)
Quote:So a question for everyone... should we add a 'NoShadows' option to TerrainBlock? In what cases would you not want shadowing from the terrain?
We already have that in our game. It's a top down / isometric game, and most terrain is flat, so shadows being cast by it it's not reflected anywhere.
#14
so i possible realtime enable/disable shadow for terrainblock shadow in worldeditor.
04/06/2011 (11:09 pm)
i added 'enableShadow' option to TerrainBlock used by Steve's Link.so i possible realtime enable/disable shadow for terrainblock shadow in worldeditor.
#15
init variable in terrData.cpp
add 'enableShadow' option field for TerrainBlock
add packdata for Net in terrData.cpp
add unpackdata for Net in terrData.cpp
edit render routine in terrRender.cpp
this code based Caylo Gypsyblood's resource.
04/06/2011 (11:29 pm)
declare variable in terrData.hF32 mSquareSize; bool menableShadow; // Mquaker :: Terrain Shadow Option PhysicsBody *mPhysicsRep;
init variable in terrData.cpp
TerrainBlock::TerrainBlock() : mSquareSize( 1.0f ), menableShadow( false ), // Mquaker :: Terrain Shadow Option mScreenError( 16 ),
add 'enableShadow' option field for TerrainBlock
// Mquaker :: Terrain Shadow Option >>>
addField( "enableShadow", TypeBool, Offset( menableShadow, TerrainBlock ),
"enable/disable TerrainBlock Self Shadow");
// Mquaker :: Terrain Shadow Option <<<
addProtectedField( "squareSize", TypeF32, Offset( mSquareSize, TerrainBlock ),
&TerrainBlock::_setSquareSize, &defaultProtectedGetFn,
"Indicates the spacing between points on the XY plane on the terrain." );add packdata for Net in terrData.cpp
if ( stream->writeFlag( mask & SizeMask ) )
stream->write( mSquareSize );
stream->writeFlag( menableShadow ); // Mquaker :: Terrain Shadow Optionadd unpackdata for Net in terrData.cpp
if ( stream->readFlag() ) // SizeMask
stream->read( &mSquareSize );
menableShadow = stream->readFlag(); // Mquaker :: Terrain Shadow Optionedit render routine in terrRender.cpp
this code based Caylo Gypsyblood's resource.
const bool isColorDrawPass = state->isDiffusePass() || state->isReflectPass(); if ( !menableShadow && !isColorDrawPass ) return; // Mquaker :: Terrain Shadow Option
#16
04/07/2011 (12:26 am)
Thanks for the feedback guys.... i added a ticket for it. THREED-1563
#17
05/05/2011 (10:50 am)
Fixed in 1.1 Final. TerrainBlocks now how the castShadows variable.
#18
05/05/2011 (3:38 pm)
good job! thanks!
Oscar Velzi
Iron Tower Studio