Five Elite Mercenaries are send to an Island in middle of the 1980'. The Task: Find and Eliminate a local Drug Baron. Features: new Physic, real Sunmovement, Day/Night Change, Hunger/Food system, realistic (!) Weather system, Light/Dark viewing system for AI, 5 different Fractions on the Island. Complete Realistic simulation of nearly all things, including Sleep. New weapons, new Vehicles. Vehicles driving system is now exact (!) like GTA IV , FireSystem,... this mod is Heavily inspired by GTA, IGI, FarCry.

  • View media
  • View media
  • View media
  • View media
  • View media
  • View media
Add media Report RSS little scene and shadow test
Post comment Comments
pvcf Author
pvcf - - 4,943 comments

testing a new scene with shadows (all realtime).
for some unknown reasons 4 shadows from 4 trees kill the FPS from 50 to <25 FPS, which results in flickering shadow sometimes. will investigate further why this happens. those 4 treeshadows increase the polycount from 500k to 900k, very very strange.
replaced also the rocks and hills around the scene, sorry for the skybox, its actually a wip box.

download in high quality
Reflex-studio.com

video will be deleted within one week.

Reply Good karma+2 votes
Wicher
Wicher - - 173 comments

Yep hate shadows in FC, I mean how they do them, When you find a way to fix this just write the resolution :)
Ceers

Reply Good karma Bad karma+1 vote
pvcf Author
pvcf - - 4,943 comments

i model for each object own invisible shadowthrowing geometrie, place them as simple entities, make the potentially update also for "non seeing on screen" and use a non known shader which throws for invisible objects shadows on amd AND nvidia card (statenocull shader). for this u need urgendtly the devkid entity stream system, otherwise the engine breaks in pieces by some thousend entities in the map.
i needed years to elaborate this workflow and the technology behind (entity streamer).
the flickering shadow in this scene is already solved (described in conversation below).
with vanilla farcry its really not possible to have non flickering or disapearing realtime shadows, because if a entity, which throw a shadow is behind the player, engine simply does not render the entity, also ofcourse not the shadow: = shadow dissapears.
flickering shadows in screenspace is a buffer bug in engine: it seems each potential visible shadowcaster call the whole shadowengine again, instead of writing it in a buffer and draw then the whole buffer as one stable shadow.
it seems the programmer have it left simply broken in cryengine 1.x :)

with my workflow i have atleast control about the amount and quality of each shadowscene. shadows now stable as long you have ~ over 15FPS, but shadows cost now nearly 50% of CPU power, and cryengine is single threaded, so shadows simply kill the FPS and you need a high CPU single speed.

Reply Good karma+2 votes
Argoon
Argoon - - 1,078 comments

Hum are those shadow maps? If so is strange that they increase the polycount, thought that was only possible using stencil shadows.
What are the draw calls with and without the trees? Perhaps those trees, because of the shadows, are being rendered more times than necessary, if so that can explain the low performance and the increased polys, also show something is wrong with them, or the shadow system.

BTW it seams you are just using a directional light (sun) to cast the shadows so this can't be it, but even so if you don't know, you can only have maximum 8 shadow casting lights visible at the same time per frame (Hardware limit), the best for performance being maximum 3 or 4, more than 8 you get extremely low performance and start seeing shadows disappear and or flicker.

Reply Good karma Bad karma+3 votes
pvcf Author
pvcf - - 4,943 comments

-no shadow maps (realtime shadows)
-only one ligth (sun) as shadowcaster
-no stencil because the stencil shadow renderer does totally not what a stencil renderer theoretically should do in cryengine
-without that 4 threes i have 500.000, with 900.000
-a tree should have about 2000 polys, that means with shadows each tree could do a load of about ~10.000, not more.
that gives a 40.000 load, but i have 10 times more.
maybe the terrain surface does not occlude correct, will set a occluder area behind the hill terrain and see what happens.
-shadow flickering in this scene is caused by <25 fps

