Announcement

Collapse
No announcement yet.

Problem with shadows

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Problem with shadows

    Hi!

    I'm making a game from scratch for the first time, as a school project but have ran into problem. My static meshes wont cast shadows. I tried export both as FBX and with actorx from maya but nothing helps there. What settings should the lightsource and static mesh use? When i move the light, the shadows appear and when i build all, the shadows are gone! the lightsource is located over the table

    Please help me!


    #2
    This is probably due to your lightmaps, make sure each of your meshes have a separate UV channel for the lightmap and try bumping up the lightmap resolution in the static mesh editor within UDK to something higher than 32 (I usually go anywhere from 128 to 512 depending on the size of the object) and that might get you your shadows that you are looking for.

    Comment


      #3
      How do i do this:"make sure each of your meshes have a separate UV channel for the lightmap"

      Comment


        #4
        You can also make the floor cast better shadows. Click on the floor so its high-lighted then press f5 and lower/raising the lightmap resolution. Dont kno what way it is atm.

        Comment


          #5
          Originally posted by patrikwindahl View Post
          How do i do this:"make sure each of your meshes have a separate UV channel for the lightmap"
          Check out this section of the UDN.
          You should be able to open the Static Mesh properties from within the Content Browser. From here open a tool in the Mesh menu called 'Generate Unique UVs'.



          You can probably keep these settings the same, click Apply and change the Lightmap channel in the right-hand pane to be '1'.

          Comment


            #6
            Thank you so much! I'll try this later today!

            Comment


              #7
              i get this error:"GenerateUV failed, couldn't convert to a D3DXMesh"...

              Comment


                #8
                Hmm, judging by this thread on the matter, the problem lies with DX10 and DX11 somehow :\

                The only thing I can think of is to switch your renderer to DirectX 9 and trying it again - although that's awkward!

                Comment


                  #9
                  Originally posted by patrikwindahl View Post
                  i get this error:"GenerateUV failed, couldn't convert to a D3DXMesh"...
                  Sometimes I get that same error, but try to leave that particular mesh alone for a while and do something else , re-open the mesh editor or save the package.( if any of those won't work then restarting the udk propably will.) After that it will generate the uv's just fine. At least that's how it works with my stuff. I've never understood WHY it gives that error every now and then, but truth to be told I haven't tried to fix it since in the end it always generates those uv's.


                  //edit. Fixed some typos!

                  Comment


                    #10
                    Hmm dont get me wrong, I have gone through like 100 pages over on Poly count and here relating the same issue of lights and shadows, It seems that even school who teach game art dont deal with this technical side of UDK :/. Neways back to topic, U need to actually make the lightmaps in ur 3d application for maximum results, Here hope this might help u understand better
                    http://www.3dmotive.com/training/fre...l/?follow=true

                    I would not recommend using build in lightmap generator as it is unpredictible in most cases ie it dont generate good UVs as a human would do .
                    Also make sure if you are using Dominant light increase ur Cascading shadow radius to 3500 and setting below it to 3 3 or 4 4.

                    Comment


                      #11
                      I've had the same problem, cascading shadow radius set to 3500 and Num Whole Scene Dynamic Shadow Cascades set to 2 did the trick

                      Comment


                        #12
                        I had same problem cascading radius did the trick , also set Num Whole Scene Dynamic Shadow Cascades to value of 2

                        Comment


                          #13
                          Thanks for all help guys. But the shadows did not appear after all this methods, so i decided to start all over from a new level. Using same models and now the shadows are working but it is really annoying to not be able to find the solution.

                          Comment


                            #14
                            If you wish to cast shadows, check the modulator/cascade settings in the light. Also, are you casting onto a BSP on the floor? if so, try checking its shadow settings by right clicking it and going to surface properties. Try using a small value first before trying a larger one, as the map size can overshoot. Also be sure to construct a set of unique uv's that have moderate spacing. It also helps to have continuous meshes (especially with the table) as it helps the engine to calculate ambient occlusion and shadows. If you imported the object from maya or max and there was multiple uv sets used on exporting this can cause a few issues. Make sure to clear all history and merge (where possible) uv sets together as this can avoid the issue of shadows not appearing properly.

                            Comment

                            Working...
                            X