Home Unreal Engine

Creating faceted shadows

polycounter lvl 11
Offline / Send Message
mospheric polycounter lvl 11
I'm working a small scene in UDK, and I'm trying to achieve a look similar to Geo-A-Day. While I have most of my scene working the way it should, the shadows are giving me issues.

bW3sQ.jpg

When building the lighting, all the shadows lose their faceted look. I've turned off lightmaps so that shouldn't be an issue. Any suggestions would be appreciated. Thanks!

Replies

  • darktype
    Not sure what's going on with your geometry. It's almost as if there are no smoothing groups prior to lighting, but then the model becomes entirely smoothed after building.

    Here's a quick test - Just a couple geospheres in Max with no smoothing groups, exported as an fbx with no smoothing. The one on the right just has a (.5) value in diffuse, and the one on the left uses a custom lighting mode so there are no sharp shadows (but since there is no smoothing it doesn't make a difference), but you could also change the value of the shadow on different angles. Built using default lightmass.

    http://i.imgur.com/pGmA5.png
  • Visceral
    Yeah setup yout normals in MAX or maya to be faceted (ie hard). And then import the FBX with Excplicit normals and make sure you export your smoothing groups in your FBX. There is a tic box for that.
  • mospheric
    Offline / Send Message
    mospheric polycounter lvl 11
    I cannot reproduce what you did Darktype.

    I created geospheres in Max. (unchecked the smoothing option on them)
    I then applied an edit poly to them so I can attach them.
    I exported them as an FBX, smooth groups checked.
    Imported them into UDK with explicit normals checked.

    This is the result I get. :/

    rYpY2.jpg
  • Santewi
    Have you tried using the simplygon tool in UDK? Just set the quality to 99 and recompute normals to hard.
  • mospheric
    Offline / Send Message
    mospheric polycounter lvl 11
    I trying the mesh simplification tool in UDK to no avail. I feel like I'm going crazy :P

    Thanks for the suggestions though! I wonder if it's a bug with this version of UDK? Maybe I should reinstall?
  • Ace-Angel
    Offline / Send Message
    Ace-Angel polycounter lvl 12
    Which version of UDK? I suggest using the latest one, or the one from last December.

    Which version of Max and what export version of FBX are you using? Some versions of FBX are outdated or need to have a couple of boxes ticked.

    Did you try ASE too? This could be another option.

    Are you baking to Lightmap or Vertex? Lightmaps should capture the shadows nicely, but from the looks of it, a Vertex would give you 'blotchy' shadows which don't respect the surface form.

    Do you 'need' to bake the Lightmaps? Or can you get away with one Dynamic Skylight? Also, what Lightmap resolutions are you using?

    If worst comes to worst, just bake out your faceted model as a Normal Map, and apply back to it in UDK.
  • mospheric
    Offline / Send Message
    mospheric polycounter lvl 11
    Thanks for the reply Ace-Angel.

    I'm using the latest UDK, which is from July. I have Max 2013 with the latest service update (5). I also updated my FBX exporter to the latest, and I'm still having the same issue.

    I'm not exporting the models with any lightmaps. I did it initially because making lightmaps are just a part of my workflow. Now though, I'm doing these without lightmaps.

    For my final result, I'd like to render out a screen shot from which I can work on in Photoshop to prepare for printing. I'm not sure if that requires to build the lights. I have a camera set up in my scene which I was planning on rendering from that.

    I like the subtle color gradation that happens when the light hits the faces of the models. I'm just trying to get the same thing in the shadows without it smoothing together.

    [edit] I also tried the exporting as ASE and got even worse results.
  • Santewi
    Have you tried using vertex lighting (lightmap res=0)?
  • mospheric
    Offline / Send Message
    mospheric polycounter lvl 11
    Yeah, those are the results I'm getting by changing the lightmap resolution to 0.
  • Ace-Angel
    Offline / Send Message
    Ace-Angel polycounter lvl 12
    Did you check and see if the boxes 'Tangents' and such are ticked for your FBX file when exporting? Also, when importing, did you check and see if the One-Smoothing group is Off in UDK?

    Also, since you just want to 'print out the image' later on, and it's not actually do something like an MMO, why not save some headache and not bake any lightmaps? Unless there is a specific reason, I would say from the posts, you don't need to.

    Also, don't put your LMS to 0, that's the reason you will start getting blotchy, interpolated shadows, they will try and wrap themselves around your model, all over the place, due to the small number of vertices you have.

    PS: If you could just sketch a quick example of what you mean by 'soft gradient on the faces', I don't even think you need shadows for the effect you're looking for.
  • mospheric
    Offline / Send Message
    mospheric polycounter lvl 11
    I've tried with the tangents turned on and still the same result. I'm starting to think that I'll skip the build with lighting part.

    I basically wanted to achieve something similar to these images.
    tumblr_mbm4xyciru1rcnp56o1_1280.png
    tumblr_malx0jegBM1rcnp56o1_1280.png

    As you can see, they have shadows present while maintaining the nice, hard edges in the shadows.
  • Visceral
    Okay so this is what i got.
    104eow9.png

    I created 2 geospheres, merged them together. And applied a Smooth Modifier to the stack, turned on autosmooth and lowered the threshhold to like 0.1 (might aswell go with 0).
    Collapse stack on that and export.

    Export settings where:

    Smoothing Groups
    Tangents and Bi-Normals

    And basicly nothing moore.

    Im using the latest UDK edition, i think that would be 07?
    Anyhow in import i check Explicit normals do UDK dosnt overrides my smoothing.

    Ligting was baked at production settings.
  • Ace-Angel
    Offline / Send Message
    Ace-Angel polycounter lvl 12
    Yeah, honestly, just don't use a Lightmap, I would also say most of the models in those pictures don't seem to be using an self-shadowing, just a harsh cut Half-Lambert term with some Rim-Lighting thrown.

    They're casting Shadows on each other, but not on themselves from the looks of it, hence why I said don't bake or bother with the shadows. The cast shadows from object to object will look just fine.

    Also, alot of AO, that seems to help.
  • mospheric
    Offline / Send Message
    mospheric polycounter lvl 11
    Thanks for the help guys :D Yeah I think I'm going to finish the project without building. I can save off a screenshot from within UDK's editor, so that should work fine.
  • wes.sau
    Based on your first and second images, I'd say your topology is fine since the dynamic light is faceting (assuming if you move the light around that all the other faces would look correctly faceted as well)

    But to get faceted lightmaps, try breaking up your lightmap UV clusters to be per polygon. Be sure to leave some padding between all those tris. You may need to up the lightmap resolution to compensate for the extra padding needed to avoid artifacts. I assume that's why visceral's screen looks like a few faceted and a few smoothed areas in the shadow areas, as this is probably corresponding to his lightmap UV layout. Yes/No?
  • Visceral
    wes.sau wrote: »
    Based on your first and second images, I'd say your topology is fine since the dynamic light is faceting (assuming if you move the light around that all the other faces would look correctly faceted as well)

    But to get faceted lightmaps, try breaking up your lightmap UV clusters to be per polygon. Be sure to leave some padding between all those tris. You may need to up the lightmap resolution to compensate for the extra padding needed to avoid artifacts. I assume that's why visceral's screen looks like a few faceted and a few smoothed areas in the shadow areas, as this is probably corresponding to his lightmap UV layout. Yes/No?

    i think i was able to reproduce the faceting. its just that the colors blend together on that screenshot. it looks pretty faceted on my monitor.

    but yeah i agree, split the lightmap uv's, im going to try that method too and see if it produces moore accurate results.
Sign In or Register to comment.