3 registered members (AndrewAMD, VoroneTZ, 1 invisible),
1,512
guests, and 9
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Re: shadow for dynamic map entities?
[Re: Superku]
#414609
01/05/13 18:11
01/05/13 18:11
|
Joined: Jan 2013
Posts: 23 France
Mo222
OP
Newbie
|
OP
Newbie
Joined: Jan 2013
Posts: 23
France
|
I don't think they are. If you have a flat ground surface you can emulate a shadow easily with a transparent sprite (move it if necessary). Hi superku! Ok thanks for the precision . In order (for a cube map entity) to emulate a shadow on a flat ground, how should i proceed? : 1- the cube should trace a ray to the ground in the direction of light ray? 2- then place the shadow sprite on the ground at the place hit by the trace ray? but how can i get the direction of the light ray if i put several lights in the level? (i'll try and think about that) PS : by the way , i watched a video of your game superku and i say good work , especially for the gameplay which seems entertaining!
|
|
|
Re: shadow for dynamic map entities?
[Re: Mo222]
#414611
01/05/13 19:11
01/05/13 19:11
|
Joined: Sep 2003
Posts: 6,861 Kiel (Germany)
Superku
Senior Expert
|
Senior Expert
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
|
Thanks! Obviously you can use models instead of map entities, the latter don't really have advantages over models since we have polygonal collision detection on models. You mean dynamic lights, right? If you only have static lights, simply use the sun light direction vector for your trace or a simple vertical trace. If you have dynamic lights instead, iterate over them and use the nearest for calculation.
"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual Check out my new game: Pogostuck: Rage With Your Friends
|
|
|
Re: shadow for dynamic map entities?
[Re: Superku]
#414649
01/06/13 08:56
01/06/13 08:56
|
Joined: Jan 2013
Posts: 23 France
Mo222
OP
Newbie
|
OP
Newbie
Joined: Jan 2013
Posts: 23
France
|
Thanks! Obviously you can use models instead of map entities, the latter don't really have advantages over models since we have polygonal collision detection on models. You mean dynamic lights, right? If you only have static lights, simply use the sun light direction vector for your trace or a simple vertical trace. If you have dynamic lights instead, iterate over them and use the nearest for calculation. I tried to use cube models instead of map entities. Indeed cube models cast their shadows on the map ground, but they dont show the shadow of the player when he jumps on them. Unlike the cube map entities which shows the shadow of the player on them, and dont cast shadow on the ground .... I dont understand why the engine cannot render the shadow of the map entities. Thus , what is the benefit of using map entities in a level?
|
|
|
Re: shadow for dynamic map entities?
[Re: Mo222]
#414652
01/06/13 09:42
01/06/13 09:42
|
Joined: Oct 2008
Posts: 681 Germany
Ayumi
User
|
User
Joined: Oct 2008
Posts: 681
Germany
|
Map Entities are static Blocks.Render your Blocks and use the static Shadows.The benefit is the speed (-> Manual->How to...->Use Entities->Sub Level).
Textures and shadow maps of the level and of map entities are preallocated in video memory at loading time, in order to maintain smooth gameplay. Textures of all other entity types are normally only allocated when the entity becomes visible.
And here-> Entity selection guide .
It isn t a Model or Block, it s a Level part.Therefore u can t render Shadows with Maps.
Last edited by Ayumi; 01/06/13 09:43.
|
|
|
Re: shadow for dynamic map entities?
[Re: Superku]
#414654
01/06/13 10:26
01/06/13 10:26
|
Joined: Oct 2008
Posts: 681 Germany
Ayumi
User
|
User
Joined: Oct 2008
Posts: 681
Germany
|
Yes i have forgot to delete this sentence. It isn t a Model or Block, it s a Level part.Therefore u can t render Shadows with Maps.
|
|
|
Re: shadow for dynamic map entities?
[Re: Superku]
#414658
01/06/13 11:29
01/06/13 11:29
|
Joined: Jan 2013
Posts: 23 France
Mo222
OP
Newbie
|
OP
Newbie
Joined: Jan 2013
Posts: 23
France
|
Map Entities are not static blocks (maybe you meant prefabs?), they are in fact dynamic blocks, if you want to call it that way. Map Entities don't serve any real purpose, they used to be available in A4 (?) because they provided polygonal detection and models didn't.
Mo222, what kind of shadow are we speaking of, stencil shadows? Ok now i understand ! Map entities are a residue from A4 then. I am playing with A6 which includes my.polygon=on;(i just discovered yesterday when you talked about that). If i can emulate a shadow on the model cube , then i 'd rather work with models than map entities. Now i should see if i can get a normal direction of model faces when trace hit a model face, in order to tilt properly the shadow. by the way, i am talking about the standard shadow which comes from my.shadow=on; and offered by the sun. Thank you both of you , superku and ayumi!
|
|
|
|