Cycles: use the matching view of stereo / multi-view image textures when rendering stereoscopic
Cycles: use the matching view of stereo / multi-view image textures when rendering stereoscopic
Problem Blender can load stereo 3D images (Side-by-Side, Top-Bottom, …) and multi-view EXRs as Image datablocks (Image › Views: Use Multi-View , Views Format: Stereo 3D ), and the Image Editor displays them per eye. But when rendering with Stereoscopy enabled, Cycles ignores this: both eyes sample the full packed frame. For a side-by-side image, each eye sees both halves squeezed next to each other. This makes it impossible to place a stereo photo or video on a card in a stereoscopic/VR scene.
Steps to reproduce (Blender 5.2.2, Cycles)
- Create a side-by-side image: left half red, right half green.
-
Load it, enable
Use Multi-View
, set
Views Format
to
Stereo 3D
,
Stereo Mode
to
Side-by-Side
. (
image.is_stereo_3dis True,image.sizereports the per-view size.) - Put it on a plane: Image Texture → Emission.
- Enable Output › Stereoscopy (Stereo 3D) and render.
Expected: left eye red, right eye green. Actual: both eyes show red and green, i.e. the whole packed frame.
Use case Stereo VR180/360 productions: floating stereo photos, stereo video panels, 2D-to-3D converted images, stereo matte paintings, live-action stereo plates on cards. All common in VR film work, and all currently require rendering each eye separately with swapped textures, or shader hacks.
Proposal When rendering a multi-view image, Cycles should sample the view that matches the view currently being rendered, like the Image Editor and viewport already do. This should cover Image Texture and Environment Texture nodes, including movies and image sequences. Nice to have: a View option on the texture node (Auto = match render view / Left / Right / named view), which would also allow using a single eye of a stereo image in mono renders.
Current workaround Detect the eye inside the shader from the camera ray origin (Geometry › Incoming × (Light Path › Ray Length + camera clip start), projected onto the camera's X axis) and remap the UVs to the left or right half. It works, but it depends on non-obvious internals: Cycles rotates the panoramic camera space, panoramic rays start at clip start, and the stereo pivot shifts which eye sits at the camera. That makes it fragile and hard to discover.
0 Comments