This document provides information about the new features and improvements in
the most recent release of BS Contact 7.2.
In depth technical
documentation is available in the
BS SDK.
In additions to the WIN32 version 64Bit versions are now available.
The new version of BS Contact is supporting the most common internet browser like IE6, IE7, IE8 and Firefox 2 and Firefox 3.
The Mozilla plugin has been enhanced and is also supporting Google Chrome,Opera and Apple Safari.
#download and extracting of the zip file Inline { url "Texture.zip" } #download,extracting and starting a VRML file from the zip Inline { url "Content.zip#content/main.wrl" }
ShadowGroup
SFString mode | Indicates the mode of operation for generating and projecting the shadow. available modes are: shadowMap | shadowDepthMap |
MFNode emitter | Contains the scene graph with geometry casting shadows. |
MFNode plane | Geometry nodes with projected shadowMap. For self shadow the emitter and plane must be the same. |
MFNode shadowMap | Contains the CompositeTextures to render the shadow geometry. For CSM shadow you have to define 3 CompositeTextures. |
SFNode shadowMapGenAppearance | Appearance node used to write shadowMap CompositeTexture3D. |
SFNode appearance | Appearance node to project the shadow map onto geometry in the plane field. (used DX9 FX Shader for projectiveTexture mapping) |
SFBool shadowMapBlurr | If TRUE the shadowMap with be blurred by a 2 path gaussian blurr filter (7*7 samples) |
SFFloat shadowMapBlurrFactor | 1.0 2.0 an offset factor when blurring the shadowMap. |
BlurrShader.fx needs to be present in the Contact Installation folder (number of samples can be adapted) |
For security reasons if the FlashPlayer is running inside Internet Explorer it refuses to load content that is not served from the same domain. These examples are working as expected in Firefox or in the standalone BS Contact player.
MFString set_function | At the Flash Movie you can invoke functions with this parameter. The first SFString in set_function is the function call and the second SFString is the return value from the Flash function. |
MFString command | This eventOut is fired when the Flash movie is sending a command. |
EXTERNPROTO PostProcessing[ exposedField SFVec3f bboxSize exposedField SFVec3f bboxCenter exposedField SFNode metadata exposedField SFBool enabled exposedField MFNode inputTexture exposedField MFNode outputTexture exposedField SFNode outputDepthTexture exposedField MFNode shaders eventIn MFNode addChildren eventIn MFNode removeChildren exposedField MFNode children exposedField MFNode outputChildren exposedField SFNode background ] ["urn:inet:bitmanagement.de:node:PostProcessing","http://www.bitmanagement.de/vrml/protos/nodes.wrl#PostProcessing","nodes.wrl#PostProcessing"] EXTERNPROTO GroupRenderToTexture[ exposedField SFVec3f bboxSize exposedField SFVec3f bboxCenter exposedField SFNode metadata exposedField SFBool enabled exposedField SFString path exposedField MFNode outputTexture exposedField SFNode outputDepthTexture eventIn MFNode addChildren eventIn MFNode removeChildren exposedField MFNode children exposedField MFNode outputChildren exposedField SFNode background ] ["urn:inet:bitmanagement.de:node:GroupRenderToTexture","http://www.bitmanagement.de/vrml/protos/nodes.wrl#GroupRenderToTexture","nodes.wrl#GroupRenderToTexture"] EXTERNPROTO CompositeTexture3D[ eventIn MFNode addChildren eventIn MFNode removeChildren exposedField MFNode children exposedField SFInt32 pixelWidth exposedField SFInt32 pixelHeight exposedField SFNode background exposedField SFNode fog exposedField SFNode navigationInfo exposedField SFNode viewpoint exposedField SFBool repeatS exposedField SFBool repeatT exposedField MFString parameter exposedField SFString update exposedField SFNode metadata ] ["urn:inet:bitmanagement.de:node:CompositeTexture3D","http://www.bitmanagement.de/vrml/protos/nodes.wrl#CompositeTexture3D","nodes.wrl#CompositeTexture3D"]
Typical example of a scene postprocessing:
1.) Render Scene to Texture FrameTextureDEF GROUP_RENDER GroupRenderToTexture { children [ # the scene to render ...... ] # scene is rendered to this texture outputTexture DEF FrameTexture CompositeTexture3D { pixelWidth -1 # take size of initial rendering area as size pixelHeight -1 } }2.) process FrameTexture with shader to render on screen
PostProcessing { enabled TRUE inputTexture USE FrameTexture # bound as texture0 by default shaders DEF FrameShader PackagedShader { language "HLSL" url "process_dizzy.fx" exposedField SFFloat time 1 # a shader parameter field SFNode inputTexture USE FrameTexture } outputTexture [ DEF Output1Texture CompositeTexture3D { pixelWidth -1 pixelHeight -1 } ] }3.) just render inputTexture to screen
PostProcessing { enabled TRUE inputTexture USE Output1Texture }
EXTERNPROTO MultiAppearance[ exposedField SFNode metadata exposedField MFString path exposedField MFNode appearances ] ["urn:inet:bitmanagement.de:node:MultiAppearance","http://www.bitmanagement.de/vrml/protos/nodes.wrl#MultiAppearance"]
MFString path | names the render path for the corresonding appearances[] entry |
MFNode appearances | list of Appearance nodes |
MultiAppearance { appearances [ Appearance { } Appearance { emissiveColor 1 0 0 } ] path["myRenderPath" "myEmissivePath"] }
GroupRenderToTexture { path "myRenderPath" ... }If the path string value is not found in the path MFString field of MultiAppearance the first appearance node is used.
The implementation of StereoMovieTexture is now improved to use DirectX9 accelerated YUV to RGB surface conversion. Live streaming is now better supported using custom DirectShow source filters, GRF files or MMS streams. More information is available in the SDK.
EXTERNPROTO ImageTextureLOD[ exposedField SFBool repeatS exposedField SFBool repeatT exposedField MFString url exposedField SFNode loadingTexture eventIn SFBool set_unload exposedField MFString parameter exposedField SFBool thumbEnabled exposedField SFVec2f thumbSize exposedField SFNode thumbTexture exposedField SFBool showThumb eventOut SFBool isLoaded eventOut SFVec2f size eventOut SFFloat aspect ] ["urn:inet:bitmanagement.de:node:ImageTextureLOD"]
SFNode loadingTexture | NULL or a TextureNode giving an image during loading. |
SFNode thumbTexture | NULL or a TextureNode giving the thumbnail version of the image. |
SFBool showThumb | default TRUE, if TRUE show the thumbnail texture |
SFBool thumbEnabled | default TRUE, If thumbTexture is NULL and thumbEnabled is TRUE allow the creation of a thumbnail of size thumbSize. This is currently supported for DirectX9 only. |
SFVec2f thumbSize | default -1,-1,if thumbSize > 0 0, the size for thumbnail generation can be set. |
SFBool isLoaded | sends TRUE if image has been sucessfully loaded |
SFVec2f size | reports the originial image size in pixel |
SFFloat aspect | reports the originial image aspect factor |
EXTERNPROTO ImageTextureMipmapLOD [ exposedField SFBool repeatS exposedField SFBool repeatT exposedField MFString url exposedField SFVec3f center exposedField MFFloat range eventOut SFint32 level_changed eventOut SFBool isLoaded eventOut SFBool isFlipped ] ["urn:inet:bitmanagement.de:node:ImageTextureMipmapLOD"]
SFBool repeatS | Enable the flip around the S axis. |
SFBool repeatT | Enable the flip around the T axis. |
MFString url | As string noted the seperate mipmaps of the textures used for this object. |
SFVec3f center | Center of the object for calculating the distance to the camera. |
MFFloat range | As array noted the toggle distance of the mipmap levels. |
SFInt32 level_changed | This field is fired if a level of the mipmap is changed. It is sending the changed level. |
SFBool isLoaded | This field is an eventOut. It is firing when the node is ready with loading all textures but not stored in graphic memeory. |
SFBool isFlipped | If the texture is flipped this field is sending a TRUE value. |
MFString parameter | This allows to further specify how the texture data should be processed and used. |
EXTERNPROTO TextToSpeech [ exposedField SFString description exposedField SFFloat pitch exposedField SFBool enabled exposedField SFFloat volume exposedField SFFloat speed eventIn SFString text eventOut SFBool isActive ]["urn:inet:bitmanagement.de:node:TextToSpeech"]
SFString description | A description string of the node. Default: "" |
SFFloat pitch | The pitch value of the voice. Default: 0 |
SFBool enabled | To enable or disable the voice which should be spoken. Default: TRUE |
SFFloat volume | The volume of the voice. The range of the volume is 0-100. Default: 100 |
SFFloat speed | Value specifying the speaking rate of the voice. Supported values range from -10 to 10 - values outside this range may be truncated. Default: 0 |
SFString text | This field defines the text which should be used. If the field is triggered the voice will speak the text from the field. |
SFBool isActive | This field indicates if the voice is curently speaking. There can be only one voice in a scene active. |
Global sound focus
In Settings->Preferences>Sound TAB there is a a new option for
global focus and sticky focus. If enabled Sounds are playing even if the Contact window looses focus.
For an individual Sound2 node one can add this option in the vrml file:
Sound2 { parameter ["globalFocus"] ... }Other parameters are stickyFocus and pitch for enabling pitch support. Otherwise a pitch value != 1.0 has to be set in a AudioClip to enable pitch support for that Sound.
Parsing of X3D MFString values
According to the X3D specification each element in an X3D MFString attribute should be qouted by " ". A warning is now reported if an individual value is not properly qouted.
The fallback is to delimit the MFString element by whitespace.
Example:
<FontStyle justify='"MIDDLE" "MIDDLE"' /> <NavigationInfo type='"WALK" "EXAMINE" "ANY"'/>
Improved saving of scene to X3D XML encoding
Browser.saveWorld and saveWorld2 are now better supporting XML writing with escaping of special chars and containerField support.
MultiTexture
MultiTexture { materialSpecular FALSE # turn off extra final ADD of current specular color mode [ "DIFFUSE_TEXTURE_MODULATE" "SPECULAR_TEXTURE_CURRENT_MULTIPLYADD" # SPECULAR * TEXTURE + CURRENT ] }Avoid flicker
Render flip
'rendermethod','flip' | Enable the render flip of the scene. |
'rendermethod:flipx','true' | Enable the flip around the x axis. |
'rendermethod:flipy','true' | Enable the flip around the y axis. |
BufferTexture
EXTERNPROTO BufferTexture[ exposedField SFBool repeatS exposedField SFBool repeatT exposedField SFString format exposedField SFInt32 pixelWidth exposedField SFInt32 pixelHeight exposedField SFInt32 levels exposedField MFString parameter eventIn SFBool set_unload eventIn SFInt32 set_lod eventOut SFBool isLoaded eventOut SFBool isFlipped exposedField SFNode metadata ] ["urn:inet:bitmanagement.de:node:BufferTexture","http://www.bitmanagement.de/vrml/protos/nodes.wrl#BufferTexture","nodes.wrl#BufferTexture"] This node is similar to the other texture nodes of X3D and BS Contact. Below are some hints for the usage of this node.
format | format corresponds to the DirectX 9 SDK D3DFORMAT enumeration. Please check with the DXCAPSVIEWER of the availability of formats. |
parameter | The parameter "animated" is important to create a direct Video Memory surface,
otherwise an "managed" surface is created. For more information about the parameter field please take a look at the SDK. |
COM Interface | The BufferTexture node supports the extra interface [ object, uuid(49FE19F3-E269-46ce-A9AF-E701ECC088EE), dual, nonextensible, helpstring("IBufferTexture-Interface"), pointer_default(unique) ] interface IBufferTexture : IDispatch { HRESULT setFormat([in] int width,[in] int height,[in] int levels, [in] int format,[in] int options); // returns current texture format (D3DFMT enum type) HRESULT getFormat([out] int *width,[out] int* height,[out] int* levels, [out] int *format); // get status, E_POINTER if no texture yet created HRESULT getStatus([out] int *status); // copy texture data in exact native format returned by getFormat HRESULT setTexture([in] int level,[in] int cnt,[in,size_is(cnt)] unsigned small int * pixels,[in] int stride); // generic possibly slower version , with format conversion in DX9 HRESULT setTextureEx([in] int width,[in] int height,[in] int level,[in] int format,[in] int cnt,[in,size_is(cnt)] unsigned small int * pixels,[in] int stride); // get directly the IDirect3DTexture9 interface HRESULT getTextureHandle([out] IUnknown **value); }; |
DrawGroup Extension
SFBool delayed | default : FALSE render DrawGroup delayed as transparent object after normal scene. |
SFBool restoreOp | default : FALSE , if TRUE automatically restores DrawOp value after children has been traversed. |
RayHitInfo extension
The RayHitInfo node has new fields for more hit information about the object. This node is returned by computeRayHit and mouseSelect.
SFColor hitColor | Interpolated vertex color at intersection. |
MFVec3f hitMultiTexCoord | Interpolated (multi) texCoord at intersection. |
SFVec3f hitFaceNormalLocal | Face normal in local coordinates |
New Parameter for textures
compress | Forces commpression to DXT1 for RGB or DXT5 for RGBA textures, ignored if animated. |
You can download the latest version of the BS Contact 7.2 installer in the download center.
Beta versions are available here.