PDA

View Full Version : CryEngine shadowing investigation...


Pages : [1] 2 3

Intel17
03-03-05, 09:43 AM
Well, for a while now it seems, people have been under this impression that the CryEngine can do real-time lighting and shadowing just as well as Doom 3, because somebody thought that they just didn't utilize the engine correctly for that type of thing. Well, here's my investigation in the CryEngine on shadow maps and shadow volumes.

Shadow Volumes:

This is the interesting one! People (on this board) have been advocating that if you just set everything to cast stencil shadows in the CryEngine, then you can simulate Doom 3 quite accurately, or even better. After investigating this, the results are quite different from what I had expected, since I had read people's thoughts on this. Stencil shadows can be used a few ways in the CryEngine;

1.) Stencil Volumes can only be used indoors. When I tried to set shadow volumes as a flag outdoors on objects, shadows would disappear.

2.) Only dynamic objects can cast stencil volumes indoors. That's right. Only dynamic objects can cast stencil volumes. This means characters can cast them, dynamic switches/buttons and physics objects can cast them. I attempted to set stencil volumes as a flag on static objects, and static parts of the world, and there was simply just the pre-computed shadow there.

3.) They only get one. Regardless of the number of light sources, Stencil Volumes will only be cast from these dynamic objects once, based on the "strongest" or "most important" light source. I experimented adding a few dynamic, real-time lights into the scene and the characters and objects with shadow-volumes set as a flag would only cast one shadow.

4.) They kill performance. On small indoor areas, applying stencil volumes to a few objects (not even all of them in a scene) would cause my machine to notice quite a drop in framerate, let alone all stencil-capable objects in a scene.


Shadow Buffers

1.) Shadow-Buffers only work outdoors. I tried to set some dynamic indoor objects to cast shadow-buffers, and the shadow would simply disappear.

2.) Only dynamic world objects or characters can cast a shadow-buffer. Any static objects outdoors I attempted to set to cast shadow buffers would simply just retain their pre-computed shadow. This means only switches, buttons, characters etc... get a shadow-buffer.

3.) They only get one. That's right. Regardless of the light sources they only get one (although outdoors only need one, I tested out multiple light sources outdoors).

4.) Performance is good. I have not seen any significant framerate drop with the shadow maps.

5.) Horrible aliasing. Hard edges on the stencil shadows? Heh, you can still see the artifacts in the shadows, even though they seem sampled. It seems the shadow maps were a quick and dirty implimentation.

Dynamic Lights

1.) Kill performance horribly! I mean, indoors with only a few, the real-time ones would kill performance, I can't imagine a fully realtime lighting scene indoors!

2.) The shading seems primitive, and doesn't offer a qualitative improvement over pre-computed lights.

Pre-computed lights

1.) Cost-Effective in terms of performance

2.) Looks pretty good

3.) Can be a primary lightsource for shadow casting

4.) Primary lighting method in the CryEngine.


Conclusion

Well there you have it. The myth isn't true. CryEngine's stencil volumes are buggy and slow, and aren't nearly as good as Doom 3's or Riddicks, and they are about the level of Quake 3 Arena's stencil shadows.

Form your own decisions from this, I'm not going to force which engine is better down anyone's throats, I just want to educate people before they say CryEngine's shadowing is as robust and flexible as Dooms.


Intel17

dpagan
03-03-05, 09:57 AM
nice info, whom ever had any doubts about that! is just a fanboy, doom3 is a better polished engine, farcry while pretty could have been better, but not bad for there first try, riddick while also a nice looking engine also seems to be buggy and starbreeze has not release a patch for this game either which is a pitty,they included 2.0++ (soft shadows) and in this mode is unplayable (at least for me) and aa even at low res take a huge hit but over all the game is nice

|MaguS|
03-03-05, 10:04 AM
Where did you get your information is my question? Are you basing the "performance killer" on your experiance? I played the game on max settings and it never "killed" my performance...

Vagrant Zero
03-03-05, 10:07 AM
That's because the GAME isn't doing ANY of those things. That's what the point of the test was EB, to see if the engine could handle it. Obviously it couldn't.

