Shadows Code for People to Play with

OniDaito's picture

Its rough and it needs work but nevertheless, I decided to release what I've made. No doubt there will be criticisms and what not but if people fancy playing with some shadows code, please feel free.

https://github.com/OniDaito/Quartz-Composer-Shadows

Included are two sample Quartz Composer files.VSM and a failed attempt at PCSS are included. There is also code in there for Summed Area VSM but that unfortunately, never made it :S

PreviewAttachmentSize
shadow.jpg
shadow.jpg37.87 KB

cybero's picture
Re: Shadows Code for People to Play with

Looks really interesting, as does your site BTW.

cybero's picture
Re: Shadows Code for People to Play with

Having build problems with your github distro in xCode

/Users/cybero/Downloads/OniDaito-Quartz-Composer-Shadows-a7126ac/SoftShadows/util/S9FBO.m:170: warning: property 'mDepthID' requires method '-mDepthID' to be defined - use @synthesize, @dynamic or provide a method implementation

followed by a slew of other errors and warnings. Will try in an earlier version of xCode, see if that makes a difference at all. Yeah, can and does build AOK in xCode 3.2.5. Nice demo compositions and digging into the code, some very interesting shader code that gets bundled within the plugin. Cool in the shade :-) .

OniDaito's picture
Re: Shadows Code for People to Play with

Yeah, I wont lie, its rough! :P

I was gutted the Summed Area stuff never worked and I'm really not keen on VSM anymore because in my humble opinion, shadows dont work that way; getting stronger the further away they get from the caster

cybero's picture
Re: Shadows Code for People to Play with

BTW, I also get Exception errors when drilling deeper into the macro of the plugin. Interesting work though.

cybero's picture
Re: Shadows Code for People to Play with

Been digging into the shader code in particular, whipped this up from your packeted ingredients and a little re-editing for Quartz Composer to get both vertical and horizontal into the same shader.

The file uses Kineme Audio Tools and allows for you to paste the path to a file of your own choosing.

PreviewAttachmentSize
H&V.png
H&V.png593.83 KB
H&V.qtz207.41 KB
glsl-handv-inputs.png
glsl-handv-inputs.png23.99 KB

OniDaito's picture
Re: Shadows Code for People to Play with

Yeah, having them seperate was annoying because they are almost identical but I'm told its faster to have them seperated into vertical and horizontal, plus the less if statements the better. nevertheless, its neater to have them in one.

cybero's picture
Re: Shadows Code for People to Play with

It'd definitely be more suitable for creating a plugin to have both vert and horiz defined discretely.