View topic - Dynamic Sun

 All times are UTC + 1 hour

 Page 1 of 2 [ 29 posts ] Go to page 1, 2  Next
Author Message
 Post subject: Dynamic SunPosted: 04 Mar 2011, 10:32
 Moderator

Joined: 26 Oct 2007, 15:21

 Post subject: Re: Dynamic SunPosted: 04 Mar 2011, 17:03
 Spring Developer

Joined: 16 Dec 2006, 20:59
 Add a fourth parameter to the "sunDir" in the map info (x,y,z,sunDist). "sunOrbitTime" (in seconds) and "sunStartAngle" (in radians) can also be set. The sun normally starts at the peak elevation point, but e.g. sunStartAngle = PI would make it start at the lowest elevation point.x,y,z is the axis of rotation for the orbit and sunDist is the distance from the origin to the center of the orbit. So, for a sun that passes through zenith (x,0,z,0) so that x^2+z^2=1^2For a sun at a constant elevation (0,1,0,sunDist), 0

 Post subject: Re: Dynamic SunPosted: 04 Mar 2011, 22:20
 Community Representative

Joined: 08 Sep 2008, 21:59
Location: small cars
 awesome

 Post subject: Re: Dynamic SunPosted: 07 Mar 2011, 07:22
 Evolution RTS Developer

Joined: 17 Nov 2005, 02:43
 Oh hells yes! Excellent work!

 Post subject: Re: Dynamic SunPosted: 07 Mar 2011, 21:39

Joined: 30 Jun 2008, 23:08
Location: Germany
 will this effect the shadows of the map (hills,...)? because i thought that they are fixed

 Post subject: Re: Dynamic SunPosted: 08 Mar 2011, 00:15
 Spring Developer

Joined: 16 Dec 2006, 20:59
 Correct. Some maps have fixed shadows, and will not look very good if the sun direction is changed.

 Post subject: Re: Dynamic SunPosted: 08 Mar 2011, 00:41
 Evolution RTS Developer

Joined: 17 Nov 2005, 02:43
 @manolo, for maps that have the shadows literally baked in it won't look very good (very few maps do this tho). For the ones that have baked preshading (which is most of the high quality maps), it's possible that at certain points it might look a little odd, but I doubt it will be so noticeable that it will make a difference to the player. They are all going to be shitting themselves about dynamic sunlight to notice And in the future, mapmakers will simply be not baking preshading, so while it "could" be an issue of sorts, it is one that will resolve itself.

 Post subject: Re: Dynamic SunPosted: 08 Mar 2011, 02:46
 Community Representative

Joined: 08 Sep 2008, 21:59
Location: small cars
 easy enough to an ambient bake rather than a directional shadowed one; im sure combined with ssmf it will look far superior to anything that exists ATM

 Post subject: Re: Dynamic SunPosted: 08 Mar 2011, 02:49

Joined: 22 Feb 2006, 01:02
Location: cheap kitchen
 /shadows 2 turns off terrain shadows, guess you will still be able to do that on maps with pre baked shadows.

 Post subject: Re: Dynamic SunPosted: 08 Mar 2011, 09:02

Joined: 04 Jan 2011, 20:00
 Oh great, then also implement a feature to let the teams swap sides.I mean the team with the sun in their back has the advantage right? )

 Post subject: Re: Dynamic SunPosted: 08 Mar 2011, 12:01
 Spring Developer

Joined: 16 Dec 2006, 20:59
 And team1 cannot jeffyspam because the wind is too strong. Luckily team2 had some lightning strike their advfus to even things out a bit.

 Post subject: Re: Dynamic SunPosted: 08 Mar 2011, 12:06
 Spring Developer

Joined: 28 Jun 2007, 06:30
 Beherith wrote:And in ./include/al/efx.h I had to change allCode:typedef void (AL_APIENTRY *LPALGENEFFECTS)(ALsizei, ALuint*);toCode:typedef void (ALAPIENTRY *LPALGENEFFECTS)(ALsizei, ALuint*);ALAPIENTRY is deprecated in OpenAL1.1, so update your OpenAL headers.

 Post subject: Re: Dynamic SunPosted: 08 Mar 2011, 19:34
 Evolution RTS Developer

