Home Technical Talk

Assigning the nearest cubemap

Hey all, trying to figure something out with the environment map option in my shaders, but the crydev sight is down, and so far the cached pages I found have not been helpful... I have a very claustrophobic office level, with lots of small rooms and hallways. There is a call for some reflections, but I realize that if i apply an environment map to things, the shader for the entire level will be altered. So every computer monitor will be showing "X" in the background, whether one is in the room or not. I saw a screenshot of somebody demonstrating that you use the nearest cubemap in the shader to get around this, but I have not had any luck in replicating the results. Seems that I don't know how to tell the shader to use the nearest cubemap. I know for a fact I am doing something wrong, am I also hunting a fallacy with this line of thinking? I'd really hope to be able to apply an appropriate cubemap to things, without having to duplicate my material for every few rooms in my level. Any assistance would be EXCELLENT and appreciated

Replies

  • leleuxart
    Offline / Send Message
    leleuxart polycounter lvl 12
    The Environment Probe radius should only affect whatever is in the radius. Also I believe if you type in "nearest_cubemap" as the Environment Map texture and change the type to nearest cube-map something, that'll work as well. I remember that from the Glass shader.
  • bac9-flcl
    Offline / Send Message
    bac9-flcl polycounter lvl 10
    For an environment like that, use Environment Probes in each room with the box projection mode enabled: this way you will get perspective-correct reflections, and in contrast with sphere-based default projection, you won't have problems with radius either being too low to cover corners or too high, causing leaking into adjacent rooms. Generate cubemaps for all probes.

    There is no need to manually assign cubemaps in CE3, environment probes provide them automatically to every single reflective material in their effective radius. You only ever need to assign a map into the cubemap slot of a material manually if you want to override the reflection.
  • MightyT
    Thank ya'll. I was confused since I found a few instances of the cry wiki writing in "nearest cubemap", and then mentioning it almost never again... Have since been able to use an environment probe successfully
Sign In or Register to comment.