Gamestudio Links
Zorro Links
Newest Posts
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
0 registered members (), 1,173 guests, and 0 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
the shady side #310579
02/15/10 18:11
02/15/10 18:11

M
mercuryus OP
Unregistered
mercuryus OP
Unregistered
M



Is there a fast way (no c_trace to the sun/lightsource) to check if a vector/entity
is within the shady side (e.g. stencil_shadow) of an object?



Re: the shady side [Re: ] #310580
02/15/10 18:25
02/15/10 18:25
Joined: Mar 2009
Posts: 112
Germany
K
KDuke Offline
Member
KDuke  Offline
Member
K

Joined: Mar 2009
Posts: 112
Germany
How about baking predefined shadow volume objects? Like dynamically creating an entity which would have the size and form of the shadow volume. Then you could easily assign an action to the moving object with EVENT_ENTITY and could handle the stuff you want to happen if it is in the shady side. Though this won't really work well if you got a dynamic day/night system as the shadow-volume would change continously. Therefore it would be necessary to bake the shadow-volume entities over and over again resulting in the loss of speedgain.
Though otherwise you could have the engine handle everything.

Hope you get the idea X-D


Using A7 Free
Click and join the 3dgs irc community!
Room: #3dgs
Re: the shady side [Re: KDuke] #310613
02/15/10 22:27
02/15/10 22:27
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline
Senior Expert
Superku  Offline
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Betrachte den Schattenbereich als zur z-Achse parallele Ebene, dann bestimmst du die kürzeste Distanz deines ausschlaggebenen Punktes (camera.x ?) zu dieser Ebene (Hessesche Normalform letzterer oder so, habe ich jahrelang nicht gemacht).
Ist diese Distanz kleiner als die halbe Objekt-Breite, ist schon einmal x/y im Schattenbereich und die z-Koordinate ist z.B. mit einer linearen Funktion zu bestimmen, die den Weg der Objekt-Spitze zum Grund angibt.


"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

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

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