Announcement

Collapse
No announcement yet.

crimson's thread of questions

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

    crimson's thread of questions

    Hello!

    I'm presently working on a level with UDK, the November version. I opened this thread to host all the questions that might arise during development.

    Without further ado:

    1. Importing Collision for Static Meshes from Maya.

    Now, I've read the UDN page on Collision but I seem to be doing something wrong because my collision mesh doesn't get "translated" by the engine and remains part of the static one. To exemplify:

    I created a cube 100x100x100 cm in Maya called cube155. Then I created another cube 256x256x256 cm and renamed it UCX_cube155. Next I triangulated both meshes and deleted the history.
    Then I exported them with "axmesh" and the following options: "selected items only", "obey hard edges" and "consolidate output geometry".
    Then I imported them in the UDK, both with and without the "bOneConvexPerUCXObject" option.

    Any ideas?

    Thank you!

    cc

    #2
    I am still learning this stuff too, so take this with a grain of salt. uncheck consolidate output geometry. I believe this option makes it all one mesh but really you want it to be two separate meshes, the actual mesh, and the collision mesh. This should still export as only one file with 2 parts. Then when you import use the bOneConvexPerUCXObject option.

    Comment


      #3
      Thanks for the reply shatty! That did indeed work.

      I've got a new one: what's the best way to simulate neon light? Creating a emissive material gives it the look, but it doesn't cast any light. Point lights have a spherical radius which kind of goes against the neon shape.

      Closest I came to was using two spotlights, one at each end, with a small cone radius. It's still a bit off because you get more light in the middle.

      Any ideas?

      Much appreciated!

      cc

      Comment


        #4
        There are 2 ways to do it:

        You tell udk that this material emmisive emits light (it will work as light source), just search udn for how to do it.

        Or you can fake light aura with some fuzzy (blurred gradient texture), decal and some lights, this method gives more control about "light" and shadow (you can get better and more accurate results), but requires more work.

        Instead decal you can use lightfunction, it will cover light and decal in one actor.

        Ps.
        You should read this tutorial: http://www.unreal.fr/tutoriaux.php?tutorial=49
        it was written for ut2004, many things are done automatically now by lightmass, but it will help you to understand how original design of lightsystem works in unreal engine. Also has many great pointers about art side of lights in game levels. And your way of doing neon light was actually used a lot in all unreal games.

        Comment


          #5
          Thank you for getting back to me. That light tutorial is really inspiring.

          I'm having some problems with getting the Light Function to work the way I want it to. Allow me to explain:

          Imagine a cubical room, with vertical neons in each corner, all the way from bottom to top. I tried using a strip-like texture for the light map - that narrows the light, but it loops on the ceiling and floor as well. I sorted the top and bottom issue by cutting the light strip so it doesn't reach all the way.

          However, this didn't sort my other problem, which is lighting the adjacent wall. Basically, with a neon in the corner you should have a strip of light on the left and a strip on the right. At the moment, the left is ok, the right is all lit. I figure I can simulate the right behaviour by using another light, but that's eight for a each cubicle.

          Short of it: is there a way to make a light function material that lights two perpendicular walls in the same fashion?

          Using the Lightmass emissive thing ups my build time by around 20 seconds for each static mesh so I'd rather avoid that.

          Finally - I've got this really simple cube static mesh (polygonal walls, not planes). It has weird looking shadows in two corners of the front/back faces. It's not a normals issue. Any ideas?

          Thank you!

          cc

          Comment


            #6
            Originally posted by crimson.cosmos View Post
            Finally - I've got this really simple cube static mesh (polygonal walls, not planes). It has weird looking shadows in two corners of the front/back faces. It's not a normals issue. Any ideas?
            Smoothing groups and/or Lightmap UVs. In Maya, harden all the edges and check it again. If that doesn't work, you need to make Lightmap UVs and make sure the shells are spaced apart correctly.

            Comment


              #7
              Thanks Photonic!

              It was indeed caused by some soft edges Maya created when I triangulated the mesh. However, the problem isn't completely gone. I got rid of the old shadows, but now I have a hard line over an edge.
              Here's a picture to exemplify this:

              Is this still a smoothing groups issue? I already have a separate UV layout for Lightmass, I checked that all the edges are hardened. If I export from maya without "Obey hard edges (convert to smoothing groups)", the respective line isn't visible anymore, but I get shadows on the corners instead.

              For the Light Function, I thought I'd provide an image as well, to make things clear:

              You will notice that on the left wall the texture is stretched. Same thing with the floor and ceiling, though they're not visible in that picture. I know there must a way around this as the UDN picture on light functions (here) shows it being cast on perpendicular surfaces as well. Ah, if it matters, the light function texture used in that picture is just a Photoshop stained glass filter.

              Thank you guys!

              cc

              Comment


                #8
                Hey!

                I sorted out the seam in picture one by softening the triangulation edges and keeping the other ones hard. I also re-mapped my Lightmass UV as per Tom Havlik tutorial.

                The light function issue remains, however. Any help in that direction is greatly appreciated.

                And I've been meaning to ask this for a while now: is it feasible to have all my materials in the 50-60 instructions range or does that impede performance too much?

                Thank you!

                cc

                Comment


                  #9
                  Hello!

                  Another few questions for you

                  1. I've got light shining through my static mesh - from what I read so far, it could be because it's not a closed mesh. I've got a modular "shaft" and a "shaft cap" for the lower end. At the top it ends with a room, again, bottomless and with an additional door so that's not closed either. When everything is in place, there are no holes, but I still get light through. Since Light Volumes aren't there anymore, what are my options?

                  2. I got a cloth skeletal mesh - a banner. Problem is that it doesn't seem to receive light. I checked, it has the lighting environment enabled but it's still in the "Dynamic" channel instead of the "Composite Dynamic" one. Most settings are at default (i.e. receive light and all that). Tried with with a point light, tried checking "force dynamic light", tried selecting the "dynamic" channel as well.

                  3. I've been reading quite a bit on shadows, but I don't remember seeing if there's a way to have the opaque parts of a translucent material cast shadows on a static or a dynamic object. I can't use a dominant light because I need it in more than one place.

                  4. The light function stretching question remains.

                  Much obliged!

                  cc

                  Comment


                    #10
                    Originally posted by crimson.cosmos View Post
                    The light function issue remains, however. Any help in that direction is greatly appreciated.
                    It makes more sense to just enable emissive light builds for this. If you don't want to do that, use a decal. Light functions are made for whole area effects, like a disco ball OR for very specific lighting setups (like a sign, or even the bat symbol.)

                    Originally posted by crimson.cosmos View Post
                    And I've been meaning to ask this for a while now: is it feasible to have all my materials in the 50-60 instructions range or does that impede performance too much?
                    Shouldn't be a problem. Don't worry about performance until your done and you want to optimize. Just as reference, I have ocean shaders and transition shaders I made that are 150 instructions or more...

                    Originally posted by crimson.cosmos View Post
                    1. I've got light shining through my static mesh - from what I read so far, it could be because it's not a closed mesh. I've got a modular "shaft" and a "shaft cap" for the lower end. At the top it ends with a room, again, bottomless and with an additional door so that's not closed either. When everything is in place, there are no holes, but I still get light through. Since Light Volumes aren't there anymore, what are my options?
                    Cap them. There is very little reason not to cap modular pieces now a days. You can make their UV areas really small, as well as the lightmap UV space. Before you do this though, I would like to see a screenshot so you don't do a ton of work for nothing.

                    Originally posted by crimson.cosmos View Post
                    2. I got a cloth skeletal mesh - a banner. Problem is that it doesn't seem to receive light. I checked, it has the lighting environment enabled but it's still in the "Dynamic" channel instead of the "Composite Dynamic" one. Most settings are at default (i.e. receive light and all that). Tried with with a point light, tried checking "force dynamic light", tried selecting the "dynamic" channel as well.
                    Hmm, should not be a problem if you are using a dynamic light on it. Did you enable force CPU skinning in the skeletal mesh editor properties for the banner? It should be on. Then just add one into the scene, don't change the settings and shoot a dynamic light on it (add one from the actor browser). Also, make sure its material is set to lit, and not unlit.

                    Originally posted by crimson.cosmos View Post
                    3. I've been reading quite a bit on shadows, but I don't remember seeing if there's a way to have the opaque parts of a translucent material cast shadows on a static or a dynamic object. I can't use a dominant light because I need it in more than one place.
                    Dynamic, I am not sure. Usually I would do this with material channels, and just make the translucent part a translucent material. The opaque parts should not really be transparent...

                    Comment


                      #11
                      Thanks for getting back to me!

                      Originally posted by Photonic View Post
                      It makes more sense to just enable emissive light builds for this. If you don't want to do that, use a decal. Light functions are made for whole area effects, like a disco ball OR for very specific lighting setups (like a sign, or even the bat symbol.)
                      The reason I hesitate when it comes to using the emitting channel for lights is that my build times drastically shoot up when I do it. Also, the fact they're not as configurable is another letdown.

                      Good call on the "Disco Ball" though - that was one keyword pair I hadn't searched. I found something here. Same stretching problem and a solution given by ffejnosliw. Basically he suggests using a Camera Vector connected to the UVs of a texture cube with all the faces covered in the light function's texture.

                      Cap them. There is very little reason not to cap modular pieces now a days. You can make their UV areas really small, as well as the lightmap UV space. Before you do this though, I would like to see a screenshot so you don't do a ton of work for nothing.
                      By "cap them" you mean close the meshes? How do you exit a room without a door? Anyway, here are some pictures of the lift shaft, lift shaft cap (bottom) and the room at the top.







                      Hmm, should not be a problem if you are using a dynamic light on it. Did you enable force CPU skinning in the skeletal mesh editor properties for the banner? It should be on. Then just add one into the scene, don't change the settings and shoot a dynamic light on it (add one from the actor browser). Also, make sure its material is set to lit, and not unlit.
                      Checked the material, even tried a different one. This one's weird. I set the cloth to collide with the physics gun so I could wave it around. There is a certain angle under which I do get light on it, but I think it might just be the specular. Of note is that while I had it spaced away from the wall, it seemed to pop a shadow on the BSP as it waved close to it. The pictures below should make things clearer.

                      No shadow, no light:


                      Light:


                      Shadow and light:


                      Dynamic, I am not sure. Usually I would do this with material channels, and just make the translucent part a translucent material. The opaque parts should not really be transparent...
                      For this do you mean by using a Physical Material Mask? Let's say, for simplicity's sake, that I have a frame of metal and the centre of glass. They're both on the same UV channel on the mesh. I have a material with the respective texture set to translucent and driven by the alpha channel on the diffuse map.

                      I went about trying to use that fancy thing you mentioned - here's how:
                      - I made a copy of the material and changed its mode back to Opaque.
                      - Then I created two Physical Materials with default settings.
                      - Then I tied in the first Physical Material to the translucent material and the second one to the opaque one.
                      - Finally, I created a material instance of the translucent material,
                      - - set the bitmap as per UDN's guide,
                      - - set the UV channel to the one used by the diffuse texture,
                      - - set the white physical mask to the physical material connected to the translucent one
                      - - and the black mask to the physical connected to the opaque one.
                      - Then I modified my static mesh to use the material instance instead of the old translucent material.

                      Obviously enough, it doesn't work. I looked for tutorials on the subject but I couldn't find anything showing exactly how the Physical Material Mask can be setup.

                      As always, help is greatly appreciated! And thanks again, Photonic!

                      Cheers!

                      cc

                      Comment


                        #12
                        Based on your meshes, don't use meshes... use BSP.

                        When I say use 2 materials, I mean use 2 material channels. In maya, create 2 materials, and apply each of them to a different section of the same mesh. So one material for the transparent part, one for the rest of the mesh. Now in unreal you can apply 2 different materials to that mesh.

                        Also, you can configure emissive lighting by going into the mesh properties and changing the lightmass settings. Your right though, it does make the build times go up.

                        Comment


                          #13
                          Hey!

                          Thanks for the reply!

                          I know BSPs have more of a negative impact on performance than Static Meshes do. Of course, in this particular case, that might not really be an issue. But as long as I have them built?

                          I guess the point is how would you go about blocking the light from passing through with Static Meshes? More to the point, what happens to the doors? Theoretically, every room is going to have at least one "hole" where that is.

                          Another interesting issue is that I've read on several occasions that people have been using static meshes to create a ceiling for BSP rooms when they had trouble with the light shining in. This would indicate that a SM stops light even when it's not "closed".

                          On the materials issue, yes - that would work and, in fact, I'm already using the method in some instances. This doesn't easily lend itself to detailed texturing. To exemplify, using the frame/window example from above - the window isn't plain glass, but glass with metal "encasements". Replicating those in the geometry would be quite tedious.

                          Besides, I'd really like to learn how to make the Physical Material Mask thing, if at all possible.

                          Any ideas on the banner issue?

                          The problem with emissive lights is that you can't (far as I know) set the radius or choose the channels for them. To replace basic point lights they're good, but anything more complex than that is better simulated with a proper light. Any ideas why they're so resource intensive though?

                          Thank you!

                          cc

                          Comment


                            #14
                            Kicking this to the top.

                            Summary of the outstanding issues:

                            1. How to "cap" meshes so that light doesn't shine through them? See images above.

                            2. What am I doing wrong in setting up the Physical Material Mask? See bottom of the post with the pictures.

                            3. My banner doesn't seem to get lit, aside from certain angles while swaying. Again, pictures above.

                            Much obliged!

                            cc

                            Comment


                              #15
                              Hey!

                              Solved

                              I managed to get the Light Function where I wanted it, i.e. around all four corners of the cube, spanning top to bottom.
                              As mentioned in a previous post, I had to use a Texture Cube on which I placed the LF texture on four faces. To prevent the light from shining on the floor as well, I placed a simple dark gray texture on the PosX and NegX faces of the Texture Cube.
                              The LF itself is just a white strip (gradient), on a dark grey background, with an offset filter to shift it from centre to top and bottom.

                              One thing I couldn't figure out how to do is use a Panner in conjuction with the Coordinate Vector for my Cube Texture. Any ideas are appreciated. As things stand, the Panner gives off a float2 while the Coordinate Vector gives off a float3.

                              Also, I tried using a "Parameter Cube" instead of a Texture Sample, but that doesn't seem to accept a Coordinate Vector - same float2 -> float3 issue.

                              On the light shining through the static mesh, I had the cabin at the top of the shaft meet the top of the shaft just on one edge per side instead of a whole polygonal face. I believe that's why light shone through.

                              That's two big ones out of the way.

                              Questions

                              Do you happen to know how to set up a Physical Asset for a cloth? First off, does it need one?
                              Secondly - a cloth has just two bones so that makes the whole thing kind of awkward.
                              Third - does one export skeletal meshes with an UCX collision from the external application as one does for static meshes or is the physics asset supposed to handle collision?

                              And, lastly, I'll renew my request for help concerning the Physical Material Mask

                              Thank you guys!

                              cc

                              Comment

                              Working...
                              X