Tent fabric

Hello.

I want the user to be inside a tent and look at the tent’s ceiling, on which there should be the shadows of items being outside between a light source and the tent. So I need to create a shader that is part translucent, has textures on the inside(none are needed on the outside) and resembles tent fabric in general. How would you go about it?

All the best
Liesel

  1. Shadows on transparent objects are hard.
  2. These subjects are complex! There’s no “oh, just do this and this” to get it done.

That said, I would probably do something like doing full shadows from the light sources, and having the tent calculate a custom shadowcaster pass based upon inverted normals (so it’ll create a shadowmap from the exterior of the tent), along with one with normal normals. Finally, I would do a GrabPass (basically the same effect as refraction… minus the refractive portion) to get the transparency effect.

Just musing off the top of my head. Not really a simple task.

Which shader comes closest to this, that I could modify?

Simpler water shaders, really? Or a gem-style shader… Not anything with shadows, but that’d most likely have the grab pass set up already. Just a completely different texture set with normals. That’s the closest I can think of. You’ll have to get a little dirty to set it up, I can’t think of anything that would do what you want without a fair bit of custom work.

Alloy has one called Transmission shader that does exactly what you want. We use it on our sails on the ships.

1 Like