Swift Shadow System

Community Forums/Developer Stations/Swift Shadow System

rsbrowndog(Posted 2004) [#1]

Having licensed it ages ago and not gotten round to using it (mainly because it doesn't support MD2's or Blitz Terrains) I finally implemented the Swift Shadow System in a small project last night.

And it's fantastic!!!

It's so easy to implement and the results are so good. You just set it up and it works, no fiddly little bits to do every game loop or anything. Brilliant.

The only thing I would say is that it's not 100% clear from the library and the example how to implement the stuff into your own code. In fact, I find sswift's example code quite difficult to read but that's probably my failing rather than anything wrong with the code itself.

You can read more about the library here:


I'll close by saying again that I HIGHLY recommend this library if you want to add shadows to your own projects!



Rob Farley(Posted 2004) [#2]
If I had $100 knocking around in my back pocket I'd buy it as it does look excellent... as it happens... I don't... so... I won't.

I didn't realise it didn't work on blitz terrains either.

rsbrowndog(Posted 2004) [#3]
You can use the Swift Terrain System for your terrains instead, the shadows work with that apparently.

Give sswift a shout, he may do you a special deal! Especially if you are willing to give him some pimpage in your excellent projects... I'm thinking of Carrier Command here!



Barnabius(Posted 2004) [#4]
Swift's systems have two licences. Shareware licence is $15 only, so everyone who is in a need of one of his systems really have no excuse to get them...


Rob Farley(Posted 2004) [#5]
Apart from the fact that there are more useful applications in need of purchase first. Ulitimate Unwrap for example.

And with regards to good excuses:
Just moved house, my mortgage costs over £700 per month, heavily overdrawn due to legal fees of the house moving, still paying for my car, don't even have internet at home as it's too expensive at the moment, having to check food bills and question if we need to get meat this week as meat is much more expensive than loads of veggies. Sticking the car into neutral when going down hills to save fuel. I could go on but I won't.

No excuses... You're so right.

Mustang(Posted 2004) [#6]
...Or you might manage to get commercial licences for ALL Sswifts systems for less than $100... but you have to be lucky, daring and in the right place in the right time - like I was long time ago :) [and no, I won't tell you how I managed to do that]

Sswifts systems are good, my favourits are the shadow and GUI systems, easy to setup and they work nicely and are quite speedy if you do things right.

Knotz(Posted 2004) [#7]
Swifts libraries are very good, neatly programmed, easy to read and use. Yes, i'm a happy customer.

wmaass(Posted 2004) [#8]
Ditto, good stuff sswift. Works great in this shot.

Dreamora(Posted 2004) [#9]
looks really cool :)
*I know now why I bought it too *ggg*

Picklesworth(Posted 2004) [#10]
wow I had no idea it could do that!

SSwift, once I find myself an excuse, you've got yourself another customer!

IPete2(Posted 2004) [#11]

I second that or is that third or fourth or probably fifth that!

Swifts shadows can be soft too! I thought it would be more difficult to use,but I was up and running in a few mins.

Animated characters too! :)

All of Shawn's stuff I have purchased so far are really good and well worth the money for the time and brain power you would need to make them yourselves.


Picklesworth(Posted 2004) [#12]
Oh yah, nice shot too! That is some great scenery. Is it a golf game?

wmaass(Posted 2004) [#13]
Yeah thatís a shot from an early golf project of mine. The shadows make all the difference.

John Blackledge(Posted 2004) [#14]
How do you make the trees - what system?

wmaass(Posted 2004) [#15]
That's all Maya. Those were done long ago. The community seems to have better and faster ways to create trees now though.

Tom(Posted 2004) [#16]
I'd use a lightmap for golf terrains/meshes, and save the realtime shadows for player, ball, flag e.t.c. It's save some CPU juice :)


rsbrowndog(Posted 2004) [#17]

One of the great things about the Swift Shadow System is you can specify whether objects cast STATIC or DYNAMIC shadows.

So in the example golf game above, the trees would all be casting STATIC shadows as they don't move (and therefore don't require updating) and the Golfer, Ball, etc. will all cast DYNAMIC shadows so they update as they move, animate, etc.



sswift(Posted 2004) [#18]
Hi there,
I'm glad folks like my shadow system.

I've been following this thread and I just wanted to comment on what Tom and Rsbrowndog said.

For each static shadow, one entity/surface is created.

Because of this, lightmaps can be faster than static shadows. But it depends on a number of factors.

One is whether or not your lightmaps are applied using a second texture unit, or whether they are on a second surface. If they are applied using a second texture unit, they will be faster than static shadows.

If they are applied using a second surface, whether they are faster or not depends on a variety of things. But either method will be slower than the single surface multiple textures method, because they both involve overdraw.

Now, if you have a second surface for lightmaps, and you cover the entire terrain with the lightmap, then static shadows may be faster if you have trees sparsely populating the map. However, when in those areas where the trees are thick and their shadows overlap you will see a lot of overdraw which will impact the framerate.

Static shadows work best when used for things like sparsely populated trees, and buildings, where the shadows are unlikely to overlap much.

Another way you could do lightmaps though would be to have asecond surface, but only have polygons where shadows actually fall. I don't know if there will be overdraw in those areas that are effectively transparent, but the polygons there may still slow stuff down, even if there is no additional cost incurred from the overdraw. Removing those polygons could well give you better performance than using static shadows on scenes with clumps of dense foliage.

There is a benefit to using static shadows though that you don't get with lightmaps. And that is shadow resolution. You can have fairly detailed shadows with static shadows, whereas you would be limited to blurry shadows if you just streetched one lightmap over the terrain. Of course specialized lightmap solutions can overcome this.

Another thing to take into account is that one could combine their tree clumps into a single mesh, and then create a static shadow for each of those, instead of for the individual trees. This would make the shadows not appear to overlap, and only use one surface per clump. It would still not be as fast as using a second lightmap texture, but it would effectively be as fast as any other method of lightmapping, and possibly faster if the shadows are disabled when distant. Plus again you have the advantage of higher res shadows.

Picklesworth(Posted 2004) [#19]
Does the swift shadow system take semi-transparent objects or parts of objects into account? (with the fact that they're semi-transparent and get a different shadow)

sswift(Posted 2004) [#20]

Take note of the picture above. The trees have masked/alpha leaves and they cast proper shadows on the ground.

wmaass(Posted 2004) [#21]
When I first purchased the system it did not -- but sswift "swiftly" took care of that :)

*(Posted 2004) [#22]
I too am a happy customer, although I dont have any piccies as yet to show :)

Picklesworth(Posted 2004) [#23]
sounds good. It's a shame that I'm working on a program right no so I have no excuse to buy it, but I'll be using this in my next decent game for sure :D

Dreamora(Posted 2004) [#24]
sorry wrong posting ( thought dynamically created meshes cant be used for shadow but update normals solved it )