Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Skydome for unity3D 3.x

Discussion in 'Made With Unity' started by Pixelstudio_nl, Dec 13, 2010.

  1. thieum

    thieum

    Joined:
    Apr 8, 2011
    Posts:
    60
    Back on the thread.
    I played around with the script over the week end and, as I'm quite happy with it now, I submit some changes I made in it,
    I hope that it can be usefull for those, like me, who can't have the aScattering2.1.shader running. All this relies on the aScattering2.0.
    And I hope that it can be improved further, as it's a really cool system for vivid environments!

    Just to summarize my changes, I mainly attempted to fade in and out some of the properties, for sunset/sunrise, which were too sudden in what I get so far.

    As found in previous versions, there still an arbitrary time when changes occur, that can be altered only in the script, so I switched off the Julian Date progression... Maybe in the future we will be able to collect the momentum when sun goes below horizon... But for now, I could only observe when change occurs.
    There's actually three different moments triggering lerp functions, depending from a variable called "dimTime" :

    - As said in a previous post, I kept the Directional Light / Sun active but I fade out its intensity from script. It starts to decline a bit before suns disappears.
    - I decided to play fade out the turbidity (actually transmitting the light color through the whole sky) as to reach a full night over time (dimTime*4).
    Note : turbidity depends from your haze amount in your render settings.
    - I also override the "M" calculation, responsible for light/sky color calculation, as in previous versions, because of an ennoying "NaN".

    These addition relies on Time.deltaTime so be aware that if you don't give time for the fading to complete, you will get unnatural results, until it reaches the end of the counter. For these reasons, there are also few booleans as to avoid the dimming when unecessary...

    I also added a color picker to the shader for applying any overall color to the sky. Then I could observe that this doesn't alter the light color, nore the MIE effect. This is controlled through the "skyTint" multiplier, so as a consequence the modified script needs the modifed shader as well.

    BUT, I couldn't find a way to get a more bright MIE effect, like a better yellow /orange rather than a brown halo... Maybe someone can help me on this...

    By the way, with the builtin sphere as a skydome, I noticed that the MIE effect / halo around the sun requires a negative number, thus rotating the sphere 180° in Y... I wonder if it's intended or if I misuse it somehow...

    Below some pics.

    $skydomeRender.jpg $skydomeSettings.jpg

    and here are the modified files :
     

    Attached Files:

  2. CodeAssembler

    CodeAssembler

    Joined:
    Oct 15, 2011
    Posts:
    33
    Thanks a lot for sharing back all this information. I don't think I will have time to look at your changes in a long while because I'm almost at the end of my current studies sessions but if I do manage to have some time to play around with this I'll let you know for sure.

    The only thing that is still annoying somehow of this setup is the reddish sky at night... I recall somebody said it was due to an error in the palette (gradient) source file where the fading of the sky color is derive from but I have not confirmed this yet by myself.

    I hope others users around have a little more time to spend around than me so that you could double check your findings soon enough! :)
     
  3. Robbilie2

    Robbilie2

    Joined:
    Aug 4, 2010
    Posts:
    262
    would somebody be so kind and would upload a working 2.1 version?

    Jose I added you on facebook, your skydome looks awesome :)

    would you upload your package?

    thx ;)

    PS: the repo doesnt work...
     
  4. janpec

    janpec

    Joined:
    Jul 16, 2010
    Posts:
    3,520
    Can someone upload webplayer version or maybe some screenshots of it? I am just wondering how it looks. Also is it using day and night cycle system?
     
  5. CodeAssembler

    CodeAssembler

    Joined:
    Oct 15, 2011
    Posts:
    33
    I'll try to upload my working 2.1 .package to my public dropbox section sometime during this week then... I'll also make a webplayer version of it too as I was thinking to start my Unity 3D portfolio anyways and I for sure could use your enthusiasm and motivation as a nice excuse to start it out :)

    I'll post a link here once is done!

    - Luis

     
  6. Pixelstudio_nl

    Pixelstudio_nl

    Joined:
    Jun 22, 2009
    Posts:
    179
    Aaahh good :) nice to see some has picked it up :)
     
  7. CodeAssembler

    CodeAssembler

    Joined:
    Oct 15, 2011
    Posts:
    33
    Thieum - I had some problems with the skydome sphere too. If I positioned it in a more natural size (real world sky high) then the only thing I got was a blueish skydome without any clouds at all showing. So I had to get the skydome sphere's top as close as I could to my terrain and then I did had to play around with the clouds texture so I can make it smaller and more random. Then I adjusted the time-line of the clouds alpha range in the shader values so my clouds could look a little more realistic when they travel some distance and then disappear mixing among themselves... But there is an issue with the skydome size and how the camera tends to _ignore_ the clouds rendering if they are considered to be too high somehow.
     
  8. thieum

    thieum

    Joined:
    Apr 8, 2011
    Posts:
    60
    Hi ,

    it looks like you just have to adjust your camera culling distance. In my case, the sphere is about 7800 units radius and camera 4000 for far distance. Note that the skydome matches your camera transform in play mode*, but only in X Z, Y is not taken into account so I had to keep the radius a bit lower depending on the lowest point of view in my scene... If the skydome is too small, it can look weird for sure.
    To facilitate the camera settings, you can also override the "cam" variable and change it into "Camera.main" as to match with any active camera that has the tag "Main Camera" :
    Code (csharp):
    1. Vector3 pos = Camera.main.transform.position;
    Does it help?

    *In my case, the "execute in edit mode" at the beginning of the script is not working at all, so I had to comment it out...
     
    Last edited: Oct 27, 2011
  9. CodeAssembler

    CodeAssembler

    Joined:
    Oct 15, 2011
    Posts:
    33
    Hum... thanks for the hint. I'll keep note of all these things to double check them.

    --- ... "*In my case, the "execute in edit mode" at the beginning of the script is not working at all, so I had to comment it out..." ...

    Well, I remember that I did check this out. The reason for the "execute in edit mode" is because the light object is being created automatically if it does not exists the each time you attach the script to a skydome "sphere" object. The sun is not only being created if it does not exist during run-time but also when assigning the script itself to a sphere/skydome object. It is very annoying because if you do change the attributes of your sun (light object) on the scene and then play the around with the scene you then believe that all is fine, but then when you do exit the project and came back you only do so to find that all settings of the sun light has been re-written by the script again when Unity does load the saved project file again. So basically it is a headache to make the script execute at run time for that particular reason. The script definitely could benefit from some 'cleaning' in this sense. In any case what is the worst thing happening if you forget to create/initialize your sun (light object) the very first time you define or play the scene? You just get a very specific error telling you about it and then fix it. There is not much hassle about it. So in my opinion at least for the sun object creation/initialization the "execute in edit mode" is not a requirement, but just a headache...
     
  10. thieum

    thieum

    Joined:
    Apr 8, 2011
    Posts:
    60
    Yes, I had the same problem with sunObj, noticely its sunflare disappearing in the next day cycle.
    I forgot to mention that I had also to skip this in the skydomescrpit2 :

    Code (csharp):
    1. /*////////// don't destroy the sun anymore
    2.     void OnDisable() {
    3.         DestroyImmediate(sunObj);  
    4.     }
    5. */
    As intended, the dir light used as sunObj won't reset then.
    (Note : these last commented changes are already part of the previous updated files that I submitted.)

    What is to be improved next : I agree with Luis, the red dawn is a bit unnatural, a deep dark blue would be nice. And I have no further clue about fine tuning the MIE effect...

    Luis, if you have a working version of aScattering2.1.shader, I'd like to see if I can implement it. Would you be as kind as to upload it there?
     
    Last edited: Oct 30, 2011
  11. CodeAssembler

    CodeAssembler

    Joined:
    Oct 15, 2011
    Posts:
    33
    For sure, here is the link to the export of the current setup I do have. I have to make a note that honestly I don't remember if I was using the previous or later shader on it :) so just disable one or the other and double check that way to be sure; this is the setup that you can see in the video that I posted.

    By the way, thank you very much for the kind observation about the 'Camera Far Clipping', that was that the problem I had with skydome sizing issues.

    :: http://www.myreal.me/unity3d/MyCurrentSkydome.rar
     
  12. DesignerLuuk

    DesignerLuuk

    Joined:
    Dec 28, 2011
    Posts:
    1
    Hello ! Love this cycle, I use it to but I have one problem, my sun is not moving, it keeps standing on one point, can somebody help me ?
    What I have to enter at: Latitude, Longitude, Meridian, Oh, and under the Sky Time script there is a other script : Mono Behaviour, but thats missing, maybe thats why the sun is not moving ? Please respond and help me :)
    Thanks, Luuk
     
  13. thieum

    thieum

    Joined:
    Apr 8, 2011
    Posts:
    60
    Hi,
    In my version, I dropped the sun.cs, working only with skydomescript2.cs + aScattering2.0.shader + skytime.cs.
    Lat, Lon parameters do their job : decide if the sun travel will be like north pole or equator, and Meridian shifts the local time.

    I faced the same issue, the skydome script is not moving the directional light transform, but only the skydome sphere in x z.
    So I searched in the script and after few try/error I found the right calculation under the "void initsunthetaphi"
    Basically, we just have to add the current x y of the sphere to the sunObj.transform.position and to the sunDirection used in sunObj.transform.LookAt...

    Code (csharp):
    1.         /* Get sphere current position in x  z axis */
    2.         float curX = transform.position.x;
    3.         float curZ = transform.position.z;
    4.         Vector3 curPos = new Vector3(curX, 0, curZ);
    5.        
    6.         /* Calculate the vectors : origin, direction, direction updated, position, position updated */
    7.         Vector3 sunDirection = new Vector3(domeRadius,phiS, solarAltitude);
    8.         Vector3 sunDirection2 = calcDirection(thetaS,phiS);
    9.         Vector3 sunDirection3 = sunDirection2+curPos;
    10.         Vector3 tmp = SphericalToCartesian(sunDirection);
    11.         Vector3 tmpPos = tmp + curPos;
    12.        
    13.         /* apply the calculated position  direction */
    14.         sunObj.transform.position = tmpPos;
    15.         sunObj.transform.LookAt(sunDirection3);
    Tested in my project, the sun position direction match whatever the location and time.
    I hope it will be usefull to you as well ;°)
    Happy sun shafts!
     
  14. CodeAssembler

    CodeAssembler

    Joined:
    Oct 15, 2011
    Posts:
    33
    Hi, i have not worked on this cycle again for a long while since we are making some iPhone prototypes for other projects we are currently working on but here is the link to my last achievement's video on the subject. I reworked a tad of it to get to my results. The website I did have is down for the moment, but If you need a working version from me, I'll be happy to give back.

    Thanks all for the great community here! Here is the link -> http://youtu.be/whV3fRYpXFQ
     
  15. Monkeyfeatures

    Monkeyfeatures

    Joined:
    Feb 6, 2012
    Posts:
    4
    I can't find anywhere where it says the license for this and I can't see anything in the docs in the GIT repo (unless I'm blind)... is it free for all to use? BSD/MIT license hopefully?
    Would really like to use this if allowed :)
     
  16. Pixelstudio_nl

    Pixelstudio_nl

    Joined:
    Jun 22, 2009
    Posts:
    179
    use as you like! at least with my stuff you can :)
    If you improve it, do share for free!
     
  17. pipe123

    pipe123

    Joined:
    Feb 13, 2012
    Posts:
    2
    Hi guys, look, this is my problem:



    I tried using shadder 2.0, 2.1 with all I've found, but didnt work.

    if I reduce the Y coordinate, the circle is smaller compared with the image.

    Thanks, if someone knows how to fix, let me know :)
     
    Last edited: Feb 13, 2012
  18. HolBol

    HolBol

    Joined:
    Feb 9, 2010
    Posts:
    2,887
    Increase the far clip pane of your camera.
     
  19. pipe123

    pipe123

    Joined:
    Feb 13, 2012
    Posts:
    2
    ty dude
     
  20. rhianu

    rhianu

    Joined:
    Feb 25, 2010
    Posts:
    93
    Hey, what up, guys? :)

    This is a great asset, and I'm loving the effect it gives me. Took me a while to get it working, but now everything's running perfectly... at least as long as I don't try to change or improve upon anything.

    See, the issue I'm having is that I'm trying to upgrade the cloud texture to something a bit higher resolution, but for some reason whenever I try to replace the cloud texture with anything other than the original texture that the package came with, the upper-half of the skydome just turns a bland orange/gray color and doesn't display any clouds at all. The only way to fix it (that I've found) is to revert back to the original cloud texture.

    If I use the original cloud texture, it works great. If I use any other texture, the skydome craps out on me.

    Anyone know what's causing this, and how to fix it so I can use a better cloud texture?

    Also, it would be nice if the star texture that we see at night didn't tile and distort so obviously. Anyone know how to make the star texture wrap cleanly and evenly around the skydome, without any distortion? I tried adjusting the Tiling aspect in the Inspector window, but that didn't seem to change anything.



    I don't know about you, but that doesn't look very good to me.


    Any help anyone can provide on these issues would be greatly appreciated.

    Thanks.
     
    Last edited: Feb 15, 2012
  21. Dover8

    Dover8

    Joined:
    Aug 20, 2010
    Posts:
    94
    Make sure "Alpha from Greyscale" is checked for your cloud texture.
     
  22. Demonwhisperer

    Demonwhisperer

    Joined:
    Mar 30, 2012
    Posts:
    4
    Hi Guys, Has anybody managed to figure out how to make the sun rise in the east and set in the west instead north and south? Is there any variables in particular that adjust the starting position of the sun in sun.cs? Cheers for any help and this project is really great. well done.

    Paul
     
  23. Demonwhisperer

    Demonwhisperer

    Joined:
    Mar 30, 2012
    Posts:
    4
    Hi guys. I appear to have solved the problem of the sun setting and rising in the wrong locations, so I thought I'd share it with you all. The problem was that the sun actually rises in the north and sets in the south in Skydome (even in the latest version v4) and should rise in the east and set in the south. What I did was change the sphericalToCartesian() method in sun.cs so that the returned vector3 position has its x and z coordinates swaped and I also made the z coordinate negative to make sure the sun is in the south at midday. I have tested this to make sure it is accurate and it passed ;-). Here is the ammended sphericalToCartesian() method for your own reference. I am attaching my edited View attachment $sun.cs file also. The version I used was from skydome v2 :

    Vector3 sphericalToCartesian(Vector3 sunDir)
    {
    Vector3 res = new Vector3();
    res.y = sunDir.x * Mathf.Sin(sunDir.z);
    float tmp = sunDir.x * Mathf.Cos(sunDir.z);
    res.z = (tmp * Mathf.Cos(sunDir.y))*(-1); //changed from res.x and made negative
    res.x = tmp * Mathf.Sin(sunDir.y); //changed from res.z
    return res;
    }

    Ok that's it. I hope this helps anyone with the same problem out.

    Paul
     
  24. krillmcrawl

    krillmcrawl

    Joined:
    Feb 18, 2011
    Posts:
    29
    Are someone willing to upload the latest revision to a unitypackage? CodeAssembler's 2.1 link are down. Thanks!
     
  25. giltine528

    giltine528

    Joined:
    Mar 3, 2012
    Posts:
    18
    A tutorial would be great ebcause idont udnerstand anything when i drag skydome to my projects view i get squere in middle
     
  26. CodeAssembler

    CodeAssembler

    Joined:
    Oct 15, 2011
    Posts:
    33
    Paul, thanks for pointing this out! I did update my code to reflect that change, although it was a subtle change is was worth ;)

    Here is the link to my last Demo version of it : http://www.vimeo.com/42082476 Hope you like it! (my notebook is having speed issues handling it, but its not that powerful notebook so I guess is not big deal, I'll run it in a more suitable system later on and will share a more decent speed playing demo of it.)

    Krillmcrawl, yes I'm sorry but I lost my hosting plan (no work currently, only student life :) So if you give me an email I'll happily send it your way. If anyone have a share place I could send the package so you can post it and share back again.

    - Luis
     
  27. krillmcrawl

    krillmcrawl

    Joined:
    Feb 18, 2011
    Posts:
    29
    Thanks, looks really nice! I'm happy to host it for you. Send it to krillmcrawl( at )hotmail.com
     
  28. CodeAssembler

    CodeAssembler

    Joined:
    Oct 15, 2011
    Posts:
    33
    I sent it.

    Still need to be done: correct the grayscale reference pic (it suddenly change color to a strange reddish at sunset somehow), some way of detecting if its night and then apply alpha to pure white textures in the game because otherwise they will appear to be lit (like if the Sun is still there, looks really weird), maybe add a moon ?

    Otherwise I guess the code is working really nice.

    A big thank you again to the original donor of this code and to all the collaborators that made it possible.

    - Luis
     
  29. krillmcrawl

    krillmcrawl

    Joined:
    Feb 18, 2011
    Posts:
    29
  30. Demonwhisperer

    Demonwhisperer

    Joined:
    Mar 30, 2012
    Posts:
    4
    Hi Guys. One thing I was never able to get working was getting stars to appear when the sun is down. Is there any particular setting I'm missing? I've set the starstexture in the ascattering material settings but nothing displays but a darkened version of the cloudy sky. Cheers for any help.

    Paul
     
  31. tracend

    tracend

    Joined:
    Jun 25, 2011
    Posts:
    19
    Hey Guys,

    I upgraded the original project with your edits, and added a few tweaks (readme file, sample scene...)

    https://github.com/amigame/skydome

    Feel free to fork and update as needed.
     
  32. proso

    proso

    Joined:
    May 24, 2012
    Posts:
    67
    Thats cool. I tested the sky and I noticed that the longtitude and latitude function isn't calculated proparly. Sunset is always around 18h. When you set the latitude to 50 for example, sunset is at 18h (day 150) aswell, in stead of 23h in the real world. Or am I doing somtething wrong?
     
  33. CodeAssembler

    CodeAssembler

    Joined:
    Oct 15, 2011
    Posts:
    33
    Thank you for continuing this project. I would really like to see where it could extend. I wish I had more time to deal with it. Tracend, thanks for crediting my collaboration on this one.

    I think Proso would be right, I tried to move Sun so that it rises the opposite way (never tried it before) and it seems is not working.


    ---- Regarding future development road :

    I think that day time beauty details on this Skydome are really nice, if you do have Unity Pro you could just start enabling advanced filters and you will end up with a really nice scene if you devote some serious art assets on it, that is...

    What this Skydome is really missing is NIGHT TIME beautifying details. Like:

    1) There is no moon :) It would be really nice to do a moon, even if its start just being a full moon all time.

    2) Another thing is that at night there are absolutely no clouds and that is not too realistic, I mean you could live in a place with no night time clouds but it would be great to have them.

    3) Other thing is that there is no integrated way for the Skydome to be able to "Fade-to-Night-Time" day time 'bright' textures, that is something I was planning to do, it should not be too difficult to implement and it will do a HUGE improvement. Like having some array place holder at the main camera of the Skydome where you can 'drop' textures are to 'too bright or white color' on so that if the script detects that is 'night-time' then it will fade those textures color by the same amount on its of its 'rgb' components, making them match the Night environment. Something like this, could be different approach though, important thing is that is just works at first.

    4) Something is wrong with the night-time 'gradient-reference' texture and its "jumping" back suddenly to a violet-to-orange like color tone after fading Skydome to full night-time...


    So I guess this is all I can recall from the last time I was dealing with this. I might be able to use this code in a project I am working right now, but only if we do run on latest iOS hardware (iPad New). I'm not sure if this will be possible to do. If we do, I will share our improvements. Not making any promises tough... but mention it for motivation :p


    - Luis
     
    Last edited: Jul 3, 2012
  34. CodeAssembler

    CodeAssembler

    Joined:
    Oct 15, 2011
    Posts:
    33
    Also, Tracend, do you think it would be possible for you to make a link at the repository with the actual Unity .package file so that users could just get the .package file ? Sorry if its available already, I tried to get that but couldn't find it :)

    - Luis
     
  35. proso

    proso

    Joined:
    May 24, 2012
    Posts:
    67
    Hi all,

    I spend some time trying to make the latitude/longtitude work properly. I manage to get the correct sun position with the sun.cs script, and thats working perfectly. Changed the skydome a little bit, script so the sun(flare) is (dis)appearing at the right time. The only problem is that for example I set a sunset at 10pm, the sky still gets dark at 6pm... I don't know how to change that.
    And I've got CodeAssemblers point 4 issue too. It looks like the skydome is giving the value NaN at that moment.
    I think when this is working fine, we got a perfect sky system, ready for pimpin. I hope someone can get it back to life!
     
  36. CodeAssembler

    CodeAssembler

    Joined:
    Oct 15, 2011
    Posts:
    33
    Nice, thank you!

    Both are important fixes (sunflare and sunset-to-night gradient). As for the 'ready for pimpin' I can definitely donate a working scene for the Skydome project so that when you do open it you can have it working and semi-tuned right from the start. I love to do in-game-assets too... however to make things easier on my demo (because of lack of time) I did used the small village assets from the store which are really great by the way! So a big THANK YOU for their creator.

    You know what? I do have a project now where I would love to put the Skydome to work! so I guess that now I do have the right 'excuse' to deal with that! :D so count me in... Let me know how we can coordinate. It would be great if you can send me the modified scripts...

    But first I have a question, do yours have all the previous changes already made at this whole thread? Because it would be really important to work on top of all that other work so we don't loose all the valuable contributions we already got from the community here...

    Let me know and we will coordinate.

    You can add me to your facebook if you need to: http://www.facebook.com/CodeAssembler

    - Luis
     
  37. proso

    proso

    Joined:
    May 24, 2012
    Posts:
    67
    I used the latest version. This is what I've got so far. My goal was to achieve a realtime day/night skydome with juniandate/longtitude/latitude. It all works perfect except for the gradient sky. This is acting totally weird (aScattering2.1)........ Maybe someone can fix that? You can download my latest version here: http://www.proso.nl/downloads/skydome02.zip
     
  38. tracend

    tracend

    Joined:
    Jun 25, 2011
    Posts:
    19
    Does the ZIP download work as an option?
    https://github.com/amigame/skydome/zipball/master

    Traditionally speaking, it's better to share raw code. The repo also helps for version control ;)
     
  39. Rush-Rage-Games

    Rush-Rage-Games

    Joined:
    Sep 9, 2010
    Posts:
    1,997
    Very cool, thanks!
     
  40. Leandro247

    Leandro247

    Joined:
    Sep 17, 2012
    Posts:
    3
    Its not working for me, the sky is always solid white (even at night) but its fine on the sides as shown in the attachment. What im doing wrong? I already have set view distance to 10000 and it dont works, i changed all the script variables at runtime and nothing changed. I have no idea what it causing this!
     

    Attached Files:

  41. topofsteel

    topofsteel

    Joined:
    Dec 2, 2011
    Posts:
    999
    I've gone through the original thread then this one. I have about 9 different versions of this skydome so far. The first one the sun didn't line up with the flare, but there was a great debug mode. And in the last few that are complete projects, they sky is static and there is a lot of extra material. Is there a recent build in .unitypackage format with the dynamic sky, debug mode, and the sun/flare synced? Thank you!
     
  42. aftermathkid

    aftermathkid

    Joined:
    Oct 28, 2012
    Posts:
    1
    I can see the skybox in the scene window but not in the game window. What am I doing wrong?
     
  43. HolBol

    HolBol

    Joined:
    Feb 9, 2010
    Posts:
    2,887
    Your camera's far clip pane is too small.
     
  44. topofsteel

    topofsteel

    Joined:
    Dec 2, 2011
    Posts:
    999
    aScattering2.1.shader isn't working with DirectX 11 (available in unity4). Does anyone know how I can update this? Thanks.
     
  45. Osmo6Studios

    Osmo6Studios

    Joined:
    Nov 20, 2012
    Posts:
    1
    Hi, I need some help.

    When I drag "Skydome" into my Hierarchy then run my game, I get a console error:

    Code (csharp):
    1. UnassignedReferenceException: The variable cam of 'skydomeScript2' has not been assigned.
    2. You probably need to assign the cam variable of the skydomeScript2 script in the inspector.
    Please help! Thanks :)
     
  46. tiagoborg

    tiagoborg

    Joined:
    Nov 19, 2012
    Posts:
    1
    Hi, is there any updated functional version available? In the last 2 ones available, the sun and the sky doesnt move/change, although the skydome in the scene seems to be changing there's nothing happening ingame.
     
  47. dorpeleg

    dorpeleg

    Joined:
    Aug 20, 2011
    Posts:
    250
    Hey guys.
    I know this topic is a bit old, but I wanna try to revive it, this is a really cool skydome and I think it can be better if more people will contribute.
    I'm currently using the 2.0 shader (unity 3.5) and everything works fine.. but I have a question about the light movement.
    I noticed that the sunlight object is moving around the scene.
    I was wondering, why is that? as far as I know, the position of a directional light doe not effect anything, only it's rotation does.
    Any ideas?
     
  48. topofsteel

    topofsteel

    Joined:
    Dec 2, 2011
    Posts:
    999
    I'm not sure, but I assumed it was so the glare of the 'sun' would be accurate. And I agree, I wish this thread was more active. I love this asset. Have people found a replacement? I would really like to make shader dx11 compatible. I've updated it with the modified color and east/west fix. But I wish I could get a handle on all of the variables. I just need to sun to rise in the east, swing around to the south and set in the west. When i'm tweaking the long/lat/meridian/Julian date... the sun goes wild, and it shouldn't. I end up fussing with all of those settings just to get it to rise and set. They seem to have nothing to do with actual conditions. I would love to generate some conversation about updating this asset or replacing it. Thanks.
     
  49. dorpeleg

    dorpeleg

    Joined:
    Aug 20, 2011
    Posts:
    250
    When your saying "the glare of the sun" I'm guessing you mean the sun flare.
    If that is the reason, then it's not a reason.
    Because if you attach a flare to the directional light it will position itself correctly if you rotate it (it least that's what I saw in some tutorial).
    What I'm really looking for is adding a moon and weather effects.
     
  50. aurnab

    aurnab

    Joined:
    Mar 28, 2013
    Posts:
    1
    Hey this works great but whenever i change any of the parameters like the sun just flashes repeatedly
     
    Last edited: Apr 16, 2013