Difference between revisions of "Documentation Talk:Reference Section 7.5"

From POV-Wiki
Jump to navigation Jump to search
m (→‎sunpos.inc: follow up)
m (setup screen.inc section for edit)
 
Line 1: Line 1:
==sunpos.inc==
+
===sunpos.inc===
 
It should be mentioned that the default distance of the sun from the origin is 1e+9 units. [[User:SharkD|SharkD]] 17:33, 6 September 2009 (UTC)
 
It should be mentioned that the default distance of the sun from the origin is 1e+9 units. [[User:SharkD|SharkD]] 17:33, 6 September 2009 (UTC)
  
 
Check the [[Documentation:Reference Section 7.5#sunpos.inc|original]] page. I added a trailing note to that section --[[User:Jholsenback|jholsenback]] 18:34, 6 September 2009 (UTC)
 
Check the [[Documentation:Reference Section 7.5#sunpos.inc|original]] page. I added a trailing note to that section --[[User:Jholsenback|jholsenback]] 18:34, 6 September 2009 (UTC)
 +
 +
===screen.inc===
 +
<p>Screen.inc will enable you to place objects and textures right in front
 +
of the camera. When you move the camera, the objects placed with screen.inc
 +
will follow the movement and stay in the same position on the screen.
 +
One use of this is to place your signature or a logo in the corner of the image.</p>
 +
 +
<p>You can only use screen.inc with the perspective camera. Screen.inc
 +
will automatically create a default camera definition for you when it is included.
 +
All aspects of the camera can than be changed, by invoking the appropriate 'Set_Camera_...'
 +
macros in your scene. After calling these setup macros you can use the macros Screen_Object
 +
and Screen_Plane.</p>
 +
 +
<p class="Note"><strong>Note:</strong> even though objects aligned using screen.inc follow the
 +
camera, they are still part of the scene. That means that they will be
 +
affected by perspective, lighting, the surroundings etc.</p>
 +
 +
<p>For an example of use, see the screen.pov demo file.</p>
 +
 +
<p><code>Set_Camera_Location(Loc)</code> Changes the position of the default camera to a new location
 +
as specified by the <code>Loc</code> vector.</p>
 +
 +
<p><code>Set_Camera_Look_At(LookAt)</code> Changes the position the default camera looks at to a new location
 +
as specified by the <code>LookAt</code> vector.</p>
 +
 +
<p><code>Set_Camera_Aspect_Ratio(Aspect)</code> Changes the default aspect ratio, <code>Aspect</code> is a
 +
float value, usually width divided by the height of the image.</p>
 +
 +
<p><code>Set_Camera_Aspect(Width,Height)</code> Changes the default aspect ratio of the camera.</p>
 +
 +
<p><code>Set_Camera_Sky(Sky)</code> Sets a new Sky-vector for the camera.</p>
 +
 +
<p><code>Set_Camera_Zoom(Zoom)</code> The amount to zoom in or out, <code>Zoom</code> is a float.</p>
 +
 +
<p><code>Set_Camera_Angle(Angle)</code> Sets a new camera angle.</p>
 +
 +
<p><code>Set_Camera(Location, LookAt, Angle)</code> Set <code>location</code>, <code>look_at</code> and <code>angle</code> in one go.</p>
 +
 +
<p><code>Reset_Camera()</code> Resets the camera to its default values.</p>
 +
 +
<p><code>Screen_Object (Object, Position, Spacing, Confine, Scaling)</code> Puts an object in front of the camera.<br>
 +
Parameters:</p>
 +
<ul>
 +
<li><code>Object</code> = The object to place in front of the screen.</li>
 +
<li><code>Position</code> = UV coordinates for the object. &lt;0,0&gt; is lower left corner of
 +
                    the screen and &lt;1,1&gt; is upper right corner.</li>
 +
<li><code>Spacing</code> = Float describing minimum distance from object to the borders.
 +
                    UV vector can be used to get different horizontal and       
 +
                    vertical spacing.                                            </li>
 +
<li><code>Confine</code> = Set to true to confine objects to visible screen area. Set to
 +
                    false to allow objects to be outside visible screen area.    </li>
 +
<li><code>Scaling</code> = If the object intersects or interacts with the scene, try to
 +
                    move it closer to the camera by decreasing Scaling.</li>
 +
</ul>
 +
<p><code>Screen_Plane (Texture, Scaling, BLCorner, TRCorner)</code> Screen_Plane is a macro that will place a
 +
texture of your choice on a plane right in front of the camera.<br>
 +
Parameters:</p>
 +
<ul>
 +
<li><code>Texture  </code> = The texture to be displayed on the camera plane. &lt;0,0,0&gt; is
 +
                      lower left corner and &lt;1,1,0&gt; is upper right corner.</li>
 +
<li><code>Scaling  </code> = If the plane intersects or interacts with the scene, try to
 +
                      move it closer to the camera by decreasing Scaling.</li>
 +
<li><code>BLCorner </code> = The bottom left corner of the Screen_Plane.</li>
 +
<li><code>TRCorner </code> = The top right corner of the Screen_Plane.</li>
 +
</ul>

Latest revision as of 12:06, 16 November 2009

sunpos.inc

It should be mentioned that the default distance of the sun from the origin is 1e+9 units. SharkD 17:33, 6 September 2009 (UTC)

Check the original page. I added a trailing note to that section --jholsenback 18:34, 6 September 2009 (UTC)

screen.inc

Screen.inc will enable you to place objects and textures right in front of the camera. When you move the camera, the objects placed with screen.inc will follow the movement and stay in the same position on the screen. One use of this is to place your signature or a logo in the corner of the image.

You can only use screen.inc with the perspective camera. Screen.inc will automatically create a default camera definition for you when it is included. All aspects of the camera can than be changed, by invoking the appropriate 'Set_Camera_...' macros in your scene. After calling these setup macros you can use the macros Screen_Object and Screen_Plane.

Note: even though objects aligned using screen.inc follow the camera, they are still part of the scene. That means that they will be affected by perspective, lighting, the surroundings etc.

For an example of use, see the screen.pov demo file.

Set_Camera_Location(Loc) Changes the position of the default camera to a new location as specified by the Loc vector.

Set_Camera_Look_At(LookAt) Changes the position the default camera looks at to a new location as specified by the LookAt vector.

Set_Camera_Aspect_Ratio(Aspect) Changes the default aspect ratio, Aspect is a float value, usually width divided by the height of the image.

Set_Camera_Aspect(Width,Height) Changes the default aspect ratio of the camera.

Set_Camera_Sky(Sky) Sets a new Sky-vector for the camera.

Set_Camera_Zoom(Zoom) The amount to zoom in or out, Zoom is a float.

Set_Camera_Angle(Angle) Sets a new camera angle.

Set_Camera(Location, LookAt, Angle) Set location, look_at and angle in one go.

Reset_Camera() Resets the camera to its default values.

Screen_Object (Object, Position, Spacing, Confine, Scaling) Puts an object in front of the camera.
Parameters:

  • Object = The object to place in front of the screen.
  • Position = UV coordinates for the object. <0,0> is lower left corner of the screen and <1,1> is upper right corner.
  • Spacing = Float describing minimum distance from object to the borders. UV vector can be used to get different horizontal and vertical spacing.
  • Confine = Set to true to confine objects to visible screen area. Set to false to allow objects to be outside visible screen area.
  • Scaling = If the object intersects or interacts with the scene, try to move it closer to the camera by decreasing Scaling.

Screen_Plane (Texture, Scaling, BLCorner, TRCorner) Screen_Plane is a macro that will place a texture of your choice on a plane right in front of the camera.
Parameters:

  • Texture = The texture to be displayed on the camera plane. <0,0,0> is lower left corner and <1,1,0> is upper right corner.
  • Scaling = If the plane intersects or interacts with the scene, try to move it closer to the camera by decreasing Scaling.
  • BLCorner = The bottom left corner of the Screen_Plane.
  • TRCorner = The top right corner of the Screen_Plane.