Intel17
03-03-05, 10:10 AM
Where did you get your information is my question? Are you basing the "performance killer" on your experiance? I played the game on max settings and it never "killed" my performance...

I tested all of this myself. All using the CryEngine sandbox editor which I learned specifically so I could do this :)

That's because the GAME isn't doing ANY of those things. That's what the point of the test was EB, to see if the engine could handle it. Obviously it couldn't.

Exactly!

Intel17
03-03-05, 10:26 AM
enjoyment:

farcry > riddick > doom3

I agree with you. However this is technical discussion about engines and what i've found out about the CryEngine. Not, about the games themselves.

Ninjaman09
03-03-05, 10:28 AM
I agree with you. However this is technical discussion about engines and what i've found out about the CryEngine. Not, about the games themselves.
And what a discussion. That's some pretty interesting information there, Intel17. I think it's awesome that you're so enthusiastic about it, I can tell you've really learned a ton since last year. Keep it up! :D

f|LtH fR@g
03-03-05, 10:38 AM
Ok, not to troll or anything, but to me, I could careless how much better a game looks or what uses what, at the end of the day, doom 3 sucked and farcry was a blast-that's what i'll remember, not that one used a certain shadowing method. I appreciate the info and it's a great read, but i'm just saying from my own view, even though farcry may lack certain visual effects, I still had 10 times more fun playing it than I did doom 3. Just my opinion, if u enjoyed doom 3, that's great. =)

Intel17
03-03-05, 10:43 AM
Doom 3 was a fun little game, but FarCry, HL2 and UT2004 were more fun than it.

Again, this isn't about how good the games were, but this is focused towards the people who are interested in game engine technology!

f|LtH fR@g
03-03-05, 10:58 AM
is Quake 4 def. coming in 05 or is it just a tenative date? I feel id's engine will show more off more in Q4 than it did in d3. I know the engine has alot of potential, but I didn't see much of it in doom 3..with exception to the shadowing and characters.

dpagan
03-03-05, 10:59 AM
i would like to see what they will do with the doom3 engine in the new quake game

f|LtH fR@g
03-03-05, 11:13 AM
same here, we know they can do dark corridors, now they need to uh....let some light on the subject hehe

Intel17
03-03-05, 12:47 PM
...i need to see outside environments with vegetation using doom3 engine...

That's just a matter of an artist creating a bunch of trees and other "outdoor" assets. The engine controls how that data is displayed in the world.

