Jump to content
Sign in to follow this  
PogoP

Cryengine Interior Lighting Tips?

Recommended Posts

Hey all

 

Just posted this on Facebook and Will suggested I ask on here.. I'm making an interior scene in Cryengine, and just wondered if anybody had any tips/tricks on how to get nice looking interior lighting. Obviously Cryengine is fantastic at exterior lighting but interior lighting is a whole other kettle of fish and I'd love to see how you guys go about doing it.

 

I've done a little research on the wiki but it's very formal and more technical, as well as a little bit outdated. I'd be interested to hear more practical ways of going about doing it. If anybody has any example maps that would be incredible too!

 

Lemme hear 'em!

 

Cheers!

Edited by PogoP

Share this post


Link to post
Share on other sites

vis areas, environment probes, point lights, point lights with projector textures and area lights. Tricky bit is merging inside to outside. Very similar to unreal really, except you don't bake lightmaps ...

some tiny corridors in crysis 3 have up to 100 entities for lighting and rendering effects, it's allot of hands on stuff. a good tip is to make prefabs of a light source and simply update them all in your scene

if it's an art portfolio scene you don;t need to worry about all the performance considerations, that's where it gets tricky

A typical wall light would contain, the light model itself, a point light with projector for direction, a point light offset for ambient fill,a point light for lens flare and a geom entity light beam model. Sounds like a shit ton of work but it's about the same even in source engine. Dynamic shadows are usually only cast from the main directional projector light.

Edited by 2d-chris

Share this post


Link to post
Share on other sites

Great stuff Chris, thanks for all the tips.

 

For stuff like sunlight streaming in through windows.. You don't really get any bounce light from that. Do you normally put down point lights to simulate a bit of light bounce?

Share this post


Link to post
Share on other sites

well we use point lights to simulate bounce/gi too, but yeh also environment probes, they are often used to darken areas (negative lighting) we also had negative lighting on point lights, not sure if SDK has that functionality

Share this post


Link to post
Share on other sites

Ah ok. I'm a bit confused by environment probes.. I can understand them being used on reflective materials, but my scene is all wood, wallpaper and carpet, so how exactly would they be used in that context? Just curious!

Share this post


Link to post
Share on other sites

Ah ok. I'm a bit confused by environment probes.. I can understand them being used on reflective materials, but my scene is all wood, wallpaper and carpet, so how exactly would they be used in that context? Just curious!

Yes they can, they are heavily used in all environments in Ryse. Its just about getting the settings on them right. But again, not sure if all the features we have are in the sdk atm.

Share this post


Link to post
Share on other sites

Environment probes are the tits.

 

I did a lighting tutorial for nexuiz, but the engine has changed greatly.

 

just be really careful with the lights.  theyre way more optimized these days, but they can still quickly spin out of control.

 

i touch a lot of features in this, some are obsolete:

 

Share this post


Link to post
Share on other sites

Environment probes are basically a form of image based lighting, the main benefit of them is the fact that they can provide directional ambient lighting affecting both to the specular and diffuse component! Quite similar to the below image:
04_graded_sun_disc.jpg

Note the difference between the color of the surfaces facing left and facing right.(image from: http://www.fxguide.com/featured/the-state-of-rendering/)

This will work the same for exteriors(example: dusk skydome with a gradient from red to purple) and interiors. Note that the changes in ambient lighting in interiors are generally quite a bit more harsh compared to exterior settings -> so you will want to use more probes to get a better result (the more probes you use the closer you get to emulating gi). Depending on the geometry them being spherical might become somewhat of a annoyance though.

 

Also probes receive the lighting directly from their surroundings so by using them you will get the proper ambiance levels. I would go as far as zero'ing out all ambient lighting settings in the ToD parameters(note that your environmets will black before you enable and generate your probes if done this way) and only using probes for ambiance(note this might cause some problems with particles: they will not receive the ambiance form the sky color, and other small bits and bobs). All though the free sdk is quite a bit behind you probably want to have the diffuse and specular multipliers for the probes at 1 and hdr at 0 or what ever else makes a mirror material(black diffuse, white specular) match up with the surrounding environments.The more times you generate the probes the more "indirect bounces" you get.

 

You might also want to play around with the box projection properties for the probes as that way you will get better localized lighting. Regularly the probes simulate an infinitely far away box  so when you move around the reflections/ambiance doesn't change inside a probe. But using box projection means that the reflections change based on your location relative to the probe.

 

Another note: that you can use any sort of emissive material to add light to the probes be it the sky, emissive particles, glowing fog, or a glow material on an object.

 

Visareas are mainly used to save performance and their documentation in the sdk manual should be very much sufficient for settign them up, if not you can always ask here. It is good to know how to use them but likely not needed for a portfolio piece. If you decide to use global ambient lighting from the tod menu you can also use visareas to change local ambient light levels.

 

The rest is pretty much just adding in regular lights to add actual light sources(like chris described) and if you want to fake additional GI or light bleeding or caustics or whatever else. And negative lights(they do work in the free sdk) for additional AO(use negative diffuse/hdr value in the light properties). Also you can use light boxes to limit the area affected by the light.

 

 

 

 

 

*Edit* Just in case and for good measure adding an article about physicalized shading as that is becoming or already has become a very big thing. It is not actually implemented in the free sdk, but following the basic principles for it can get you some really good results.Also gloss maps become very important with this approach as do environment probes.

 

Link: http://www.fxguide.com/featured/game-environments-parta-remember-me-rendering/

 

Short explanation follows:

 

There are mainly two types of fundamentally different materials metals and dielectrics.

 

Dielectrics reflect light by actually letting the light go a tiny but underneath their surface and then hopefully finding its way back out again. Regular dielectrics do not have colored specular information!

For rendering in cryengine it means that the diffuse component is the dominant one.

 

Check out this table for a variety of the diffuse values:

Albedo_values-462x768.jpg

 

Metals mainly reflect light straight from their surface. For pure metals the diffuse component is almost non existent. Metals do have colored specular. That is the same for perfectly polished and matte sanded metals(This is why gloss maps are very very important).

In cryengine this means that all reflected light is reflected through the specular component. If there is no probe to reflect the environment then there wont be a proper reflection.

Below is a chart for specular values for common metals and dielectrics:

SpecularChart.png

 

 

 

 

And one more important thing is the conservation of energy: non emissive materials can never reflect more light than they absorb.

 

*Edit*Edit* There is a great talk about physicalized shading done by the guys from Guerrilla, and they explain it a lot better than I can:P

 

 

I hope this might be useful :)

Edited by AtsEst

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×