Rendering a cubic environment map? Docs are pretty sparse

   19788   8   3
User Avatar
Member
24 posts
Joined: 2月 2006
Offline
Hey there

I'm trying to do a render setup for a cubic environment map.

As far as I read under “Rendering Cubic environment maps” in the docs, I created a cube and added all the required nodes under Rendering Parameters.

Settings:
- output to “$HIP/cubemap.pic”
- view resolution to 1024x1024

A standard mantra-node and a cam1 is in the scene.
When I render, only the standard camera-view of cam1 shows up in mplay.
No environment map-tiles seem to be rendered, no new files appear in the $HIP dir.

the docs are pretty sparse; also google.

any hints what I overlooked?
User Avatar
スタッフ
2540 posts
Joined: 7月 2005
Offline
The generated cubic map saved out as .pic or .rat will place the 6 sides as separate image planes. Is that the case? Use the plane chooser in the upper left to see if indeed there are an additional 5 extra image planes being generated.

Backtrack a bit first. You can use both polar and cubic environment maps. Some users prefer polar maps as environment map stand-ins in place of cubic maps.

You can render polar environment maps of your scene very easily. Here's a quick check-list:
  • - Camera Projection set to Polar (panoramic)
    - Output Driver Render engine set to Raytrace or PBR (MicroPolygon doesn't support polar rendering).


    If you are trying to render a global environment map for your scene, you can place a camera in your scene where you want to locate your Environment Light object and render a polar panoramic image and use that as your environment map to illuminate your scene.

    If you wish to generate an old-school reflection map for an object as that is what the help is referring to, then you can either generate a cubic environment map or again a polar panoramic image. Up to you.
    Back in the day when ray tracing in PRMan was not an option (not to far ago actually) and you wanted your object to reflect the environment, you needed to pre-compute a cubic environment map for that reflected object. If the scene contained animated objects, you needed to automate this for every frame.
    The help refers to this technique and does make reference to this in the first paragraph.
    IF this is indeed what you want, then you need to follow this check-list to set things up:

    - follow the help checklist and add the additional render parms as per the help here: www.sidefx.com/docs/houdini11.0/rendering/cubicenvmap
    - Change the env map extension to .rat as this help may very well predate the introduction of .rat images as this technique is very old in the scheme of things.
    - Add a surface shader to the object that is to receive the pre-generated environment map. In the reflection tab, add the map reference to the reflection map parameter.
    - Set the Output Driver to MicroPolygon Rendering and do not raytrace anything as that is the whole point of generating reflection environment maps per object. Add the render property “Enable Raytraced Motion Blur” (vm_rayblurquality) and set to off to ensure this.
    - Use only point lights and spot lights in the scene. Using Env Lights to generate A/O trigger raytracing and that breaks the spirit of this technique. IF you want A/O in this model, use point based A/O with no solution shipping with Houdini.


    I think the only people still interested in generating environment maps as per-object reflection maps are very large facilities that really and I mean really don't want to raytrace anything or those wanting to explore this old and venerable technique that just doesn't offer much in return these days.
There's at least one school like the old school!
User Avatar
Member
24 posts
Joined: 2月 2006
Offline
The reason I'm intested in this is, that I want to build skymaps as rendered scene backgrounds within Unity. If I have a cubic environment map seen from point X with the surrounding scene, I can use the six generated textures to stitch them together seamlessly in Unity.
This provides me with a scene background which can be anything, really. A room, a distant landscape with clouds overhead, etc.

A polar panorama only works in that aspect, that I could use a large cylinder with inward facing normals surrounding my scene. If I put the panorama on this cylinder, I have a landscape, etc. This doesn't cover floor and ceiling however.

It's also a possibility, but I would prefer a cubic environment map, since I can use it for reflections in shaders and scene backgrounds in skymaps equally.

I utilized this to great effect in several realtime projects and just want to know how to get this out properly from within houdini

Well… now to the execution:

I followed the docs and your checklist, but still no cubic environment map seems to be rendered out to anywhere I can find.

A scene is provided as attachment, maybe somebody can point me to the error. When I render the scene, no cubic environment map or additional image planes are generated.

Attachments:
example.hip (718.1 KB)

User Avatar
Member
1390 posts
Joined: 7月 2005
Offline
There are two similarly named properties: render_envmap and render_any_envmap. You want to add first, not second one


hth,
skk.
User Avatar
Member
24 posts
Joined: 2月 2006
Offline
Ok, now I got something rendering. The outcome seems to be incorrect, however.

First of all, the “Back”-Plane is upside down and possibly incorrectly rendered. There's a black blotch and when I tried to just rotate/flip it around for the cubic map, it doesn't add up to the rest.

Secondly, just for kickers I added a depth map shadow on the pointlight.
Since I'm very very starter about rendering in houdini it's possible I did lots of things wrong, but the shadow at least shows up in the single-frame of the camera when I render it out. It doesn't show up in the cubic planes.

Perhaps because of missing rendering parameters?
Do I have to add an up-vector or something?

It seems a bit complicated to set this up via the rendering parameters on a null.
Wouldn't it be easier if I just took six cameras, orient them somewhere and build up a compositing network to add up the planes in a single RAT?

Then I would have a seperate mantra node in that subnetwork which gives me precise sampling, etc and the cameras are more configurable too?

I just wonder if the edges stitch up correctly then.
Will try this and report

Attachments:
example_v2.hip (179.1 KB)

User Avatar
Member
24 posts
Joined: 2月 2006
Offline
this is a very rough draft of a file which seems to render a cubic environment map via six single files pretty nicely.

they stitch up perfectly. now I would've to turn this into a digital asset, but I think my curiosity is satisfied for the moment.

perhaps it's of use for anyone, so here's the file.

-elderic

Attachments:
environmentmap_setup_v1.hip (619.4 KB)

User Avatar
Member
153 posts
Joined: 6月 2010
Offline
You get the credit :-)
(you have little mistake over there,or maybe you use different method)
http://www.sidefx.co.il/2011/07/11/creating-virtual-360-panorama-houdini-tutorial/ [sidefx.co.il]

J.
User Avatar
Member
24 posts
Joined: 2月 2006
Offline
Thank you very much. I'm proud to have served as an inspiration of any kind! Altough I think your video stands up to itself pretty nicely already.

Cheers,
elderic
User Avatar
Member
696 posts
Joined: 3月 2006
Offline
Sorry to revive something from so long ago, but it seems that over time the documents have gotten even more sparse rather than being expanded upon.


I see that the various parameters still exist in the mantra properties, however they're organized slightly differently than what is explained in the H11 docs.

There no longer appears to be documentation at all for making environment maps in H15.

Following the instructions for H11 didn't appear to render anything for me, so I'm curious if the Auto-Generate Environment Maps/Output Picture/resolution parms still is a viable workflow
Stephen Tucker
VFXTD
  • Quick Links