Rendering to environment map broken in 2.5/2.6?

Hello all,

Can someone please confirm that rendering (and saving) cubic environment maps is broken in 2.6? If so I’ll file a bug report. It worked in 2.4.

I’m working from this tutorial. Just jump to the section titled “Render the environment map”. Some things have moved around since 2.4 but Blender appears to want to support this feature.

Here’s the steps I’m using:

  • Open the default scene (keep the centered cube)
  • Place some random objects surrounding the cube.
  • Set the material of the cube to “shadeless”
  • Give the cube a texture of type “Environment Map”
  • In the Environment map settings set Viewpoint 0 to the “Cube” object
  • Render the scene. (In 2.4 I believe you could watch it render each of the 6 cube faces. In 2.6 it just appears to render a single image as if you weren’t doing anything special)
  • Back under the Environment Map settings of the texture select “Save environment map” from the drop down list.
  • The image it saves has weird artifacts and parts are completely black/missing.

Am I doing something wrong or is this a bug? Any advice you could offer would be much appreciated.

Thanks!

  • Cruxic

http://wiki.blender.org/index.php/Doc:2.4/Manual/Textures/Mapping/Environment

explains better how to do this, did not find anything for 2.5 or 2.6, but may be there now as this was what I found some time ago.

Look in middle of wiki page for explanation that cube has to be on another layer, but this is NOT the layers in 3D header, look at texture panel when you have ‘environment’ as texture type (red in image I uploaded).


The blue arrow refers to cube map choices that you should do to prevent
issues if render does not turn out to your satisfaction. Once you have your good render you save it here also.

Viewpoint Object selector you’ll need to explore, don’t remember what setup I had.

I did get some blurry cubemaps in 2.61, but no chance to investigate this too deeply, I had to leave this for other TODOs.

Dunno what you need this for, but HDRI and spherical projection maps may suit you better?

This link to katsbits http://www.katsbits.com/tutorials/blender/rendering-skybox-environment-maps.php

has interesting idea to render cube with black stencil areas to fill in an image later with a paint program to your needs.

Thanks for the tips. I’ll give it another try this evening and let you know how it goes.

OK, big thanks to you, chip4brains! It works! No bugs, it just appears to work differently than I remembered. After studying those other articles you linked I got the results I needed.

Firstly, my goal was to simply generate a cubic environment map rendering of the scene. In other words, my team is using this technique as a kind of 360 degree panoramic camera. We can take the resulting image and load it into our game engine and let the player look in any direction. The goal is not for lighting or emulating ray traced reflections. To this end my steps are as such:

  • Create an interesting scene.
  • Add an “Empty” object and place it somewhere. This is your panoramic camera.
  • With the Empty selected go to “Textures” and add an “Environment Map” texture.
  • Set the “Viewpoint Obj” to whatever you named your Empty.
  • Set the “Resolution” to something nice and high like 1024. This means your resulting image will be 3072 x 2048 (6 cube faces in one image file).
  • Render your image (Note: make sure you render at the full 100% (default is 50%)
  • Back over on the Environment Map section of the texture there’s now an option to “Save Environment Map” (drop down list). Save it.

Here’s what I was doing wrong: To render a cubic panorama you don’t need a cube! I could have swore that was necessary in 2.4 but perhaps I’m mistaken. No worries. Furthermore, if you do use a cube as your “Viewpoint Obj” it’s not going to look correct because suddenly it’s going to be calculating reflections onto that cube with respect to the real camera you have in your scene. That’s not what we’re going for.

Clearly it’s late because I’ve written way more that necessary. Anyway, thanks for the help!

I remember some blend file from somewhere - can’t find anything now (of course) but it was
a really interesting way to do this cube mapping that someone can try (I don’t need or have time right now)

Basically it was six cameras set up in cube formation (90 degrees apart{orthogonal]) to each other in center of spheremap (skydome). Wish I could have found this, for credits sake, but it should not be hard to do.