Envi

From DeltaWiki
Revision as of 20:49, 3 December 2023 by Xan (talk | contribs) (Created page with "{{feature|971|4.1}} 300px|thumb|The ''envi'' command in use at the [[AWGate]] :''This feature is only supported on the DirectX renderer.'' The '''envi''' command, also known as '''environmental rendering''', renders the scene from an object's perspective to texture. Usages of this command include mirrors and environment maps. == Usage == '''envi''' [type=''type''] [res=''res''] [upd=''upd''] [zoom=''zoom''] [proj=''proj''] [aspect=''aspect''] [clip...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
Envi
Build

971

Version

4.1

The envi command in use at the AWGate
This feature is only supported on the DirectX renderer.

The envi command, also known as environmental rendering, renders the scene from an object's perspective to texture. Usages of this command include mirrors and environment maps.

Usage

envi [type=type] [res=res] [upd=upd] [zoom=zoom] [proj=proj] [aspect=aspect] [clip=clip] [time=time] [tag=tag] [name=name] [global]

type

The type argument is an integer value that one of the value shown below, where for example type 0 will render a the environment from the model's view at its bounding box center point considering the reflection angle from the main camera's current position; while type 1 will do the same plus mirroring the rendered image. The default is type 0.

Available types for the subrenderer are:

  • 0 ... use bbox center, dynamic reflection angle
  • 1 ... use bbox center, dynamic reflection angle, mirror image
  • 2 ... use bbox center, fixed reflection angle
  • 3 ... use bbox center, fixed reflection angle, mirror image
  • 10 ... use model center, dynamic reflection angle
  • 11 ... use model center, dynamic reflection angle, mirror image
  • 12 ... use model center, fixed reflection angle
  • 13 ... use model center, fixed reflection angle, mirror image

res

The res argument is the resolution used for the rendering. Valid values are 32, 64, 128, 256, 512 and 1024. Higher resolutions will result in better quality of the rendered subscene. Lower resolutions are rendered faster, but in lower quality. The default resolution is 128 pixels squared.

upd

The upd argument sets the update rate of the rendered subscene. It can take any value in the range from 0 to 33. An update rate of 0 (zero) is a one time shot. One time shots will remain onto the surface, even there is no further rendering, regardless of the given time option value. Setting it to e.g. 15, will render 15 frames in a second onto the projection surface. The default update rate is 0, a one time shot.

zoom

The zoom argument gives you the option to zoom in or zoom out the rendered view. The value must be higher than 0.0. There is no upper limit specified. A zoom factor of 1.0 is considered as browser standard. Values lower than 1.0 will zoom out, providing a wider perspective angle, a fish-eye perspective with extreme values. Values higher than 1.0 will zoom in, getting objects closer to the view. The default zoom factor is 1.0.

proj

The proj argument is an integer value that takes either the value 1 for perspective projection or 2 for parallel projection. A typical mirror has parallel projection. Typical environment maps use perspective projection, a 'distorted mirror view', if you would like so. Parallel projection require higher zoom factors and a slightly adjusted aspect ratio to achieve the imagination of a real mirror. The default value for the projection argument is 1, perspective projection.

aspect

The aspect argument represents the aspect ratio, which is the ratio of the width and the height of the rendering view. A typical square surface takes an aspect ratio of 1.0, the default. An aspect of higher than 1.0 stretches the width of the projection view, where an aspect lower than 1.0 shrinks the width of the view. This is in particular useful, if the projection surface is not squared.

clip

The clip argument sets the far clipping for the subrenderer and can be in the range of 0.1 to 1200.0. The value is given in meters, and defines the distance of objects that should be considered by the subrender, similar to the far fog range value set in a world. The default value is the same as the default for far fog range in a world, 120.0 meters.

time

The time argument defines how long the subrender should stay active, meaning to continue rendering onto the object's surface if the upd argument is used. When the time elapses, the rendering surface will reset to its initial texture, or sign text or color. The value for time can take any positive floating point value. A value of 0.0 means 'infinitiv', where rendering will continue until the scene is left. The default value is 0.0.

tag

The tag argument specifies the tag number of the surface to render on. Any tag that exists on the used object can be used, including tags of jointed avatars. A value of 0 (zero), also the default value, means to render on all surfaces of the geometry.

name

The name argument can be used for remote control, applying the envi command onto the named object within view of the same owner.

global

The global argument will cause triggers to initiate the command for all users have the object in view. Without it, the command will be triggered exclusively for the user who activates the trigger (bump, activate, adone). By default, commands are not global.

Notes

The subrenderer's camera is positioned at the object's pivot, the rotation center of the object. For the best experience with mirrors, objects with its pivot set at its center should be used, unlike the pictwll object series.

Examples

create envi res=256 type=1 upd=10 zoom=17 proj=2 aspect=1.2

This will create a mirror on an object, such as a pictwll.rwx.

create envi res=512 type=1 upd=10 zoom=10.4 proj=2 aspect=2 time=30

This will create a mirror on a wide object (width equals 2 times of height) and will stop rendering after 30 seconds.

activate envi res=512 type=1 upd=10 time=20 aspect=0.5 zoom=0.8

This will create a 'distorted mirror' projection, quite funny, for example on a squared object like pictwll2.rwx in an update rate of 25 frames per second for 20 seconds.

activate envi res=128 type=1 zoom=.5

This will create a subrendered projection view in fish eye style in low resolution as a one time shot.

create envi res=256 type=2 upd=10 zoom=1 aspect=1

This will create a fixed mirror on an object, such as a pictwll.rwx.

Object Scripting

Building2.jpg

Triggers: CreateBumpActivateAdoneAtCollideSdoneEnter ZoneExit Zone

Commands: AddforceAddtorqueAlpharefAnimateAstartAstopCameraColliderColltagColorCoronaEnviExamineFrameGroupLightLinkLockMatfxMediaMidiMoveNameNoiseOpacityPictureRotateSayScale SeqShadowShearSignSkewSkyboxSolidSoundTagTeleport / TeleportxTextureTimerURLVelocityVisibleWarpWeb nl:Commando:Envi