Author Topic: Spire graphical design  (Read 2674 times)

Offline NichG

  • Full Member
  • ***
  • Posts: 125
Spire graphical design
« on: November 22, 2016, 09:48:03 pm »
I really liked the detailed breakdown of the problems of presenting the spire craft as distinguishable and having a range of shapes available in the last Kickstarter update. It got me thinking about how to render glowy things, and sort of how 'glowiness' can be indicated to a viewer without necessarily having a lot of high-intensity pixels.

One thing that occurs to me is that there's a difference between something which appears to be lit from within, versus something which appears to be reflecting a very bright light, versus something which appears to itself be emitting light.

Reflected light is very sharp and highlights high-frequency details of shape, so you can have an object which is a mirror-smooth perfect reflector and still get an impression of the details of its geometry (like a metal mask or things like that). This is especially true if the environment has a lot of directional variation, but it's trickier in deep space scenes where the environment is mostly just going to be black.

Direct light emitters in our experience have a tendency to saturate our visual scale - that is, they're so bright that we lose the sense of directly how bright the object itself is, but we gauge that brightness by the effects both on nearby objects (radiosity) and also by indirectly scattered light in the air and also inside our eyes - haloes and god-rays and bloom and glows and so on. The problem with indistinctness is that bright emitters correspond to masking nearby visual detail - the more you use, the less meaningful shape becomes. I think this is what might have been going on with the white glowy spire ship designs.

Internally emitted light on the other hand retains the blurriness, but rather than obscuring edges at the silhouette of the object like you get with direct light emitters, the blurriness is indicated inside the bulk of the object. So in this case, you actually are painting with shadows - places where the internal light is darkened indicate that the object is thicker along that view line. So high frequency details are actually painted with dark colors rather than bright colors. I think this might be a useful thing to gain more clarity in something like the Spire ships while retaining the glowiness. For some reference images, I think the best examples are things like backlit wax or jade objects - the light appears to be coming from within the object, but you still see the surface detail. For example, https://s-media-cache-ak0.pinimg.com/564x/e3/70/83/e3708375eaaf05e94a699e7866e70186.jpg, https://s-media-cache-ak0.pinimg.com/originals/4b/0f/0a/4b0f0ad27873927e23593c3c0bb98282.jpg,http://s1.wallippo.com/thumbs/300x250/melting-candle-wax-a3d47b628fccf0f1e78191bdfa2bc034.jpeg, http://imagineii.typepad.com/imagineii/images/wax_sculpture.jpg.

In rendering software, this is achieved by simulations of internal light scattering, or ways of faking that by e.g. computing the lightmap on the object surface from the light source and applying a blur on that lightmap which depends on the local object geometry. I think a cheap version would be to do something like the reverse of a rim shader, where surface normals pointing towards the camera contribute lighting to the object and surface normals pointing orthogonal to the camera are darkened.

Offline x4000

  • Chris McElligott Park, Arcen Founder and Lead Dev
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 31,651
Re: Spire graphical design
« Reply #1 on: November 23, 2016, 09:21:32 am »
Subsurface light scattering -- yep, I really love that sort of thing, for sure.  It's super expensive to calculate most of the time, though.  There was just recently a free screen-space shader that someone posted on the unity asset store, though: https://www.assetstore.unity3d.com/en/#!/content/75061

I'm not sure as to the efficiency of that yet, and I've not downloaded it yet, but the fact that it is screen-space rather than world-space means that it tends to be a lot lighter on load.  Like SSR or SSAO that we used in Raptor.

That's a really good idea, anyhow -- that could look super killer if done right. :)
Have ideas or bug reports for one of our games?  Mantis for Suggestions and Bug Reports. Thanks for helping to make our games better!

Offline NichG

  • Full Member
  • ***
  • Posts: 125
Re: Spire graphical design
« Reply #2 on: November 24, 2016, 12:50:35 am »
Since its static internal lighting rather than backlighting, you can probably even just precompute it in Blender or something by baking into an emission map rather than needing a shader for it.

Offline NichG

  • Full Member
  • ***
  • Posts: 125
Re: Spire graphical design
« Reply #3 on: November 24, 2016, 11:02:10 am »
Idea got stuck in my head, so I messed around until I figured out how to make the attached example. It's just an emission and diffuse map, so it'd pretty much be as cheap to render as anything else, but the emission map is baked using Blender's Cycles renderer with a translucent surface material, an absorbing volume, and various geometrical shapes as emitters buried inside the mesh. Basically the trick is that the falloff of internal lighting needs to be exponential to preserve detail, and the light source should be pretty close to the surface where you want it to be clearly delineated, and buried deeper when you want it to just sort of ambiently fill volumes. I made the absorbing volume reddish, so the light is white when near the surface and falls off to redder colors at the edge of the halo. If you just e.g. put a standard point light source inside a mesh and make it translucent, it just looks indistinct.

I'm sure this is also something a texture artist could just paint by hand.