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 do I get a big, custom mesh to cast a sharp shadow on a plane?

I am relatively inexperienced with lighting in Unreal. I tried to build the light of my test scene shown below.

alt text (My scene)

My UV-mapping is done right and I created a fully working lightmap. No problem so far. But the mesh, which casts the shadow, is pretty big (200*50*30 m). The plane which the shadow is cast on is about the same size. I am using a stationary directional light to light my scene. The shadow on the plane doesn't look so nice and I want to improve the quality of the shadow. I am already using the highest lightmap resolution (4096).

alt text (Shadows on plane with lightmap resolution 4096 after light build)

Is there another way to get a non-pixelated shadow in a big scene with an object like mine? It would be okay to have blurred edges (better than pixelated edges). The shadow needs to be high-res because the player is going to walk on this plane. If it helps, the unbuild shadow looks great to me but I need to build the light.

alt text (Preview shadow)

The shadow after the light-build on brushes like the box-brush looks extremely great but when I convert the brush to a mesh it looks as bad as my plane.

alt text (shadow on box brush after light build)

Product Version: UE 4.16
scene.jpg (472.8 kB)
plane shadow.jpg (544.3 kB)
preview shadow.jpg (582.2 kB)
more ▼

asked Jun 19 '17 at 01:48 PM in Using UE4

avatar image

1 1 1

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

1 answer: sort voted first

You can add some more details about the game (VR or if your players gets close to the edges).

I would probably just fake it and produce a similar pattern on the ground in the material. Since you are baking the light, you probably will never move the light anyway, so you can get away with it.

Except when the player moves to the edges where the player can compare the cage with the ground shadows more easily. So, to get a good result, you need to split your ground plane, so Unreal can produce more light maps (information for the shadow). <3

more ▼

answered Jun 19 '17 at 02:00 PM

avatar image

2.1k 77 14 89

avatar image aaron_zi Jun 19 '17 at 02:44 PM

It is a first person shooter and I´m building an arena. The Picture below shows the actual implementation of the model (player start to demonstrate size).

alt text The player can get close to the edges and later there will be more content in the map, so I need "real" shadows (smaller objects are no problem).

I already thought about splitting the objects in smaller pieces but this would be more difficult on more complex objects (like landscape). I´m also not sure if this would be too heavy to build (light build would take hours maybe). Is it better to make the objects as small as possible to keep the lightmap resolution small and have rather more objects? Or is it better to have less bigger objects but with high resolution lightmaps?

Thank you for your fast answer <3

avatar image Ninjin Jun 19 '17 at 03:34 PM

Now this screenshot looks a bit different, because there are actually objects inside. And the answer for your last question is something you won't like... "it depends". It's difficult to say, because every game is different. Nobody can tell the exact ratio of objects to lightmap resolution, there are just 2 many other factors that come into play. LOD, Instances, texture resolution, lightmap resolution just to name the first that come to my mind. Everything is connected together and only if you profile your game, you will see a difference.

avatar image aaron_zi Jun 19 '17 at 03:49 PM

Yeah, you are right, there are many factors. But what I experienced was that the 4k lightmap on all floors of my map increased the build time by a lot but when I was using the brushes (box brush) the build was really fast. I think brushes are split into small parts before you create a static mesh out of them and the small parts of the brush have their own light map (correct me if I´m wrong). Also with the plane (same size as box brush) the build took far longer as with the brush. So I wondered if smaller objects with smaller lightmaps are maybe more efficient.

avatar image aaron_zi Jun 19 '17 at 06:53 PM

Another problem is texturing. When I split a model in smaller pieces those pieces have to fit seamlesly together. Right now I don`t know how to do this properly because when I unwrap each piece, the size of the polygons is not unified between the pieces as far as I know (also the orientation is different). When you unwrap a mesh the UV-layout tries to fill as much of the UV-map as possible so there will be differences between the different pieces.

(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