Urban Terror Forums: Shadow magic - Urban Terror Forums

Jump to content

 Login | Register 
Advertisement
Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Shadow magic Rate Topic: -----

Alternative lighting

#1 User is offline   Wily Duck Icon

  •   mapper   
  • Account: wilyduck
  • Country:
  • Joined: 28-February 10
  • Posts: 634

Posted 23 April 2013 - 01:13 AM

For ut4_superman2_beta, I developed a couple lighting techniques I call "shadow magic" and "fakelit lightmapping".

The problem stemmed from the map being very large and pushing -light safe_malloc to/beyond its limits. If beyond, -light crashes within seconds of initiating the compile.

I had already heavily optimized this map with lots of func_group->_lightmapscale optimizations in ut4_superman. Adding about anything else breached -light safe_malloc.

My solution was to strip out unnecessary lightmaps from the map entirely, replacing them with fake lightmaps.

To accomplish this, I needed a lightmap export from a final compile of ut4_superman. I then identified a lightmap texture from the exported .tga's that would be placed in a big open area outside. No shadows, no bounce reflections. Had to consist of a single pure color that could only be produced after a final compile completed.

This lightmap_color was saved as a .tga and became the replacement for $lightmap in the lightmap stage of a shader.

Anywhere in the map that had large, shadow-less lightmapped areas were subjected to fakelit maps.

A few areas had something that would cast a small shadow over this large area. This is where shadowmagic came in. By manually identifying the area of the shadow, a shadowmagic brush surface would overlay the small area with a $lightmap.

The results speak for themselves. Nobody can tell the difference. -light did not crash and compiles were shorter. The map size even reduced by a few meg.

There are a few areas that were not thoroughly inspected beforehand so if one is looking closely, they would be able to see artifacting between a $lightmap surface and a fakelit surface. Curb area by the white van is one of those places.

The .shader tells what you want to know if interested. Play the map if you want to see. My time is limited so you'll have to go look if you want to know more.

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users

Advertisement


Copyright © 1999-2024 Frozensand Games Limited  |  All rights reserved  |  Urban Terror™ and FrozenSand™ are trademarks of Frozensand Games Limited

Frozensand Games is a Limited company registered in England and Wales. Company Reg No: 10343942