Reply Good karma+2 votes
pvcf Author
pvcf - - 4,943 comments

hmmm, just for fun, really more of "proof that cryengine can draw shadows from more than 8 objects / frame, i have done following:
i have had 9 shadowthrower (wooden palettes) plus 2 visible tree shadows. i combined the 9 wooden palettes to one big cgf which throw now ONE shadow (in same size and look). this results in a FPS increase from 25 to 44, or, from 45 (only wooden palette shadows) to 44 (wooden palettes+ tree shadows).

i documented this by screenshots:
www.reflex-studio.com/clearing/screenshots/shadows.zip (3 jpg's)

i think i have to think more about placing shadows and amount / scene. very, very very very strange.
so you mean with shadowcaster 8/frame NOT the lightsource, you mean the amount of objects is limited by hardware side to 8 ?
and you did not mean this setting
e_shadow_maps_max_casters_per_object
which is 8 per default ?

Reply Good karma+2 votes
Argoon
Argoon - - 1,078 comments

Shadow maps are real time, lightmaps are the ones that are fixed or baked. :)

No i'm not talking about only 8 objects casting shadows per frame, even tho the less that do better for performance, i'm talking about 8 lights casting shadows per frame, this means 8 lights having shadow casting enabled and visible at the same time in the same frame. To give you a example on how other game developers go around that limit and still have good shadows, they do this, Frictional Games Amnesia has a "hero" light casting shadows and the rest of the lights, smaller, don't cast shadows, Portal 2 does exactly the same thing, stalker from where you take inspiration also seam to not have more than 2 or 3 shadow casting lights per scene, but i could be remembering wrong. And Cryengine 1 uses a forward shading engine so the more dynamic lights you use the worse the performance. :)

BTW happy that you solved the problem what was the cause?

Reply Good karma Bad karma+1 vote
pvcf Author
pvcf - - 4,943 comments

> BTW happy that you solved the problem what was the cause

i dont know, i can only say (what i have done in text above), what i have done. to explain how i work: i always (!) have only ONE (!) dynamic light which is allowed to cast shadows, sun.
i dont use lightmaps (sorry for use the wrong term above :D )
then i place extrem lowpoly objects which cast a shadow for a scene. first, there where 9 planes, 2 tries each, which cast the wooden palette shadows = 18 tries but splitted to 9 individual entities (all not drawn,not physicalized, only shadow).
then i removed them and build a object which throws exact the same shadows, about 10 triangles / 5 polies and use this single thing instead the 9 indivuals : problem was gone. that means i simple still totally does not understand crytecs shadow renderpipeline totally, (and I#m sure they also didnt because in cryengine 2 they have reworked them and gave them 3 single own threads -.-).

to be precise: i have theoretically the same polycount in both methods, the same shadow structure but with the big combined object the engine seems much more gentle than with 9, even if the tri/polycount is /theoretically) identically.
practically, by 9 individual objects, the polyamount rises from 500.000 to 900.000 instead from 500.000 to 500.018.

there is a not working redraw buffer in shadowengine, i think. so, its like every shadowthrowing entity call the whole shadowdrawer instead do this in one big table (like GTA5 seems it to do, or snowdropengine).
cryengine also always render the whole polyamount from a shadowthrower, on EACH shadowreciver. so, if a 20.000 shadowthrower cast his shadow in 3 objects, i have a 80.000 poly shadow load for this single object. its a per design broken routine and you can't imagine how hard i have worked the last years to get out such nice looking shadows in cryengine 1.

Reply Good karma+2 votes
mvxlnm
mvxlnm - - 552 comments

I like it, very atmospheric, good work :)

Reply Good karma Bad karma+2 votes
pvcf Author
pvcf - - 4,943 comments

thank you! its still not finished, this thing will work (carry up and down goods). have to add motors, rope, switches, energy and so on.

Reply Good karma+2 votes
Post a comment

Your comment will be anonymous unless you join the community. Or sign in with your social account: