What is a DSS Shadow?

Community Forums/Technical Discourse/What is a DSS Shadow?

Yue(Posted April) [#1]
Why do triangles rise in the scene?

Always in Blitz3D, the shadows ivan marked by textures (Shadow Map) in Direct X9 encounter that concept of DSS.

Trinosis(Posted April) [#2]
I did a quick google search to find out what a DDS Shadow is, as I've never heard of it.
And it didn't return any useful results.

As far as I'm aware, DDS is a texture format that Blitz3d uses and has nothing to do with object geometry.

I don't know what shadow system you are using, whether it is real time calculated or pre-calculated shadow maps.

But for a realtime shadow system, usually the triangle count is dynamic as the shadow mesh countours and shapes itself to the surrounding geometry.
An undulating landscape for instance would require more shadow triangles then a flat plane.

In your case, I'm wondering if your shadow mesh was created in a 3d app, say 3d studio, with a high poly count and then imported into your app.
Whereas creating a simple 2 triangle mesh via code and applying a static shadow texture might be a better solution.

Yue(Posted April) [#3]

Thanks for the reply.

I'm really confused. I'm using Xors3D and I find these two commands somewhat strange to me.

xCreateDSS( 1024, 1024 ) 

xSetShadowParams ( splitPlanes:Byte, splitLambda:Float, useOrtho:Int, lightDist:Int )

If I upload the splitPlanes value, the triangles in the scene go up.

On the other hand the cube is simple only has 12 triangles, and the ground also 12 triangles, where if shadows the scene would have 24. but if for example I put 8 in splitPlanes, the total of triangles in the scene rises dramatically.

Not Shadows tris 24.

xlsior(Posted April) [#4]
Perhaps it needs more to simulate the soft edges of the shadow?

Yue(Posted April) [#5]

If, correct, a lower value, it degrades the quality of the shadows, a higher value makes them smoother, for example the value 1 in splitPlanes, a shade of low quality.

It reminds me a lot of the volumetric shadows in Blitz3D, my ignorance is in which I do not understand opr that the triangulso in the scene rise, then they are volumetric shadows, a value something in splitPlane implies that the distance is visualized shadows to more distance.

Although xors3d has shadow shaders, I do not know what the difference is.

Trinosis(Posted April) [#6]
It looks to me as though the splitPlanes value is used to subdivide the shadow mesh into smaller triangles.

This makes it easier for the shadow mesh to align to the contours of a terrain.

Whereas a plane doesn't need aligning.

So the splitPlanes value really depends on what type of geometry your shadow mesh is going to be mapped to.

I don't think shaders are used in this system, just a textured shadow mesh.

I've often used a similar approach to rendering shadows in my Blitz3d games and demo's.

Here's a short video showing the technique.
Simple tree shadow meshes aligned to the contours of a landscape with a shadow texture applied at a low transparency ( alpha ) level.


I'm also wondering if the DSS stands for Devil Shadow System.
A shadow system developed by another Blitz3d user.
I seem to recall.

My bad, i misread your title description, reading, DDS for DSS.

Zethrax(Posted April) [#7]
Possibly stands for Depth Stencil Shadows. That was the best info I could come up with from googling anyway.



Rick Nasher(Posted April) [#8]

xCreateDSS( 1024, 1024 )

I looks to me like as if it referes to a texture by the size of 1024x1024.
Perhaps it's an internal variation on DDS as cache used to hold the shadow texture and defines the size of the shadow texture, similar as in FastExtension?
Could be short for Dynamic Stencil Shadow if we're talking Dynamic Shadows here?

Trinosis(Posted April) [#9]
I did a bit more digging and found some interesting info.

This Blitz forum page describes the Xors3D Engine feature list and has this description for shadow maps.

Shadows casting from all lights types (PSSM with orthographic projection for directional lights)


And doing some googling i found this page on PSSM shadows, which explains a multple detail shadow based on distance.


PSSM = Parallel-Split Shadow Maps

Yue(Posted April) [#10]
I think a lot of questions come up about it.

For example what is Orthography shadows?

I also thought it was a texture but it is working with triangles, for that the scenes go up when the value is high on splitplane.

Trinosis(Posted April) [#11]
Can you use Wireframe mode to view the extra triangles ?
To see if they are actually part of the shadow mesh.

It could be that they are used as a projection volume.
But I'm only guessing here as it's not a subject i know a lot about.

Yue(Posted April) [#12]

The triangles of the shadow are not seen.

Trinosis(Posted April) [#13]
That's really interesting.

Since the tri count goes up, i was assuming the shadow was using them.

Now I'm thinking that the extra tri's are used in some way to create the shadow texture and then not being correctly freed up after use. A bug.

Perhaps the tri's still exist ( edge list ) without the verticies.

But again I'm just guessing here.

Yue(Posted April) [#14]
Since they are dynamic shadows that interact with the Light source, I think those triangles are necessary to process the shadow in real time.

Yue(Posted April) [#15]

Sets parameters of the shadow system.

You can change number of PSSM split planes (PSSM technique splits visible scene in some parts, each part will be rendered separately to its own shadow map. It increases quality of shadows near camera, but may cause loss of quality in large distance from camera), and split lambda. We set optimal values, but you may change them for better quality or better perfomance. Also you can change projection type for shadow map rendering, and set the distance of light source from the camera view point (larger distance causes larger part of scene which casts shadows, but quality of the shadows is poorer).

splitPlanes Number of split planes for PSSM rendering. The number of split planes is equal to the number of shadow maps for the directional light.
splitLambda The ratio of the scene splitting in range (0.0; 1.0).
useOrtho True to use orthographical projection, false - for perspective projection.
lightDist Distance from light source to the view point.


gpete(Posted April) [#16]
the last image looks correct-when the shadow of the column hits the cube behind it- the shadow goes vertically up like it does in reality- allowing the left face of the to be lit from the light source. And yes - not a triangle shadow..

Yue(Posted April) [#17]

According to the prubas, if they are volumetric shadows, in directx 9 it works different and seems to be a mixture of texture and triangles. For example in the following scene, when you disable the shadow for one of the boxes, the numbers of triangles fall 24 which correspond to the shape of the box, ie if the box has 24 more shadows, it would be rendering 48 triangles .

Trinosis(Posted April) [#18]
I think i understand what's going on now.
The PSSM shadow algorithm creates a final shadow texture from multiple renders of the scene starting from the camera position and then stepping forward into the scene at set distances.

This following image demonstrates the process.
The cone is the camera, the scene is a flat ground plane with a box on it and the multple planes infront of the camera are the split planes to get rendered.

I imagine that these split planes are actual 3d planes ( 2 triangles ), used for the rendering to texture process.
And after all split planes have been rendered, they are all combined into one final texture.

This would explain why the triangle count increases or decreases dependent on the split plane value, as each split plane is a 3d object ( plane of 2 triangles )

Yue(Posted April) [#19]

In this case a high value in splitPlane, allows the shadow to be viewed further away from the camera and with better quality.

Trinosis(Posted April) [#20]
Not quite.

As i read it, the splitplane value determines how many splitplanes to use.
I would imagine that the more splitplanes used, the higher the quality, but slower overall rendering time.

Yue(Posted May) [#21]

This is very crazy, the model of the statue has 26,000 triangles, but the number for the calculation of shadows dramatically increases the number of triangles in the scene.