Friday, February 22, 2019

Tips & Tricks with RLV

Hi !

This post is meant to be a sticky, something you come back to time and again when you have a particular question or trouble with the RLV. I will probably bring more and more stuff in here over time as I think of interesting subjects, or as I add more features to the RLV.

This is not meant to be an advertisement for the RLV, or a "is this RLV better than another" kind of post. If you are reading this, there's a good chance you are a RLV user already and you are looking to improve your experience. Or you are simply wondering what the hell you've just downloaded.

Lastly, this post talks only about the original RLV (with a few nods to other viewers) but does not talk about RLV features in particular. Instead, it talks about all the rest, the enhancements, the little differences, the tips and tricks that are proper to this viewer and that I can't live without.

Most of the enhancements listed below are also written in the "RestrainedLove Readme first.txt" file contained in the RLV folder after you've installed it, as well as a lot of information I do not repeat here (notably about shared folders).


First and foremost, you can download the RLV here.

"RLV" stands for "Restrained Love Viewer", but it was initially named "Restrained Life Viewer" until Linden Lab (owners of Second Life) decided that the word "Life" was forbidden in any third party viewer (open source viewers maintained by users like you and me). It is one of the first third party viewers and started in November 2007. It is still active and maintained to this day and has been through many updates over the years.

It was originally aimed at the BDSM community to improve their experience but it quickly evolved into something much more general, and is now used in combat sims, in stores for mannequins, even by disabled people... There is no trace of kinky activity anywhere in the code or in the specification, the only reminder of its origins is its very name.

Nowadays, almost all the third party viewers are RLV-compatible. This post is not meant to talk about them but just to avoid any confusion, please note that "RLV-compatible" means "compliant with the RLV API" and "scripts should not have to wonder whether they are talking to this RLV or that RLV, all RLVs should behave the same in a a script's standpoint".

Debug Settings

The RLV has several debug settings that you can modify by hand, and they are all persistent across sessions. If a section below refers to a debug setting to change, here is how to do that.

