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

[RELEASE] Nuaj', the 3D clouds simulator

Discussion in 'Assets and Asset Store' started by Patapom, Dec 16, 2011.

  1. Patapom

    Patapom

    Joined:
    Aug 19, 2009
    Posts:
    155
    I don't know what to say... What is your machine? What is your graphic card?
    Try and destroy the NuajManager instance and your camera, then recreate both... Or load my example scene...
     
  2. runner

    runner

    Joined:
    Jul 10, 2010
    Posts:
    865

    ahh the graphics card that's been changed since a month ago to old, Is the Nuaj package shader 3.0 only ?

    this is a old radeon X1950 256mb

    hmm .. Support for Microsoft® DirectX® 9.0 Shader Model 3.0 programmable vertex and pixel shaders in hardware
     
  3. Patapom

    Patapom

    Joined:
    Aug 19, 2009
    Posts:
    155
    Yes, Nuaj' is SM3.0 only. But it should work with your card... What worries me more is that I used to have issues with ATIs that I solved some time ago.
    I just hope they're not back!

    Anyone else here using an ATI card and having troubles with Nuaj'?
     
  4. jesta

    jesta

    Joined:
    Jun 19, 2010
    Posts:
    293
    I'm using an ATI 7970m and I don't have any errors.

    There are some bugs in DirectX 11 though, in the composeAtmosphere shader.
     
  5. jesta

    jesta

    Joined:
    Jun 19, 2010
    Posts:
    293
    Is there a way to lerp through multiple orchestrator presets? For example, say I have a "storm" slider ranging from 0f to 3f. 0 would be CLEAR, 1 would be SUMMER_CLOUDS, 2 would be CLOUDY and 3 would be STORMY.

    Is this easily doable?
     
  6. jesta

    jesta

    Joined:
    Jun 19, 2010
    Posts:
    293
    Never mind, I modified the orchestrator and it works like a charm ;).

    Sorry for the triple post. A mod could delete this post and the above one.
     
  7. Patapom

    Patapom

    Joined:
    Aug 19, 2009
    Posts:
    155
    Ha? How can there be bugs? It wouldn't display anything if the shader didn't compile since it's the very end of the display pipeline...


    Yep, the orchestrator is nothing more than a template given as an example to see how you can tweak parameters and handle presets yourself.

    Another thing you could do, for example, is to bilinearly interpolate presets: one dimension of the presets would be the weather condition (from clear to stormy) and the other dimension would be the time of day so you can have different storms at night, or even no storm at all but light clouds only...

    You can even think of trilinearly interpolate presets, where the 3rd dimension would be the season if you want to create a game that spans over an entire year. This would give you more stormy conditions during summer, ice clouds during winter, etc.

    The possibilities are quite vast... And the parameters numerous! :D
     
  8. jesta

    jesta

    Joined:
    Jun 19, 2010
    Posts:
    293
    When I open the project, I get an error from the Nuaj helper mentioning the ComposeAtmosphere shader doesn't work on my system. Nothing specific though... I'm not able to reproduce the error message now which is weird, but in any case it won't work with dx11.
     
  9. jesta

    jesta

    Joined:
    Jun 19, 2010
    Posts:
    293
    Is it possible to access the sun and moon positions?

    Also, I would really appreciate if you could provide the source for your shaders. I need to modify them in order to support DirectX 11.
     
  10. SevenBits

    SevenBits

    Joined:
    Dec 26, 2011
    Posts:
    1,953
    Wow... I'm going to try that web player on my MBP with an nVidia card. I do hope it lives up to my expectations.
     
  11. Scorpion-nsk

    Scorpion-nsk

    Joined:
    Nov 19, 2012
    Posts:
    2
    Hi. When Nuaj support Unity 4 will be realized?
     
  12. Patapom

    Patapom

    Joined:
    Aug 19, 2009
    Posts:
    155
    Very soon I hope but with the holiday season approaching and all, I'm terribly busy on some other urgent matters.
    Don't worry, I'm not forgetting Nuaj' users at all, it's just that I have 3 projects running in parallel and I'm quite alone on this... :(
     
  13. 10yaseen1

    10yaseen1

    Joined:
    Oct 27, 2012
    Posts:
    14
    Man! my unity 4 just stops working when I run Nuaj Example Scene! :(
    Plzz! Help.
     
  14. daisySa

    daisySa

    Joined:
    Dec 29, 2011
    Posts:
    341
    Any progress getting this working on Unity 4? I want to give you money. :)
     
  15. Tinus

    Tinus

    Joined:
    Apr 6, 2009
    Posts:
    437
    Just putting in another request for the Unity 4 version. This seems like a great package, and I'd love to use it for my skydiving game. :)
     
    Last edited: Jan 15, 2013
  16. Patapom

    Patapom

    Joined:
    Aug 19, 2009
    Posts:
    155
    Hello there, happy new year to all of you!

    I'm finally back to work so naturally I installed Unity 4.0 and I'm afraid to say (or am I?) that Nuaj' works perfectly well... I'm using a GeForce 680GTX and it runs very smoothly, even faster than before it would seem so if you could provide me with more informations on what's wrong on your machine and which hardware you're using.

    Thank you,

    . Pom .
     
  17. EiKON-Andy

    EiKON-Andy

    Joined:
    Nov 13, 2010
    Posts:
    66
    I was actually going to reply here this morning, asking what problems you guys were having with Nuaj' in Unity 4.0, because I'm not seeing any problems at all (note to Patapom - it's beautiful!).

    It does break when I enable DX11 though...
     
  18. jesta

    jesta

    Joined:
    Jun 19, 2010
    Posts:
    293
    It doesn't work in dx11. You need to initialize all outputs and fill every numeric constructors in your shaders. For example, dx11 will complain if you write: float4 x = float4(0); which was OK in dx9.
     
  19. Patapom

    Patapom

    Joined:
    Aug 19, 2009
    Posts:
    155
    Hello again.

    Andy: thanks! :)

    Well first I need to ask a stupid question : "how do you enable DX11 in Unity?"

    Second: you don't have to initialize numeric constructors as you say. I mean, perhaps Cg makes you do so but HLSL is not a pain in the ass like GLSL and lets you write funk stuff like 0.xxxx to create a float4 if you like, which is just great! :D

    Anyway, this is not the issue since Nuaj' is compiled as shader assembly code and it doesn't matter what the original HLSL code was since it's already compiled...
    I'm guessing the problem is rather Unity is missing a "DX11 version of the Nuaj' shaders", whatever that means.

    The problem with DX11 is mainly due to the use of Constant Buffers that exist in a limited number (up to 14 are available to the user), whereas in DX10 and earlier versions, you could upload your variables one by one (what a waste BTW, I like the ConstBuffers method a lot better!).

    But I don't think that's the issue either, I believe the guys at Unity chose an elegant solution to avoid forcing people to recreate all their shaders specially for DX11. Perhaps they used a single, huge constant buffer in which they put all the shader uniform variables so they get uploaded only once ? Or perhaps they even devised a clever way to group variables that change often into special constant buffers ?

    Anyway, I need to be able to enable DX11 first to see what's the problem. And although I know my way around shaders, I'm at a lost when it's up to deal with Unity mechanics: I'm a big dork, I just can't use Unity! :D
     
  20. jesta

    jesta

    Joined:
    Jun 19, 2010
    Posts:
    293
    Edit -> Project Settings -> Player -> Use Direct3D 11
     
  21. Patapom

    Patapom

    Joined:
    Aug 19, 2009
    Posts:
    155
    I've been there but couldn't find the option... I'll try again tomorrow...
     
  22. Tinus

    Tinus

    Joined:
    Apr 6, 2009
    Posts:
    437
    No problems in Unity 4 apart from DX11 mode? Sounds great, I'd better purchase this then. :)
     
  23. GamePowerNetwork

    GamePowerNetwork

    Joined:
    Sep 23, 2012
    Posts:
    257
    I was interested in buying this ... but this is how it looks in the WebPlayer running on my MacBook ... something is wrong

    $Screen Shot 2013-01-17 at 8.12.21 AM.png
     
  24. Patapom

    Patapom

    Joined:
    Aug 19, 2009
    Posts:
    155
    Indeed... I tested it on Mac Mini and it (used to) run nicely... Perhaps I broke something from v1.0 to v1.1 ? And I've got no mac of my own to do more tests... I think it's becoming harder and harder every time Unity releases a new version... :(

    Dealing with DX11 problems first, I'll try and find a mac for testing later... (seems I'm not out of this mess any time soon!)
     
  25. Patapom

    Patapom

    Joined:
    Aug 19, 2009
    Posts:
    155
    Okay... It seems the DX11 shaders are almost working so maybe it won't take that long after all ! :D
     
  26. ProceduralJOYE

    ProceduralJOYE

    Joined:
    Dec 13, 2012
    Posts:
    111
    Thanks for the tips, Patapom. I've been using this in my project, and mixing up the frequency factors does indeed help reduce the seams - but doesn't eliminate them completely. In my scene, I look at the planet from outside, and the seams are quite easy to see here.
    You can see them travelling, roughly, across the equator.

    Do you know yet whether or not Unity 4 features can be used to reduce this seam effect?
     
  27. Patapom

    Patapom

    Joined:
    Aug 19, 2009
    Posts:
    155
    Hi.

    Interesting to see that it's working for a complete atmosphere.
    If you switch to DX11 in Unity 4 then you should have access to 3D textures now. There seems to be a discussion thread about that subject there: http://forum.unity3d.com/threads/148605-Unity-4-3D-Textures-(Volumes)
    With appropriate 3D textures you shouldn't have seams at all...

    As far as I'm concerned, I can't use these 3D textures for Nuaj' because that would mean I would have to maintain 2 separate versions depending whether the user is using (DX10 / DX11) or (DX9 and OpenGL) and it's difficult enough already with a single version of the app. :D
     
  28. EiKON-Andy

    EiKON-Andy

    Joined:
    Nov 13, 2010
    Posts:
    66
    I've got a bit of a problem with some quality setting - specifically, the best way to get realtime shadows working. I know this has been discussed further up the thread but my problem isn't fully answered there.

    Here's the issue: When I use one camera (deferred rendering), I get some nasty pixilation where any geometry is rendered in front of the sky:

    Notice the sky is working and we have realtime shadows, but we get nasty pixilation at the edge of the terrain and on the droid model (so bad that parts of it have even disappeared!)

    I can fix the pixilation by moving to a two-camera setup. However - using this setup I can get the sky working OR I can get realtime shadows working, but not both!

    Example 1:
    Main camera - deferred rendering. Renders the sky only.
    Second camera - forward rendering. Renders geometry.

    Here you can see I have my lovely smooth edges back, but I've lost my realtime shadow.

    Example 2:
    Main camera - deferred rendering. Renders the sky only.
    Second camera - deferred rendering. Renders geometry.

    Here you can see the sky has disappeared! But I have my smooth edges and realtime shadows...

    So - are there any tips / tricks in getting the best quality rendering while preserving the realtime shadows?

    Thanks!

    Andy
     
  29. Patapom

    Patapom

    Joined:
    Aug 19, 2009
    Posts:
    155
    Hi,

    did you try changing the upsampling method ? Like using "CUTOUT" or "ACCURATE" ?
     
  30. EiKON-Andy

    EiKON-Andy

    Joined:
    Nov 13, 2010
    Posts:
    66
    I hadn't, but now I have and the results aren't bad but still not perfect:

    CUTOUT:

    Not great - still blocky around the edges.

    ACCURATE:

    Better - this is almost perfect. There's still a tiny but of detail missing (note the right hand) but I'm being picky there! Compare with the 2-camera setup below:



    However, the accurate upscale method has issues in another (much denser) scene.
    Here is a forest scene using the 2-camera setup:


    ...and here is the same scene using the ACCURATE upsampling method:


    I lose a tiny bit of detail in the trees, which I can live with - but where's that horrible black line around the distant trees coming from (hint: It's the background colour of the camera).
     
    Last edited: Jan 22, 2013
  31. ProceduralJOYE

    ProceduralJOYE

    Joined:
    Dec 13, 2012
    Posts:
    111
    Thanks Patapom, that makes sense - I can understand that it would be a maintenance nightmare.
    I'm not really keen on moving to DX11 though. I'm quite happy to make some spend some time making changes local to my machine, even if they're fairly extensive and/or a bit of a kludge, to reduce the seams. Do you have any ideas of where I should start (what functions to look at), if I were to take a look at this?

    Indeed. I don't think that's what Nuaj was intended for, but the results are good!
    2D clouds tend to stretch at the poles, but with 3D clouds and a low planet radius you can get some nice results quite easily.
     
  32. EiKON-Andy

    EiKON-Andy

    Joined:
    Nov 13, 2010
    Posts:
    66
    That black line around the distant trees appears to be just on trees that are 'painted' onto the terrain, and not regular mesh trees, so I'm guessing it's a quirk of the shader that those trees use.
     
  33. Patapom

    Patapom

    Joined:
    Aug 19, 2009
    Posts:
    155
    Well, I don't know if it will help anyone but know that "uniform int" and "uniform bool" don't work in DirectX11!
    => They always stay at 0 or false no matter what you put in them (using SetFloat() )

    I've submitted the bug but, as many other bugs, I suppose it will be fixed in 10 years... :D

    Andy: As for your trees, I suppose they use alpha blending instead of alpha to coverage. Nuaj' doesn't work with alpha objects and you need to render them AFTER the post-processing pass (I suppose that's the whole point of the "2 cameras setting" I've been hearing about lately).

    Nuaj' fixing is nearly done.
     
  34. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,502
    When you first released version 1.1 I tried it on my mac and it worked fine, I even got the water reflection to work :) However I never tried the webplayer, and my mac has rather a good graphics card. Anyway I don't think you totally broke Nuaj for the mac :)

    I am using windows more these days as I just got a multi-touch monitor windows 8, but if you ever need me to try Nuaj updates on the mac then let me know. I wont be able to test it with Unity 4 for ages though, as a lack of money forces me to remain on Unity 3.5 for I don't know how long.
     
  35. marcaurelio74

    marcaurelio74

    Joined:
    Sep 2, 2012
    Posts:
    60
    Hi,
    if i use your asset i can still use all the post process effect on my camera?
    Thanks
     
  36. Patapom

    Patapom

    Joined:
    Aug 19, 2009
    Posts:
    155
    Nuaj' is itself a post-process and doesn't prevent others to work (there's even a special treat for the glow post-process so it works better in HDR).
    You just need to make sure the other post-process happen after Nuaj' takes place (it should be the first post-process in the chain).
     
  37. Patapom

    Patapom

    Joined:
    Aug 19, 2009
    Posts:
    155
    Okay so here it is! Version 1.11 is now available on the store at http://u3d.as/content/patapom/nuaj-v1-11/2vS

    It's only a very minor update to add support for DX11.
    I know I promised to add support for multi-camera management (for wide angle panoramas, reflections, etc.) but it's too much of a hassle at the time, too much refactor so I had to revert pretty much everything I had done until I really have more time to do it correctly...
     
  38. marcaurelio74

    marcaurelio74

    Joined:
    Sep 2, 2012
    Posts:
    60
    Hi Patapom,
    first of all i want to say that i bought your asset and i'm amazed of the quality!
    Really congratulation.

    Today i updated it with the new version for the DX11 support, but when i enable it i receive this error :
    "An error occurred while enabling Nuaj' Manager :
    NuajMaterial.ctor() => Shader "ComposeAtmosphere" contains errors or is not supported on this machine"

    If i switch back to non DX11 mode is all ok.
    Any thoughts?
    Thanks
     
  39. Patapom

    Patapom

    Joined:
    Aug 19, 2009
    Posts:
    155
    Could you send me the shader file at support[at]nuaj dot net please ? (you can find it in Assets/Nuaj/Resources/Shader_Release)
     
  40. marcaurelio74

    marcaurelio74

    Joined:
    Sep 2, 2012
    Posts:
    60
    Hi,
    shader sent.
     
  41. Patapom

    Patapom

    Joined:
    Aug 19, 2009
    Posts:
    155
    Well it seems that the people at the Asset Store didn't quite update my package... These are still Unity 3.5 shaders. :(
    I guess I'll have to submit it again next week...
     
  42. Patapom

    Patapom

    Joined:
    Aug 19, 2009
    Posts:
    155
  43. 10yaseen1

    10yaseen1

    Joined:
    Oct 27, 2012
    Posts:
    14
    Guyz! Plzzz

    I have GT 430 1gb evga graphics and

    4gb ram plus core i3 3.00 ghz.

    When ever I turn on 3d clouds,the scene stop responding.

    Any suggestions. same thing happens in unity 3.5.2 and in unity 4.0.0f7.
     
  44. Patapom

    Patapom

    Joined:
    Aug 19, 2009
    Posts:
    155
    Stop responding like what? Freezes the machine? Freezes Unity? Can you still press "Stop"?

    Have you tried putting a breakpoint somewhere when it does that (there is no infinite loop in Nuaj' so I'd like to see where it gets stuck) ?

    What happens when you run the online demo there : http://www.nuaj.net/WebPlayer/ ? Does it work ?
     
  45. Farlas

    Farlas

    Joined:
    Sep 20, 2012
    Posts:
    9
    i make an island for testing and nuaj work but got 2 problems.

    First one i have no shadow with model already on map (like tree or rocks etc...).
    - i try to change shadow value on light or in nuaj or both but nothing except if i remove nuaj directional light get back shadow to object.
    - i put on directional light a value same as nuaj for the light cookie nothing change too.
    - i see that godrays not working too although i tick HDR.

    Second problem i got sort of pixelisation of all models on map
    - I have try to change from smart to accurate etc.. nothing
    - I try different tone mapping no success.

    coming from clouds as see in these 2 screens : http://imageshack.us/g/5/screen01l.jpg/
     
  46. jesta

    jesta

    Joined:
    Jun 19, 2010
    Posts:
    293
    It's a shame, because this package has so much potential, but is unusable in complex scenes right now. Nuaj should be compatible with 2-cameras setup as much as possible. The upsampling techniques provided are not good solutions in my opinion. Still, I could not do this myself so I'm not complaining, but I find it sad that I can't use this package in my project.
     
  47. elias_t

    elias_t

    Joined:
    Sep 17, 2010
    Posts:
    1,367
    I fully agree on that. I bought it, played with it for a bit but when I try to use it in a real project I hit the wall where I must use the 2 camera setup.

    Patapom, please make it work with a 2 camera setup so the shadows also work.
     
  48. Patapom

    Patapom

    Joined:
    Aug 19, 2009
    Posts:
    155
    I'll try and fix that soon but it's more a problem of free time than the will of doing it.
    You'll have to explain to me what's the "2 cameras setting" you're talking about though. I believe I saw some posts about it somewhere in the thread but didn't give it my full attention it would seem... :)

    Elias : it's the first time I hear shadows are not working! Nuaj' has nothing to do with shadows (except for the cookie stuff), I don't why it would break any shadow??...
     
  49. jesta

    jesta

    Joined:
    Jun 19, 2010
    Posts:
    293
    I'll try to explain the 2 cameras the best I can:

    With a single camera, there are several problems that are a "dealbreaker" for most of us. First, the upsampling set to anything but Accurate with a ZBuffer Threshold of 1 looks terrible. And unfortunately, this setting causes a huge drop in framerate when vegetation or a lot of objects cross the horizon. Second, particle systems simply do not work with the system, which I think is crucial for everyone here. The particles will not render if their background is the sky.

    So, in order to bypass some of these problems, the technique is to render Nuaj on a separate camera.

    Nuaj Camera:
    • Clear Flags: Don't Clear
    • Culling Mask: Nothing
    • Depth: -1
    • Effect Compose Atmosphere

    Scene Camera:
    • Clear Flags: Depth only
    • Culling Mask: Everything
    • Depth: 0

    The scene camera is a child of the Sky camera, and of course, all transform settings must match (positions, rotation). With this setup, Nuaj is rendered first, and the scene comes after. This rules out all the problems mentioned above, but we lose any effects that affect the scene, such as low clouds, fog, rain, etc. Here is a comparison of the two methods (first one is 1 camera, the second is 2 cameras):

     
  50. Patapom

    Patapom

    Joined:
    Aug 19, 2009
    Posts:
    155
    Well okay, what you're describing is exactly what the CUTOUT scheme should be doing...
    I seriously need to review my code for upsampling. It's not something I want to leave with bugs but that's so hard to align those pixels, you have no idea! :D
    I'll try and look into it soon but my schedule is hellish these days. :'(

    The rendering is awesome BTW!