Joined: 17 Nov 2005, 02:43
 knorke wrote:/shadows 2 turns off terrain shadows, guess you will still be able to do that on maps with pre baked shadows.Knorke... Prebaked shadows means that the shadow is burned into the texture. As a result, using /shadows 2 would do nothing.

 Post subject: Re: Dynamic SunPosted: 08 Mar 2011, 19:59
 MC: Legacy & Spring 1944 Developer

Joined: 29 Apr 2005, 00:14
Location: #moddev - join it!
 I think he was meaning 'turn off engine shadows if they look funky on old maps'

 Post subject: Re: Dynamic SunPosted: 08 Mar 2011, 20:26
 Evolution RTS Developer

Joined: 17 Nov 2005, 02:43
 Wouldn't this take the place of the engine shadows?

 Post subject: Re: Dynamic SunPosted: 09 Mar 2011, 01:22

Joined: 22 Feb 2006, 01:02
Location: cheap kitchen
 if i understand correctly, those are the engine shadows just updated with a new feature. Quote:I think he was meaning 'turn off engine shadows if they look funky on old maps'yup.So if you have some old map with shadows drawn onto the terrain, it might be better to switch engine terrain shadows off so that you do not get double shadows, possible pointing in different directions.

 Post subject: Re: Dynamic SunPosted: 09 Mar 2011, 01:24
 Evolution RTS Developer

Joined: 17 Nov 2005, 02:43
 Ahh ok. YOur wording was a bit funky.

 Post subject: Re: Dynamic SunPosted: 09 Mar 2011, 01:37

Joined: 17 Sep 2010, 14:49
 So how can this be turned off, for a map with shadows on the texture? SunOrbitTime=something?

 Post subject: Re: Dynamic SunPosted: 09 Mar 2011, 09:46
 Evolution RTS Developer

Joined: 17 Nov 2005, 02:43
 I believe this post answers your question (read all the way through to the end and it'll make sense).zerver wrote:Add a fourth parameter to the "sunDir" in the map info (x,y,z,sunDist). "sunOrbitTime" (in seconds) and "sunStartAngle" (in radians) can also be set. The sun normally starts at the peak elevation point, but e.g. sunStartAngle = PI would make it start at the lowest elevation point.x,y,z is the axis of rotation for the orbit and sunDist is the distance from the origin to the center of the orbit. So, for a sun that passes through zenith (x,0,z,0) so that x^2+z^2=1^2For a sun at a constant elevation (0,1,0,sunDist), 0

 Post subject: Re: Dynamic SunPosted: 09 Mar 2011, 23:37
 Spring Developer

Joined: 16 Dec 2006, 20:59

 Display posts from previous: All posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost timeSubject AscendingDescending
 Page 1 of 2 [ 29 posts ] Go to page 1, 2  Next

 All times are UTC + 1 hour

#### Who is online

Users browsing this forum: No registered users and 3 guests

 You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot post attachments in this forum

Search for:
 Jump to:  Select a forum ------------------ Community    General Discussion    Help & Bugs    Ingame Community       Spring Clans       Tournaments    Linux    Mac OS X    Off Topic Discussion Content Development    Game Development       Game Development Tutorials & Resources       Game Releases    Map Creation       Map Tutorials & Resources       Map Releases    Lua Scripts    Art & Modelling       Modelling & Texturing Tutorials & Resources    Sound Effects & Music    Project Subforums       Balanced Annihilation       Conflict Terra       The Cursed       Evolution RTS       Journeywar       Kernel Panic       MechCommander: Legacy       Metal Factions       NOTA       PanzerStahl       Scenario Editor       Spring: 1944       Spring Tanks       Star Wars: Imperial Winter       XTA       Zero-K       Project Archive          Argh's Projects          Caydr's Projects          Damned          Dune: Evolution          Engines Of War          Evolution RTS          Progressive Annihilation          Supreme Annihilation Development    News    Engine       Dedicated Developer Discussion       New Developer Discussion       Meeting Minutes    AI    Lobby Clients & Server       Infrastructure Development       Lobby Meeting Minutes    Feature Requests       The Werewolf Game       News Submissions Site content    Community Blog    Site content       Banners       Welcome images       Videos       Videos - contributions       Screenshots       Screenshots - contributions