Open Source Platform
for interconnected virtual worlds

Content Scripting Python Post-Process

From RexWiki

Preface

Post-processing effects can be used in the viewer to make the world more lively, to simulate some weather effect or to just make things look "different". The effects are similar to the ones used in image editing programs like Photoshop, however this time the effect is used on top of a moving "image" (your view) instead of a static image.

The post-processing effects can be turned on from the server using a script. However, clients have also power to turn on/off effects from View->Postprocess menu.

Script

The following example function shows how to enable Bloom post-process effect when prim is touched:

def EventTouch(self,vAvatar):
    vAvatar.rexSetPostProcess(1,True)


  • The first parameter is the post-process effect index. Valid indexes are:
0 Motion Blur
1 RexBloom
2 Glass
3 UnderWater
4 B&W
5 Embossed
6 Sharpen Edges
7 Invert
8 Posterize
9 Laplace
10 HDR
11 HC_HDR
  • Second parameter defines if the effect should be turned on or off


Some samples of the effects in the viewer

pp_none.jpg
Normal

pp_hchdr.jpg
HCHDR (high dynamic range)

pp_rexbloom.jpg
Bloom

pp_bw.jpg
Black & white

pp_glass.jpg
Glass

pp_sharpen.jpg
Sharpen