x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

How to create a moonlit ocean? Movable point light causes artifacts on surface

I'm trying to create an ocean scene at night lit by the moon. My first idea was to create a movable point light with a very large attenuation radius. The problem is that I get rectangular artifacts on my test plane. If I make the light stationary the artifacts disappear, but in my case I need the moon to move.
Is there something generally wrong with my approach, or is there just a lighting setting that I need to tweak so that the artifacts disappear?

alt text

I think I need to use a movable point light because I want accurate specular reflections on the water surface, and the water surface should be lit dynamically depending on the position of the moon. Is this the correct approach?

Product Version: Not Selected
Tags:
moontest2.jpg (319.2 kB)
more ▼

asked Nov 02 '14 at 08:33 PM in Rendering

avatar image

Theokoles
91 6 9 13

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

Hi Theokoles,

You'll want to use a directional light in your scene along with adjusting some values in the post process to get the right look.

In the directional light you can adjust the values for the light to be more of a darker color like blue/purple. You'll also want to use a skysphere to get a good night sky.

Here is a scene I set up in less than 5 minutes using the ocean plane, water material, and a sky sphere from the Features Tour 2014 content that was recently released on the Learn Tab in the launcher.

alt text

I hope this helps!

Tim

moonlit.png (442.7 kB)
more ▼

answered Nov 13 '14 at 06:22 PM

avatar image

Tim Hobson ♦♦ STAFF
48.8k 887 101 878

avatar image Theokoles Nov 16 '14 at 07:31 PM

Thanks for the demonstration, I have created a similar setup now. The problem that the moon in my scene is quite big, and the reflection of the directional light on the water does not look physically correct:

directional light

If I turn of the directional light and turn on screen space reflections, I get a result that looks correct to me:

screen space reflections

However, screen space reflections have the problem that they disappear when the player looks down at the water and the moon is out of view. So they are not very useful to me.
Can I achieve a correct reflection using a directional light? Based on my experiments, I doubt that it is possible. I still think that a point light with source radius same as the radius of the moon might work. What would you recommend?

avatar image DotCam Nov 16 '14 at 07:52 PM

Hi there, I am using a Directional Light (using dynamic lighting) and get the following results, this is with SSR turned on as well, pointing the camera down does not cause the reflection to disappear for me:

alt text alt text alt text

You can also try using the emmissive channel of the material to output some light as well, it can help to add a bit more light.

Are you using baked or dynamic lights?

moon1.png (535.3 kB)
moon3.png (393.9 kB)
moon2.png (404.2 kB)
(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question