Jump to content

  • Log In with Google      Sign In   
  • Create Account

kalle_h

Member Since 05 May 2012
Offline Last Active Feb 12 2016 10:18 AM

#5265488 Static lightmaps and dynamic objects with realtime shadows, how?

Posted by kalle_h on 08 December 2015 - 03:23 PM

Currently I am not sure how big the scenes are going to be - im trying to research how i am going to handle shadows before deciding haha! But they have potential to be quite long, as the levels are going to be designed missions which will have different environments etc but all from the standard city builder perspective (mine isn't a builder game, but the perspective is the same)

 

There may be like 20 dynamic objects.

 

I had thought about doing a big static shadow map, and updating it with dynamic objects, but that seems excessively large as I was hoping to target mobile platforms!

 

just seems so overkill to have dynamic object shadows, but alas, i cannot think of a better way of doing it sad.png

You don't need to update static shadow map with dynamic objects. Just render dynamic object to their own map. And when rendering all objects just sample from both shadow maps. This way you can just use depth textures and hardware PCF.




#5259395 Full dynamic octree, worth it ?

Posted by kalle_h on 28 October 2015 - 03:53 AM

What kind of queries you are going to need? If you just need single query for frustum culling which is linear operation then updating octree would just be more expensive. But if you have hundreds shadow casting point lights then it would make perfect sense.




#5258874 Light vs Mesh culling causes specular discontinuities.

Posted by kalle_h on 24 October 2015 - 04:25 PM

Is your falloff function actually going to zero? Squared inverse is correct falloff but it does never result zero. You need to modify function somehow. I have used this: max(0, (1/distance^2) - epsilon)




#5258622 Rendering Quake 3 BSP in modern OpenGL

Posted by kalle_h on 23 October 2015 - 01:12 AM

Simple alternative would be just sort room size chunks front to back after frustum culling and rely on Hi-Z culling.




#5258469 When you Fix your timestep Do you need to change the physics

Posted by kalle_h on 22 October 2015 - 12:38 AM

It smells that you are trying to use pixels as world coordinates.




#5252618 Omni-Directional Soft Shadows

Posted by kalle_h on 17 September 2015 - 02:52 AM

Soft shadow algorithm would make point light shadows look much nicer. http://www.bahilov.com/rt/img/3.0%20soft_shadows_hd.png

 

Penumbra size = Light size * (Blocker distance  / Total distance)

 

Light size is known constant. Total distance is given. For blocker distance you need to make blocker search. Usually you need bit few samples there than in shadow filtering pass. I just discard all samples that are further than total distance and average rest of the distances. If there are no blockers you can just skip the filtering pass.




#5252544 Foliage Collision

Posted by kalle_h on 16 September 2015 - 12:58 PM

In Crysis 3 they are converting all physics shapes to multiple spheres. If you split grass instances to chunks you can just cull colliders per chunk and it's also easier to update distance chunks less often. Trying to update all grass once might not be best for flexibility and performance.




#5252408 Foliage Collision

Posted by kalle_h on 15 September 2015 - 02:13 PM

Seems to be quite basic sphere collision system with many optimizations.

http://www.crytek.com/download/Sousa_Tiago_Rendering_Technologies_of_Crysis3.pptx

http://www.crytek.com/cryengine/presentations




#5252318 Many (IBL) CubeMaps / Bindless Textures

Posted by kalle_h on 15 September 2015 - 03:16 AM

Simple way to do this even with older hardware is to accumulate all cube maps using proxy geometry(sphere/cube/quad) and rendering to rgba16f target. You output color * weight to rgb and weight to alpha channel. Just render cubemaps as one by one and finally you use fullscreenpass to renormalize reflection buffer by dividing by alpha.




#5251186 Precalculate lightmap and specular reflection?

Posted by kalle_h on 08 September 2015 - 12:01 PM

It's also quite usual to use ssao to darken specular reflections. Some use straight AO * specular but there are also some better approximations that try to take account view dependency and roughness.

like: lerp(1.0, ao, roughness * (1.0 - nDotV))

or:  saturate(pow(nDotV + ao, roughness*roughness) - 1.0 + ao)




#5249605 Octree Frustrum Culling

Posted by kalle_h on 29 August 2015 - 01:36 PM

 

 

 

"Simply not worth the cost just to avoid drawing a few off-screen triangles" - THAT

I do not agree. You cant say that because you may be sending 100% of the model when you are actually seeing 5%. If the calculations per vertex are expensive or you are GPU bound (saying that cause my GPU is not the greatest and doing extra stuff seems to be unnecessary

 

It's not very good for overall conversation that you split quote like that.

Actual quote should be:

 

 

Subdividing meshes at run-time is overkill and simply not worth the cost just to avoid drawing a few off-screen triangles.

Which has totally different meaning.

 

 

But back to the point. There was great presentation at siggraph from Ubisoft. http://advances.realtimerendering.com/s2015/aaltonenhaar_siggraph2015_combined_final_footer_220dpi.pdf

They are doing super precise frustum and occlusion culling on gpu. Using just 64 triangle strips as primitives. But the conclusion was bit disappointing because they didn't get huge overall gains even after all that effort.




#5248777 sRGB on diffuse textures or gbuffer color texture?

Posted by kalle_h on 25 August 2015 - 09:17 AM

In my experience, the 10/11 bit formats (float and unorm) don't have enough precision to pull off good HDR without introducing colour banding.

n.b. 8bit sRGB is equivalent to approx 10bit UNORM linear, so that leaves you approximately no headroom for dynamic range sad.png

 

If you don't have extreme dynamic range I have found that 11 bit is just enough with some careful dithering. At least it work for us in Hardland.




#5248545 Is ray tracing hard or is it just me?

Posted by kalle_h on 24 August 2015 - 09:32 AM

Raytracing is dead simple. Efficient raytracing is not.




#5248294 Virtual Texture useful for this?

Posted by kalle_h on 22 August 2015 - 04:10 PM

Load couple low level of mips for all landmarks always. Then just stream higher levels for nearest(in locality or time) N landspaces.




#5248277 Starting With My Dream

Posted by kalle_h on 22 August 2015 - 02:20 PM

Libgdx would be good as 2d java crossplatform framework for you.






PARTNERS