Gamestudio Links
Zorro Links
Newest Posts
Data from CSV not parsed correctly
by EternallyCurious. 04/25/24 10:20
Trading Journey
by howardR. 04/24/24 20:04
M1 Oversampling
by Petra. 04/24/24 10:34
Zorro FIX plugin - Experimental
by flink. 04/21/24 07:12
Scripts not found
by juergen_wue. 04/20/24 18:51
zorro 64bit command line support
by 7th_zorro. 04/20/24 10:06
StartWeek not working as it should
by jcl. 04/20/24 08:38
folder management functions
by VoroneTZ. 04/17/24 06:52
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
5 registered members (AndrewAMD, SBGuy, Petra, flink, 1 invisible), 699 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Mega_Rod, EternallyCurious, howardR, 11honza11, ccorrea
19048 Registered Users
Previous Thread
Next Thread
Print Thread
Rating: 5
Page 55 of 61 1 2 53 54 55 56 57 60 61
Re: Shade-C v0.91 BETA S1 RELEASED [Re: sivan] #424614
06/19/13 13:16
06/19/13 13:16
Joined: Mar 2011
Posts: 3,150
Budapest
sivan Offline
Expert
sivan  Offline
Expert

Joined: Mar 2011
Posts: 3,150
Budapest
another 2 problems I faced with, I would be happy if anybody could help me:

I cannot get dynamic softshadows. I mean shadowmapping is fine but not soft. the blurring does no blurring at all, something wrong somewhere... sc_vsmSunBlur.fx does something but the final result always a black or white output.

shadowmapping area in case of very high camera positions is not at right place or orientation, so fades out in a bad way.

thanks.


EDIT: problem 2 is more or less solved by using an entity of my own camera system instead of the default sun dummy entity.

edit2: I modified the vsmBlur shader, so now it works okay. maybe a pp stage should be added for (optional) further smoothing...

Last edited by sivan; 07/02/13 07:03.

Free world editor for 3D Gamestudio: MapBuilder Editor
Re: Shade-C v0.91 BETA S1 RELEASED [Re: sivan] #425017
06/25/13 15:21
06/25/13 15:21
Joined: Apr 2006
Posts: 159
Latvija
Arrovs Offline
Member
Arrovs  Offline
Member

Joined: Apr 2006
Posts: 159
Latvija
Which version you here using? Just curious because i dont want to run in them.


Arrovs once will publish game
Re: Shade-C v0.91 BETA S1 RELEASED [Re: Arrovs] #425027
06/25/13 17:22
06/25/13 17:22
Joined: Mar 2011
Posts: 3,150
Budapest
sivan Offline
Expert
sivan  Offline
Expert

Joined: Mar 2011
Posts: 3,150
Budapest
0.91b-s1
(imo shade-c evo could have a new thread)


Free world editor for 3D Gamestudio: MapBuilder Editor
Re: Shade-C v0.91 BETA S1 RELEASED [Re: sivan] #425312
07/02/13 09:44
07/02/13 09:44
Joined: Mar 2011
Posts: 3,150
Budapest
sivan Offline
Expert
sivan  Offline
Expert

Joined: Mar 2011
Posts: 3,150
Budapest
EDIT: sorry, solved again, in the water shader finalcolor required a .xyz at a certain place, but finally I rewrote a bit the end part to get better water than the original laugh
---------------------------

again a little problem, I rewrote object shaders to SM 3.0, to get better dynamic lights, but this results in incompatibility with the depth shader probably, resulting in wrong water, which becomes white at shores and next to objects in water where it should be transparent with foam - but only if these objects use sm 3.0.



I made a workaround, now water looks fine but a bit different, foam covers the full surface.



I would be happy if somebody could give me a hint how to resolve it to get the original appearance. depth and water shaders work only if sm 2.0 used for them. in the worst case I'll use it in this form laugh

Last edited by sivan; 07/02/13 13:54.

Free world editor for 3D Gamestudio: MapBuilder Editor
Re: Shade-C v0.91 BETA S1 RELEASED [Re: sivan] #425409
07/04/13 09:27
07/04/13 09:27
Joined: Mar 2011
Posts: 3,150
Budapest
sivan Offline
Expert
sivan  Offline
Expert

Joined: Mar 2011
Posts: 3,150
Budapest
just some info about why variance shadow mapping is not totally fine in shade-c (not in scientific language):

variance value = blurred(depthmap.x*depthmap.x) - blurred(depthmap.x)*blurred(depthmap.x)

