[Bf-committers] Camera, displacement and normals

Robert Wenzlaff bf-committers@blender.org
Tue, 20 Jan 2004 21:15:38 -0500


On Tuesday 20 January 2004 09:38, Gregor M=FCckl wrote:
> Hi!
>
> I'm currently in the process of building a game engine which allows the
> player to look at panoramas, with viewing angles of 180 degrees in the
> vertical direction and 360 degrees in the horizontal direction.
>
> I am able to render these panoramas within blender with a small trick: I
> use a camera fov of 90 degrees and render 6 images - two along each
> coordinate axis - and project them onto a cube which is rendered in
> realtime. This method works quite good.
>
> Obviously, the rendered images must fit together seamlessly to create this
> illusion. However, I discovered, that when mapping texture output onto the
> displacement or normal of a material, the images won't fit as expected.
> This is quite disappointing because of this these features aren't availab=
le
> to the artists working on this game.
>
> Why is this? Does blender's renderer use the camera front vector instead =
of
> the ray direction for this? With a field of view of 90 degrees the angle
> between these gets to 45 degrees at the edge centers and even greater than
> this at the corners of the image. This would explain the effects I'm
> seeing.
>
> Is there a reason for doing it the way it is done right now? Would it be a
> big deal to alter this behaviour?

It may have been related to the normal flipping, or I may not quite underst=
and=20
the steps to recreate this.  But after the last commit, I ran these two=20
images with the camera at the origin, and rotated 90 degrees between #1 and=
=20
#2.

http://www.soylent-green.com/Test1.jpg
http://www.soylent-green.com/Test2.jpg

Pasting them together, I see no seam

http://www.soylent-green.com/Test1-2.jpg

Robert Wenzlaff

*************************************************
Robert Wenzlaff       rwenzlaff@soylent-green.com