Open the Advanced menu (if you don't see it, press Ctrl Alt D to make it appear) in the top menu bar, then choose "Debug settings" near the bottom :

Then type "Restr" (no need to go further, it auto-completes to "RestrainedLove") :

Then click on the drop down list to choose the debug setting you want to change, all the RLV debug settings begin with "RestrainedLove" (naturally, if you want to change another one like "AutomaticFly", naturally don't type "RestrainedLove" but "AutomaticFly" in the white field) :

Once you click on the debug setting you want to change, select one of the options to change its value. For example, here "RestrainedLoveHeadMouselookRenderRigged" is a boolean (i.e. either FALSE or TRUE) so it has only two options, FALSE and TRUE.

Once you modify the value, it generally takes effect immediately unless written otherwise in the description.

Useful debug settings

Below is a list of debug settings I like to change to values that work best for me. You may or may not want to use the same values, but just for your information here is the list. Except RevokePermsOnStopAnimation. You want that one FALSE.

AutomaticFly : FALSE
CameraFocalLength : 10.0
CloseChatOnReturn : TRUE (so you don't have to manually focus out of the chat bar)
DisableCameraConstraints : TRUE
EnvironmentPersistAcrossLogin : TRUE
InventoryLinking : TRUE (to show the "Paste As Link" menu item in the inventory)
InventoryOutboxMakeVisible : TRUE (only useful for merchants)
RenderShadowBias : -0.001
RenderShadowBlurSize : 0.0 (so you can have sharp shadows and AO at the same time)
RenderSpotShadowBias : 0.0
RenderSpotShadowOffset : 0.010 (so the shadows are not cropped)
RenderSSAOEffect : x=0.7 (makes the AO shadows more pronounced)
RenderSSAOFactor : 1.0 (same)
RenderVolumeLODFactor : 4.0 (the default 1.125 is way too low)
RevokePermsOnStopAnimation : FALSE (VERY important (*))
AvatarRotateThresholdSlow : 5 (much better than the default 60°)
ShowMyComplexityChanges : 0 (because I don't care about ARC)
NavBarShowCoordinates : TRUE

(*) This one is super important if you ask me. It is TRUE by default and when you manually stop your animations, it also revokes all the animation permissions you've given to scripts, in particular furniture, which breaks them because they still think they have your permission to animate you when you use them. Some can only be fixed by resetting them, but those that are no-mod are irremediably broken and must be replaced, if at all possible. So you want to set "RevokePermsOnStopAnimation" to FALSE to avoid this. I write it in bold to emphasize how important it is.


World shortcuts

* Left-Click on yourself while focusing on something (i.e. not in mouse-steering mode) does nothing if the "RestrainedLoveBreakFocusOnClick" debug setting is set to FALSE (it is TRUE by default so you'll have to change manually it for that). This allows you to avoid ruining a shot by accidentally clicking on something you didn't mean to.

* Shift+Left-Click on yourself to go back to mouse-steering mode, even if you click on one of your attachments, even if it's a HUD. This works only if the "RestrainedLoveBreakFocusOnClick" debug setting is set to FALSE (it is TRUE by default so you'll have to change it at some point).

* Alt+Right-Click on an object to sit on it directly. This is useful when you don't want to pull the context menu and/or when you want to sit in a running vehicle without stopping it dead in its tracks.

* Ctrl+Right-Click on an object or an attachment to edit it.

* Shift+Right-Click on an object (not an attachment) to open it.

* Shift+Right-Click on an attachment (not an in-world object) to detach it (if not RLV-locked).

* Ctrl+Alt+M (or AltGr+M) to go in and out of Mouselook mode.

* Ctrl+Alt+Shift+A to reset all the animations. This is a local action to synchronize all the animations on your side (useful for photos and/or when you are with a partner), nobody else sees any change.

* Ctrl+Alt+Shift+V to refresh all the objects around you. This is equivalent to right-clicking on all the objects in the vicinity one after the other, and is useful if something seems off, a prim did not update its state, or something like that.

* Ctrl+T : Hide and show the IM window. I say "IM window" because you can tear the chat panel off it and have one panel for all the IMs and another just for the chat, like in V1.

* Hold Shift while in Mouselook for a more precise aim.

* Hold Alt while in Mouselook to allow for clicking on in-world objects even if your controls are grabbed (for example by a gun, which defaults left click to "fire").

* Ctrl+Alt+R to force a rebake of your appearance, which also sanitizes your Current Outfit Folder, for example removing doubloons. This is also done automatically after any change in what you wear.

* Shortcuts like "Request admin status" (which yields a "Request for special powers failed. This request has been logged." response, which can be chilling) and other LL-only actions have been removed.

Edit shortcuts

These shortcuts are useful when editing an object.

* Alt+W to switch "Edit Linked" on and off.

* Alt+S to switch to the "Move" mode.

* Alt+X to switch to the "Select Face" mode.

* Alt+C to switch to the "Align" mode.

* Alt+T to switch "Stretch Textures" on and off.

* Alt+B to switch "Stretch Both Sides" on and off.

* Alt+R to set the ruler mode to "World" or "Attachment".

* Alt+F to set the ruler mode to "Local".

* Alt+V to set the ruler mode to "Reference".

* Alt+G to set the current selected object as the Reference and to set the ruler mode to "Reference".

You can find all those shortcuts in the Build / Options menu :

Other enhancements

* Invisible surfaces are not rendered unless "highlight invisible" is active (that's Ctrl+Alt+T). This speeds the rendering up a little especially if you or people around you are wearing a lot of invisible attachments.

* Rigged attachments worn on any head attachment point are not rendered in Mouselook if the "RestrainedLoveHeadMouselookRenderRigged" debug setting is set to FALSE (which is its default value).

* The UI is visible while in Mouselook and you can hold the Alt key to use your cursor across different UI elements like the inventory window.

* RLV floaters (courtesy of Chorazin Allen of Kokua). You open them from different items in the RLV menu, they are meant to let you control your current RLV restrictions and states much more easily and with a much finer grain.

* When someone around you types something in the chat (not an emote), you see "Typing" above their name if their name is visible.

Viewer-to-RLV IM commands

If you are IMing someone who is using this RLV, you can send commands to them through IM, even if you are not a RLV user yourself. Those commands are :

* @version to get the version of the RLV they are using.

* @getblacklist to get the list of blacklisted commands in their RLV (note : nowadays the RLV is hardcore, meaning it has no blacklist, no OOC exception and no mean to turn RLV features off so this command will yield nothing).

* @list to get the list of restrictions the other party is currently under.

* @stopim to remotely close the IM session (useful if they are under a @startim restriction).

Those commands can be entered by hand or by clicking on any of the four menu items in this menu :

If an automatic response is sent by the other party's RLV, they won't see anything, only you will. If they don't use the RLV, they will see the command like any other IM (and will probably ask you what that means).

Problems & Solutions

I don't see how to uninstall the RLV

In fact, the RLV does not install itself, the "RestrainedLoveSetup.exe" file might be an executable, but it is actually a self-extracting archive (in other words, a zip file that extracts itself). To remove it from your hard drive, simply delete the folder you've "installed" the RLV to.

Speaking of which, when you download a new RLV, it is always a good idea to completely delete the old one before "installing" the new one so there is no conflict.
The RLV saves its cache in C:\Users\(YourName)\AppData\Local\RLV .

My textures are constantly getting blurry and downloading

This is a common problem, usually called "texture thrashing". To solve it, the best way is to set the value of "Texture Memory" to 1552 in the graphics preferences.

Open the preferences with Ctrl+P, go to "Graphics", click on "Advanced Settings..." and drag the Texture Memory slider until it reaches 1552. No more, no less.

Why 1552 and no other number ? The explanation can be found here.

I want to see materials but my computer is not fast enough to render shadows

Simple. Open the Preferences, go to "Graphics", click on "Advanced Settings..." (see above). First, make sure "Advanced Lighting Model" ("ALM") is on so you can see materials, and switch the "Shadows" drop down list to "None".

The viewer is so slow it is unusable

If you find the viewer crawl down like a snail although your computer is good (or even passable, or even low end, you should still be able to experience some kind of smoothness), it might be because you are trying to use Voice without the appropriate extensions installed.

Although the official SL viewer ships with Voice installed, third party viewers do not have the right to include the corresponding extensions because they are proprietary.

You have two options. Either turn off Voice completely in the Preferences ("Sound & Media" panel), like this :

Or install the Voice extension from the official SL viewer that you must download.

The files are :

- SLVoice.exe
- vivoxsdk_x64.dll
- ortp_x64.dll

Copy them from the folder where you installed the SL viewer, into the folder where you installed the RLV, and relog.

Ok, the viewer is usable but still a bit slow

Make sure "Vertex Buffer Objects" and "Avatar Hardware Skinning" are activated in the advanced graphics preferences.

I see green people (or blue or yellow or pink etc)

In the graphics preferences, set "Avatar Maximum Complexity" to "No Limit" or at least activate "Always Render Friends". If you're afraid it will slow down your viewer, fret not. "ARC" (Avatar Rendering Cost, which is checked against "avatar maximum complexity") is merely an indication of the complexity of the visual rendering of an avatar, including their attachments. It is not because their ARC is high that they slow your viewer down, especially knowing that ARC includes invisible surfaces (in fact, it includes them four times) that the RLV does not render in the first place.

I want certain folders in my #RLV to never be detached by a script

Simply add "nostrip" at the end of the name of the folder or the item (if you can modify it) that you don't want detached. It can still be detached by hand, but a script won't be able to detach it anymore until you rename it and remove the "nostrip" tag.


What's the difference between RLV and RLVa ?

RLV and RLVa are two different implementations of the same specification (a.k.a. the "RLV API" that you find here) and are supposed to react the same way to the same commands sent by scripts.

In practice, there are some differences but they are minimal. RLVa (the "a" stands for "alternate") is primarily used in the Catznip viewer, then when mature enough in the Firestorm viewer as well as Singularity. It is maintained by Kitty Barnett, not by me so I can't provide support for it.

What other viewers use the RLV code ?

The ones I know of are :

* Kokua (formely Imprudence, maintained by Chorazin Allen, previously by Nicky Perian) : A Firestorm-like interface with the same enhancements, but with my RLV code instead of RLVa (so it handles the vision restriction commands of the RLV 2.9 spec, which RLVa and therefore Firestorm -- at the time of this writing -- cannot).

* Cool VL (formerly Cool Viewer, maintained by Henri Beauchamp) : A SLv1-like interface with many enhancements, and my RLV code.

There are others but I can't remember off the top of my head.

Have fun !