Home Unreal Engine

Creating 'cell-shaded' materials for static meshes

Longtime lurker, first post. I wonder if anyone might be able to point me in the right direction.

I am pretty new to UDK, but I have a fairly good handle of modeling/texturing and level design in the Source engine.

I have been working on an environment in UDK for a couple of weeks as I learn the software, and I am unsure how to accomplish one of my goals.

I would like to create level geometry using static meshes use a 'cell shaded' effect. A good example of what I'm roughy aiming for can be seen in the background in this screenshot from the game 'Journey'

journey2.jpg

I have a couple of questions:

Is it possible to achieve an effect similar to this using lightmapping on static meshes, or should the meshes be vertex lit?

In order to achieve these effects, should I implement a material with a 'custom lighting' component?

Does 'custom lighting' affect lightmapping?

I have seen many 'cell shading' tutorials for UDK materials, but it seems that most of them are for meshes that will be animated or moving. Is there perhaps a better solution for my problem ... that is, am I asking the right questions?

Thanks for reading - thanks for any insight you might have.

Replies

  • Ace-Angel
    Options
    Offline / Send Message
    Ace-Angel polycounter lvl 12
    I tried this a LOOOONG time ago, so take what I say with a truckload of salt since alot could have changed since then.

    Generally speaking, Lightmaps are going to take into consideration the radiosity and bleed of light bounce, so I don't think it would be possible for said effect to be baked into lightmaps, at least in my case, my bakes never kept the cel effect.

    Vertex lit is a solution, but I'm not sure how well those have improved over the past iterations, you might need to plan your mesh and it's density ahead of time if you know which direction the light is coming from and it's not moving or too complex in the scene.

    Yes, you need to use a Custom material for the effect, since you will need to manage your diffuse term to create the cut/layered effect for the shadow on the diffuse term itself. It's especially needed if you want/don't want any ambient colors in your model (CustomLightingDiffuse).

    Custom materials do affect lightmaps, but only so much before the lightmap gets rid of their effect, for example, a fresnel won't get baked too well in lightmap information, hence why many fresnel based models aren't baked, even if static.

    I don't know if there is a better solution, but maybe having your entire scene be 'not baked', and instead rely on 1 single dominant light might work? You could also decrease the distance which is affected by the dominant light, so anything which is far away only gets the material shadow term (EI: lambert) and only when you get closer you does the shadow actually cast correctly for performance reasons.

    It's very possible they did this for journey, since it's not a graphically intensive game at any given moment.
Sign In or Register to comment.