Doom 3's levels sizes arent a problem, there really isn't a limit (well there is, but nobody's actually found it) and you could make an outdoor area as big as you want.

The problem is, you'd have to model terrain by hand, trees, grass, water etc... This would take a long time to do, but it would look amazing.

CryEngine makes it slightly easier by making default levels a large sea, and you build terrain. Problem is, they have to do lots of hacks to get indoor areas.

|MaguS|
03-03-05, 12:50 PM
That's just a matter of an artist creating a bunch of trees and other "outdoor" assets. The engine controls how that data is displayed in the world.

Doom 3's levels sizes arent a problem, there really isn't a limit (well there is, but nobody's actually found it) and you could make an outdoor area as big as you want.

The problem is, you'd have to model terrain by hand, trees, grass, water etc... This would take a long time to do, but it would look amazing.

CryEngine makes it slightly easier by making default levels a large sea, and you build terrain. Problem is, they have to do lots of hacks to get indoor areas.

And it would run like crap. I dont see the Doom 3 engine being able to create levels as large as Farcry...

Intel17
03-03-05, 01:04 PM
And it would run like crap. I dont see the Doom 3 engine being able to create levels as large as Farcry...

Hmm, my next experiment I suppose! Just gotta learn DoomEdit.

in Doom 3 the game, FPS is actually higher outdoors than indoors.

Subtestube
03-03-05, 01:18 PM
Cheers Intel! Nice to see some actual info about this. As I've repeatedly said in threads regarding engines:

It's impossible to really know how well an engine functions, without actually experimenting with its performance under various conditions. Personal experience is really the only way to know.

Subtestube
03-03-05, 01:27 PM
That's just a matter of an artist creating a bunch of trees and other "outdoor" assets. The engine controls how that data is displayed in the world.

Doom 3's levels sizes arent a problem, there really isn't a limit (well there is, but nobody's actually found it) and you could make an outdoor area as big as you want.

The problem is, you'd have to model terrain by hand, trees, grass, water etc... This would take a long time to do, but it would look amazing.

CryEngine makes it slightly easier by making default levels a large sea, and you build terrain. Problem is, they have to do lots of hacks to get indoor areas.

There is another note here: The CryEngine supports and regularly uses judicious LOD scaling. D3 will probably *not* be able to cope with as large areas *if* it doesn't do similar LOD scaling (which it could well do). Just bear in mind how much geometry would actually have to be rasterized if all those trees in the distance weren't just a few polys. Now add shadow polys, and you've got some serious issues. It might pay to find out exactly what methods of LOD scaling the D3 engine supports and how to control them - i.e.,
* whether you need to tell it to do it
* whether you need to provide other model versions
* whether it just does polygonal joining for you (probably won't look as good).

Intel17
03-03-05, 02:31 PM
There is another note here: The CryEngine supports and regularly uses judicious LOD scaling. D3 will probably *not* be able to cope with as large areas *if* it doesn't do similar LOD scaling (which it could well do). Just bear in mind how much geometry would actually have to be rasterized if all those trees in the distance weren't just a few polys. Now add shadow polys, and you've got some serious issues. It might pay to find out exactly what methods of LOD scaling the D3 engine supports and how to control them - i.e.,
* whether you need to tell it to do it
* whether you need to provide other model versions
* whether it just does polygonal joining for you (probably won't look as good).

I'll do some Doom 3 investigating in a bit...

Also, in FarCry I did another experiment because of this post...

I told it to LOD at some really bizzare distance (effectively killing the LOD), and then judged performance in the standard game.

It hurt the performance quite a bit on my 9800 pro, but not to the point of being unplayable.

Now with Doom 3, I'm betting outdoor areas would cost much more without LOD due to the fact that all lighting/shading is per-pixel and calculated real-time, along with the shadows being calculated in real-time as well.

While theoretically Doom 3 can handle outdoor areas (hell, i've made extremely large maps, and the engine handled it quite well with good fps), I think that you'd need at least a 9800 pro to have FarCry-esque detail in the outdoor area, combined with the lighting and shadowing, but it could be done.

Also, I was testing the polygon count limit of Doom 3, and contrary to popular belief that "the engine can't do lot's of polys", I made a 3 million polygon mesh in Gmax and exported it to Doom 3. While it wasn't the best in terms of performance, it worked without error.

Hmm, I guess all these "limitations" don't exist then!

I'll probably learn enough DoomEdit tonight to make a large outdoor area with lots of arbitrary detail.

Vagrant Zero
03-03-05, 05:38 PM
There is another note here: The CryEngine supports and regularly uses judicious LOD scaling. D3 will probably *not* be able to cope with as large areas *if* it doesn't do similar LOD scaling (which it could well do). Just bear in mind how much geometry would actually have to be rasterized if all those trees in the distance weren't just a few polys. Now add shadow polys, and you've got some serious issues. It might pay to find out exactly what methods of LOD scaling the D3 engine supports and how to control them - i.e.,
* whether you need to tell it to do it
* whether you need to provide other model versions
* whether it just does polygonal joining for you (probably won't look as good).

Far away trees in Far Cry aren't polys, they're sprites. That's how FC gets away with so much on the screen at once.

Vagrant Zero
03-03-05, 07:40 PM
I wouldn't say it works GREAT. It works, working great would involve me not noticing that they're sprites.

As for framerate sucking, wait a few months, new vid card generation comes out, problem solved, and you get kickass visuals. Sometimes games need to say screw current hardware and do what they have to do.

HIWTHI
03-03-05, 11:18 PM
Engines don't have poly restrictions, which is why it's dumb that people like to compare how many polys a game engine can support. Doom 3 doesn't have limitless outdoor areas, and won't compare to FarCry's outdoor LOD detail without a lot of additional programming. Just trying to create terrain in Doom 3 isn't that easy, but the engine isn't optimized for outdoor areas like Crytek's engine is. Quake 4 is going to show off outdoor areas, but from what I've read they've had their own problems getting those to work. Don't expect FarCry quality from Quake 4, but then again that's not what the game is trying to achieve. Creating a huge outdoor area with a viewing distance of up to 2km is a huge achievement, but then feeling that world with vegetation, enemies, vehicles, destructible objects, and amazing water effects is even more amazing. Here are some articles about the engine:

http://www.newworldvideogames.com/plans.php?name=Sunday%20December%205th%20FarCry%20 Engine%20Discussion%20Part%201.plan

http://www.newworldvideogames.com/plans.php?name=Monday%20December%206th%20FarCry%20 Engine%20Discussion%20Part%202.plan

Nv40
03-03-05, 11:44 PM
There is not such a thing like "outdoors" or "indoors" for a game engine :)

"outdoors" are merely a bigger indoor box map with a higher ceiling.. with a 2d background as "sky" in most games / So unless CRytek free tools in the SDK are only limited to only edit already made maps.. then there is no reason for outdoors to be limited to *just one* lighting technique .. like the limitation DOom3 already have.

Farcry engine support realtime PErpixel lighting just like DOom3 ,but also Lightmaps and shadowmaps.. last time i tested Farcry it use REaltime lighting in "outdoors" for the Jeeps..and the vehicles., and dynamic objects. when you switch to *thirdpersonview*. all other things uses lightmaps.. what IDsoftware they swiched for their next engine. :)


Stencil volume shadows are always hardedge.. Whether is DOom3 ,Farcry ,Fear or any other game. The lego shadows in farcry in "outdoors" Geforces cards are just very simple HArdware shadowmaps.. exactly like the ones used in 3dmark2005.. PCF shadows.. the lack of realism is not the fault of the technique ,but that the developers are using too few samples maybe 1-2 for their game ,this is a performance optimization. Unreal3 should be using like 16 samples at 2000x2000 resolutions for their shadows.

Doom3 use hacks for shadows.. too.. and many many times.. there is not a single Doom3 level without static shadows in doom3..whenever you see very soft shadows in doom3.. they are 100% static .examples of those are ...Fences, shadows of fans in the ceiling.. light through winodws.. jail cage.. etc..a very simple technique used by many games ,they are projected black textures ,that looks like if they were shadows ,but there arent // what they do is do project a black texture (or the color you want) in the surfaces. wich is not the realtime stuff Idsoftware was bragging so much. idsoftware simply never told the whole truth and overhyped their engine.. and it ended being 15% of what they told it was..

Vagrant Zero
03-03-05, 11:50 PM
If Doom3's shadow system is 15% [I wish I could randomly pull out percentages from my anus, it would help with accounting] then CryTek and Source are batting in the negatives.

HIWTHI
03-03-05, 11:59 PM
Nv40, you have no idea what you are talking about do you? It's sad that you think indoor and outdoor engines are the same. Just stop making up stuff and getting into conversations where you have no idea what everyone is talking about.

Nv40
03-04-05, 12:02 AM
If Doom3's shadow system is 15% [I wish I could randomly pull out percentages from my anus, it would help with accounting] then CryTek and Source are batting in the negatives.


well believe it or not.. Johncarmack told DOom3 engine will be capable of Final fAntasy graphics in real time.. and that will e able to match Offline professional renderers.. :rolleyes: that level of quality is just movie quality.. so you are right , i was too generous with my percentages... the game while its great.. one of the best looking games..still ended being 1% of what they claimed.. :D

next engine.. they already compare it with PIxar latest movies .. and those are Shrek or lord of the rings.. graphics.. i will be happy with just the Finalfantasy graphics quality they promised years ealier for Doom3 . :)