# Fake reflections

**URL:** <https://forums.chaos.com/t/fake-reflections/63868>\
**Category:** General\
**Created:** [May 11, 2017, 10:23am UTC](https://forums.chaos.com/t/fake-reflections/63868 "2017-05-11T10:23:47Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![stevesideas](https://dub1.discourse-cdn.com/chaosprd/user_avatar/forums.chaos.com/stevesideas/32/29103_2.png) [@stevesideas](https://forums.chaos.com/u/stevesideas)\
**Post date:** [May 11, 2017, 10:23am UTC](https://forums.chaos.com/t/fake-reflections/63868/1 "2017-05-11T10:23:47Z")

</div>

I can place a texture inside the vraymaterial environment map to overide the main reflection but would also like the option to not have anything else reflect into the material/object to save on render time. Is this possible ?

---

<div class="post-metadata">

**Author:** ![stevesideas](https://dub1.discourse-cdn.com/chaosprd/user_avatar/forums.chaos.com/stevesideas/32/29103_2.png) [@stevesideas](https://forums.chaos.com/u/stevesideas)\
**Post date:** [May 11, 2017, 10:28am UTC](https://forums.chaos.com/t/fake-reflections/63868/2 "2017-05-11T10:28:59Z")

</div>

I’ve just tried using dim distance and set it very low. Would this method reduce render times as it doesn’t take into account other objects (or does it still take everything into consideration for reflection calcs) ?

---

<div class="post-metadata">

**Author:** ![DanielBrew](https://dub1.discourse-cdn.com/chaosprd/user_avatar/forums.chaos.com/danielbrew/32/22952_2.png) [@DanielBrew](https://forums.chaos.com/u/DanielBrew)\
**Post date:** [May 11, 2017, 11:02am UTC](https://forums.chaos.com/t/fake-reflections/63868/3 "2017-05-11T11:02:16Z")

</div>

Wouldn’t unticking trace reflections work? Or have I misunderstood.

---

<div class="post-metadata">

**Author:** ![stevesideas](https://dub1.discourse-cdn.com/chaosprd/user_avatar/forums.chaos.com/stevesideas/32/29103_2.png) [@stevesideas](https://forums.chaos.com/u/stevesideas)\
**Post date:** [May 11, 2017, 11:28am UTC](https://forums.chaos.com/t/fake-reflections/63868/4 "2017-05-11T11:28:45Z")

</div>

UNticking trace reflections turns off all reflections including the environmental slot reflections. Basically I need the environment (in the texture slot) to reflect but not any objects.

---

<div class="post-metadata">

**Author:** ![piotrus3333](https://dub1.discourse-cdn.com/chaosprd/user_avatar/forums.chaos.com/piotrus3333/32/17521_2.png) [@piotrus3333](https://forums.chaos.com/u/piotrus3333)\
**Post date:** [May 11, 2017, 11:34am UTC](https://forums.chaos.com/t/fake-reflections/63868/5 "2017-05-11T11:34:02Z")

</div>

trace sets

---

<div class="post-metadata">

**Author:** ![im.thatoneguy](https://dub1.discourse-cdn.com/chaosprd/user_avatar/forums.chaos.com/im.thatoneguy/32/20759_2.png) [@im.thatoneguy](https://forums.chaos.com/u/im.thatoneguy)\
**Post date:** [August 30, 2017, 7:25pm UTC](https://forums.chaos.com/t/fake-reflections/63868/6 "2017-08-30T19:25:11Z")

</div>

I just wrote a quick VrayGLSL map for exactly this purpose. But it only works for pure mirrors.

```auto
#version 110

uniform sampler2D Env;

void main() {
    vec3 normal = (gl_FrontFacing) ? vr_Normal : -vr_Normal;
    vec3 R = reflect(normal, vr_Direction);
    R = (vec4(R,0.0) * vr_CameraToWorld).xyz;
    float y = R.z;
    R.z = R.y;
    R.y = y;
    float m = 2.0 * sqrt(pow(R.x,2.0)+pow(R.y,2.0)+pow((R.z+1.0),2.0));
    float u = (R.x / m) + 0.5;
    float v = (R.y / m) + 0.5;
    vec3 envColor = vec3(texture2D(Env, vec2(u,v)));
    gl_FragColor = vec4(envColor, 1.0);
}

```

If you drop it into a VRayLight mtl it’ll give you a mirrored map.
