Help w/Reflection Probes (for translucent cloth example)

So, I’m kind of dancing on the edge of the abyss here, but…

I have that cool example of metallic cloth https://playground.babylonjs.com/#RJ09NP#36

And now I want both the cloth to reflect the rectangle, and the rectangle to effect the cloth

I’ve put in the reflection probes, but…

tbh, I don’t really understand how they work; I read the documentation, is there a simpler breakdown?

@Necips

The reflectionTexture property is overwritten afterwards (see line 137):

https://playground.babylonjs.com/#KA93U#459

Also, you can’t use a texture in read and write mode at the same time. That’s what happens when generating the cube texture for the probe: the reflection texture of the arm/cloth is the texture we are writing too and we are also reading from it because it is the reflection texture of the material. So, I had to comment lines 112/113.

There’s a way around it, which would be to remove the reflection texture (or use the environment texture) of the arm/cloth material before generating the probe cube texture and set it back after.

1 Like

Another question now, can you make a ground “thick” (add depth); if I add depth to that cloth, will it be cooler? i.e. will light scatter around inside it in weird an interesting ways (if I play with the transparency, transluscency, etc.)?

We’re getting into some real nuance here. :upside_down_face:

//

I bring this up bc I’m chasing something. I went to LA once and had two experiences. In one, I was in a warehouse for a VR party downtown. This was before VR was popular. And someone loaded me into an experience where there was a shining metallic cloth. It was floating around the space, you could form and deform it with the vive controllers and it would float off glistening and sparkling.

Another time I went to LA, also earlier on, someone loaded me into a vr experience where I was in front of a monumental painting; it was a little bit like the experience in dark souls (Dark Souls - Peculiar Doll Location (Key to Painted World of Ariamis) - YouTube). You didn’t fall into the paining, but you could dip your head into the painting (bc the painting was very thick). And, it was coated in this kind of tranluscent layer, so light from the outside and the light/color in the painting fused in weird ways on the painting’s surface.

Both of these experiences were quite ‘mesmerizing’; I guess many years layer, I’m trying to reproduce these phenomena, in different ways.

Best way to know is to test! However, I feel like the physics will begin to take a heavy toll on the perf if you double the number of triangles to make a thickness… Also, you may have a lot of inter-penetration problems as the two layers will be close to each other.

…nice effect btw!

Thank you, yeah, I’ve done many many versions of this cloth now
https://www.instagram.com/p/COdtLQZlaql/ - hypercolor
https://www.instagram.com/p/COcCmcnFyOc/ - glass
https://www.instagram.com/p/COb8MaglKgt/ - ghost in the shell optical camo
https://www.instagram.com/p/CNwZmi1lvIM/ - deep sea jellyfish
https://www.instagram.com/p/CNwg1_dFTfk/ - VR

Creating A Ground | Babylon.js Documentation ← create ground has no depth function, can I force it to make depth somehow? bc when I swap in createPlane, it gets mad at me and wants me to redo the physics I think… (I’m sorry this is laziness/n00byness, I’m studying the physics engine for the first time seriously starting Thursday).

Sorry, I can’t help on physics, I know nothing of it.

No, createGround has no depth, I guess you will need to create two grounds…

1 Like