Gamestudio Links
Zorro Links
Newest Posts
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
M1 Oversampling
by 11honza11. 04/30/24 08:16
Trading Journey
by howardR. 04/28/24 09:55
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (AndrewAMD), 972 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 6 of 9 1 2 3 4 5 6 7 8 9
Re: Dynamic Realtime Shadows [Re: Espér] #270211
06/06/09 22:40
06/06/09 22:40

F
Fear411
Unregistered
Fear411
Unregistered
F



and the script please smile

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 Offline OP
Expert
Espér  Offline OP
Expert

Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
Code:
//=================================================================================================================================
//                                                                                                                               //
//                                                     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 ^^


Selling my Acknex Engine Editions (A7 Com & A8 Pro):
>> click here if you are interested <<
Re: Dynamic Realtime Shadows [Re: Espér] #270231
06/07/09 06:49
06/07/09 06:49
Joined: Oct 2004
Posts: 1,655
T
testDummy Offline
Serious User
testDummy  Offline
Serious User
T

Joined: Oct 2004
Posts: 1,655
Quoting Tobias.
Quote:
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: testDummy] #270232
06/07/09 06:52
06/07/09 06:52
Joined: Oct 2007
Posts: 5,210
Ä°stanbul, Turkey
Quad Offline
Senior Expert
Quad  Offline
Senior Expert

Joined: Oct 2007
Posts: 5,210
Ä°stanbul, Turkey

not even changed a single line or recompiled the level, just put a dummy.mdl and ran.


3333333333
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 Offline
Member
KiwiBoy  Offline
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 laugh


Use the 'manual' Luke, the manual is your friend. 'Self reminder' smile

My WebPage
Re: Dynamic Realtime Shadows [Re: KiwiBoy] #270261
06/07/09 10:55
06/07/09 10:55
Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
Espér Offline OP
Expert
Espér  Offline OP
Expert

Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
the dummy.mdl is just a spehere with ablue TGA skin.. 24bit, no alpha channel.. what the hell should i check there..

seems like a problem in my engine.. i try to download it again.. and reinstall..


Selling my Acknex Engine Editions (A7 Com & A8 Pro):
>> click here if you are interested <<
Re: Dynamic Realtime Shadows [Re: Espér] #270271
06/07/09 11:36
06/07/09 11:36
Joined: Apr 2009
Posts: 298
Southern Oceans
KiwiBoy Offline
Member
KiwiBoy  Offline
Member

Joined: Apr 2009
Posts: 298
Southern Oceans
Rechecked code, who is 'my' in function test(); ?
Shouldnt you have a pointer to an entity?
The only way I have used it is directly in the player script or npc itself and it works fine that way.
It knows who 'my' is and sets itself to that doesnt it?


Use the 'manual' Luke, the manual is your friend. 'Self reminder' smile

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 Offline
Senior Expert
Quad  Offline
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 Offline OP
Expert
Espér  Offline 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?


Selling my Acknex Engine Editions (A7 Com & A8 Pro):
>> click here if you are interested <<
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 Offline
Member
KiwiBoy  Offline
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... smile


Use the 'manual' Luke, the manual is your friend. 'Self reminder' smile

My WebPage
Page 6 of 9 1 2 3 4 5 6 7 8 9

Moderated by  HeelX, Spirit 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1