1 registered members (AndrewAMD),
1,248
guests, and 6
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Re: Dynamic Realtime Shadows
[Re: Espér]
#270211
06/06/09 22:40
06/06/09 22:40
|
Fear411
Unregistered
|
Fear411
Unregistered
|
and the script please
|
|
|
Re: Dynamic Realtime Shadows
[Re: Espér]
#270214
06/06/09 23:01
06/06/09 23:01
|
Joined: Mar 2008
Posts: 2,247 Baden Württemberg, Germany
Espér
OP
Expert
|
OP
Expert
Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
|
//=================================================================================================================================
// //
// DAS MAINSCRIPT //
// ^^^^^^^^^^^^^^ //
// //
//=================================================================================================================================
// //
// EINBINDEN DER UNTERORDNER UND SCRIPTS //
// """"""""""""""""""""""""""""""""""""" //
// //
//=================================================================================================================================
#include <acknex.h>
#include <default.c>
//=================================================================================================================================
// //
// PANELS //
// """""" //
// //
//=================================================================================================================================
//=================================================================================================================================
// //
// FUNKTIONEN //
// """""""""" //
// //
//=================================================================================================================================
function lichttest()
{
my.lightrange = 1000;
my.x = 0;
my.y = 0;
my.z = 200;
set(my, SHADOW | CAST);
}
function test()
{
set(my, SHADOW);
}
//=================================================================================================================================
// //
// AKTIONEN //
// """""""" //
// //
//=================================================================================================================================
//=================================================================================================================================
// //
// DAS MAINSCRIPT //
// """""""""""""" //
// //
//=================================================================================================================================
function main()
{
fps_max = 60;
video_mode = 8;
d3d_antialias = 9;
video_set(1024,768,32,0);
video_window(vector(10,10,NULL),NULL,2,"Test");
// shadow_stencil = 2;
level_load("Editor.wmb");
sky_color.red = 1;
sky_color.green = 1;
sky_color.blue = 1;
wait(3);
shadow_stencil = 2;
mouse_mode = 0;
ent_create("dummy.mdl",vector(150,150,1000),test);
ent_create(NULL,vector(0,0,156),lichttest);
}
dummy.mdl is just a sphere model with a blue skin... simple to make by your own ^^
|
|
|
Re: Dynamic Realtime Shadows
[Re: Espér]
#270231
06/07/09 06:49
06/07/09 06:49
|
Joined: Oct 2004
Posts: 1,655
testDummy
Serious User
|
Serious User
Joined: Oct 2004
Posts: 1,655
|
Quoting Tobias. 1. Setting shadow_stencil, before loading your level. It seems, in that sample, shadow_stencil is set ~3 frames after level_load. Maybe "shadow_stencil = n;" should be placed as the first line in function "main()"? Set sun parameters in WED?
|
|
|
Re: Dynamic Realtime Shadows
[Re: Espér]
#270249
06/07/09 09:37
06/07/09 09:37
|
Joined: Apr 2009
Posts: 298 Southern Oceans
KiwiBoy
Member
|
Member
Joined: Apr 2009
Posts: 298
Southern Oceans
|
Check your skin, though I recall some one else also pointing this out. Manage skins; Texture format; should be 8 to 24 bit but 24 bit for todays graphics, not 32 bit. Sorry if you been thru this but there is no reason why you have no dynamic shadows unless 1. Sunlight turned off. 2. Dynamic lights not enough range for minimun shadow creation. 3. Shaders which affect other lights in level 4. Alpha skin settings on. I have no probs as Quadraxus states, I simply apply the conditions and the shadow is their dragging down on my frames per second render process
Use the 'manual' Luke, the manual is your friend. 'Self reminder' My WebPage
|
|
|
Re: Dynamic Realtime Shadows
[Re: KiwiBoy]
#270273
06/07/09 11:39
06/07/09 11:39
|
Joined: Oct 2007
Posts: 5,210 Ä°stanbul, Turkey
Quad
Senior Expert
|
Senior Expert
Joined: Oct 2007
Posts: 5,210
Ä°stanbul, Turkey
|
if you look closer to that line: ent_create("dummy.mdl",vector(150,150,1000),test);
test is used like an action and refers to the entity that has dummy.mdl as model.
Last edited by Quadraxas; 06/07/09 11:39.
3333333333
|
|
|
Re: Dynamic Realtime Shadows
[Re: Quad]
#270277
06/07/09 11:50
06/07/09 11:50
|
Joined: Mar 2008
Posts: 2,247 Baden Württemberg, Germany
Espér
OP
Expert
|
OP
Expert
Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
|
ok.. after reinstalling the engine.. the shadows work.. it was a problem with my engine.. -.- But the shadows are looking ugly on the model: Any way to make them better?
|
|
|
Re: Dynamic Realtime Shadows
[Re: Quad]
#270278
06/07/09 11:52
06/07/09 11:52
|
Joined: Apr 2009
Posts: 298 Southern Oceans
KiwiBoy
Member
|
Member
Joined: Apr 2009
Posts: 298
Southern Oceans
|
Ok thanks again, but its still not working is it? So maybe trying it as a full entity might bring a resultt or discount the theory? Im clueless and guessing and just ran out of experience...
Use the 'manual' Luke, the manual is your friend. 'Self reminder' My WebPage
|
|
|
|