the 0.91b variance shadow mapping by default works with bad blurring, because it uses only one channel for depth (actually depthmap.x), then blurred by a pp shader, then read by object pixel shaders. it is squared in the object pixel shaders just before calling the variance shadow mapping function.
by this approach you always get the same squared values, thus variance is always zero! thus can get only black or white pixels, i.e. the blurred areas are also result in totally shadowed pixels. I made a lerping afterwards with the original depthmap and finally got blurred shadows, but this is only a hack.

the right solution is to get the depth on one channel e.g. depthmap.r, and store its squared value on another channel e.g. depthmap.g, and then do the blurring both on depthmap.r and depthmap.g. this way if you get the square of blurred depthmap.r, it won't be the same as the squared and then blurred value stored in depthmap.g, thus variance won't be always zero as before, thus you can get correct sahdowmapping.

the main advantage of variance shadow mapping over PCF smoothing (like in the default PSSM shader), is its speed, because done directly once on depthmap, and not on screen pixels in the object pixel shaders.

I will implement it soon laugh

Last edited by sivan; 07/04/13 12:18.

Free world editor for 3D Gamestudio: MapBuilder Editor
Re: Shade-C v0.91 BETA S1 RELEASED [Re: sivan] #425415
07/04/13 11:59
07/04/13 11:59
Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
Kartoffel Offline
Expert
Kartoffel  Offline
Expert

Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
yeah, doing the pow(x, 2); in the shadow mapping function doesn't do anyting grin
(it's the comparision between the linear filtering of the depth and the squared depth, that is used to calculate the linear interpolation for the shadows -> no hard edges and blurring is possible)

...since it looks like you know pretty much about vsm: does the depthmap has to be in range [0 - 1] or doesn't the range matter at all?



POTATO-MAN saves the day! - Random
Re: Shade-C v0.91 BETA S1 RELEASED [Re: Kartoffel] #425416
07/04/13 12:18
07/04/13 12:18
Joined: Mar 2011
Posts: 3,150
Budapest
sivan Offline
Expert
sivan  Offline
Expert

Joined: Mar 2011
Posts: 3,150
Budapest
I'm just trying to undaerstand it by reading some articles and sample codes, and trying to get what they can get.
e.g. there is a nice example using 6 lightmaps and combining their shadows.

edit1:
but I'm a bit got stuck, as it does not work as I expected... and in the original depth shader it is commented out... need some further research, but I don't understand the distance calculations in shade-c...

Last edited by sivan; 07/04/13 18:31.

Free world editor for 3D Gamestudio: MapBuilder Editor
Re: Shade-C v0.91 BETA S1 RELEASED [Re: sivan] #425433
07/04/13 18:45
07/04/13 18:45
Joined: Mar 2011
Posts: 3,150
Budapest
sivan Offline
Expert
sivan  Offline
Expert

Joined: Mar 2011
Posts: 3,150
Budapest
probably it has to be 0..1. now I have an idea what I could do wrong. but anyway, an example code from GPU Gems 3 works, as an interim solution, unfortunately shows some peter panning...

Edit: the depthmap max depth value was too high, if it is lowered everything works fine, but for really soft edged shadows, and for eliminating shadow fade-outs at terrain-object contact area, my original hack is still required...

Last edited by sivan; 07/05/13 08:51.

Free world editor for 3D Gamestudio: MapBuilder Editor
Re: Shade-C v0.91 BETA S1 RELEASED [Re: sivan] #427620
08/10/13 21:02
08/10/13 21:02
Joined: Nov 2007
Posts: 318
Brasil, Paraná
NeoNeper Offline
Senior Member
NeoNeper  Offline
Senior Member

Joined: Nov 2007
Posts: 318
Brasil, Paraná
how do I configure shadec for models that use sprites, example: tree, bushes...?


Please! Use easy words to be translated. because my English is not very good! Grateful.
_______________________________________________________
Re: Shade-C v0.91 BETA S1 RELEASED [Re: NeoNeper] #427643
08/11/13 12:01
08/11/13 12:01
Joined: Mar 2011
Posts: 3,150
Budapest
sivan Offline
Expert
sivan  Offline
Expert

Joined: Mar 2011
Posts: 3,150
Budapest
in 0.91 the simplest to assign the sc_obj_doshadow.fx shader by effect_load to a material that is used by your vegetation models. soon I will publish some shaders I wrote working with shade-c using the 3dgs material properties really properly (the default doshadow uses a bit different lighting), supporting dynamic lights, and one with wind vertex animations for vegetation got from animtree.fx.


Free world editor for 3D Gamestudio: MapBuilder Editor
Page 55 of 61 1 2 53 54 55 56 57 60 61

Moderated by  aztec, Blink, HeelX 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1