VEX SEM Shader and shadows

   3657   2   1
User Avatar
Member
121 posts
Joined: July 2005
Offline
Hi

I'm trying to build a SEM ( Scanning Electron Microscope) shader in VOPs that works with shadows.
So far I use a slightly modified version of the SEM shader Ivan DeWolf posted on CGtalk some time ago
Cf = 1-(abs(dot(normalize(N),normalize(I))
This works well, but does account shadows.

I want the objects to cast/receive shadows on/from other objects, but their illumination should only be decreased
by the shadow other objects cast on it and not by the light itself (The side of the object at which no “direct light” falls
should still have the self illuminating SEM look, and only be black if another object casts a shadow on it)

So far everything I tried also darkens the object itself, so any ideas are very welcome

Achim
User Avatar
Member
321 posts
Joined: July 2005
Offline
puma.snyder
Hi

I'm trying to build a SEM ( Scanning Electron Microscope) shader in VOPs that works with shadows.
So far I use a slightly modified version of the SEM shader Ivan DeWolf posted on CGtalk some time ago
Cf = 1-(abs(dot(normalize(N),normalize(I))
This works well, but does account shadows.

I want the objects to cast/receive shadows on/from other objects, but their illumination should only be decreased
by the shadow other objects cast on it and not by the light itself (The side of the object at which no “direct light” falls
should still have the self illuminating SEM look, and only be black if another object casts a shadow on it)

So far everything I tried also darkens the object itself, so any ideas are very welcome

Achim
I would make a shadow shader, so that you can keep the surface shading (which, since it's basically I.N, uses *no* light sources). Thus, in the shadow shader, you can selectively darken what you want. You could also thin out the shadow casting by virtue of how parallel/perpendicular the shadow casting ray is to the camera, i.e. so that sidways rays cast a lot of shadow, and front/back ones do not.

I did a SEM shot back in the PRISMS days, and we got good results by tweaking the surface shaders to say that after a certain U/V value, to *not* go darker, or go darker slowly. We didn't have shadows at the time either, but got most of our great look from some displacement shaders that Andy Kopra wrote, which used some really nice noise to enhance the surface quality and create texture.

– Antoine
Antoine Durr
Floq FX
antoine@floqfx.com
_________________
User Avatar
Member
121 posts
Joined: July 2005
Offline
Thank you for the tips Antoine

I think I can figure out how to thin out the shadows depending on how parallel/perpendicular
the shadow casting ray is to the camera, but as I never wrote a shadow shader before, I have
no idea how to darken only some specific parts (only those which get a shadow from another object)
So could you or someone else please tell me how to do this?

By the way, this is the picture I'm trying to recreate.
http://www.sidefx.com/forum/viewtopic.php?t=2385&sid=537fc8410713c637d487762a47f1749a [sidefx.com]

Thanks again
Achim


PS: was the SEM shot you did for a movie? If so please tell me for which one, so I can have a look at it
  • Quick Links