Friday, January 25, 2019

RLV 2.9.25

Hi there,

Here is the latest version of the RLV, with a fixes to several bugs that have been annoying me for some time, and I'm sure they've been annoying you too !

Here is the quick list of changes, I will detail them below :

- Force a rebake whenever we change attachments and wearables.
- Don't let the avatar go into T-Pose while editing an attachment we've been wearing only for a couple seconds.
- When in Mouselook, don't show rigged attachments that are worn on any head attach points (before this fix, unrigged objects worn on the head would not show but rigged ones would, making us see our own teeth, tongue and nose).
- Optimize the rendering of the vision restriction spheres.
- Remove the artificial fartouch restriction when our vision is restricted, because there are cases where we might want to be able to touch something beyond our visual range.
- Include Kokua's RLV windows.



You can grab the Windows version here :
http://www.erestraints.com/realrestraint/


The MD5 hash for the Windows executable is :
728bd5758eb1c318ae9179b023a29810


The rest of this post is details about the changes, if you feel like reading a wall of text.


Force a rebake on outfit change

The first bug is the worst. This bug would sometimes (emphasis on "sometimes", making it particularly hard to track) make your outfit a mess when relogging, with attachments being worn again while you remember having detached them in the previous session, and attachments missing (including locked ones) while you were sure you were wearing them before logging off.
I'm not entirely sure if this bug is my own doing or not. The RLV has a lot of my code in the appearance manager to speed it up and make it easier to use, especially with scripts (obviously) and one of my changes might have provoked this bug. Or not, I have no idea at all. The fix itself does not fix the bug but sets things straight after changing your outfit, by calling a "rebake textures", which also re-synchronizes your "Current Outfit Folder" (aka "COF") with what you see on your screen.

For example, before this fix, wearing shoes then detaching them immediately, without giving enough time to the viewer to update its COF (compounded by possible lag due to your connection), would sure make your avatar wear the shoes again at the next relog, whether it happens immediately or hours later. This was because when detaching the shoes, the version of the COF containing the link to the shoes hadn't had time to arrive to the viewer from the sim when the shoes were already detached. So when the message finally arrived, it would contain the link to the shoes, effectively "programming" the viewer to reattach them next time it had to synchronize its COF.

When you rebake the textures, and now whenever your outfit changes, the links in the COF are checked against what you are wearing in-world. Doubles are removed, links that point to attachments that are not there are removed, and links are added for attachments that are worn but not in the COF.



Don't go in T-Pose while editing

The second fix is for another bug that this time I'm sure is my doing. Except that this is not really a bug. It is a fix for a fix, more like.

That fix ensures that whenever the outfit changes on an avatar nearby, your own included, the skeleton of that avatar is reset so there is no odd deformation. These deformations would occur when wearing attachments that trigger Bento animations with bone displacement.

I'm not a fan of the fix itself, but it does the job so it's ok for now. However, there is something I do often, which is wearing an attachment and immediately editing it. Problem is, the new version of the COF is received by the viewer while I'm already editing the attachment, hence the skeleton is reset... and that puts the avatar in a T-Pose, very high above the ground. If I'm trying to position the attachment at that moment, it may disrupt the positioning and I have to do it again. Annoying.

So this second fix will prevent the viewer from resetting the skeleton while you are editing an attachment of yours.



Don't show rigged attachments in Mouselook

The third fix is something I've been meaning to do for a while. When you are in Mouselook, normally all the attachments you are wearing on your head attach points (skull, chin, ears, nose etc) are not rendered so you can see through your glasses, blindfold or whatever might get in the way.

Problem is, rigged attachments such as a mesh head, which usually comes with tongue and teeth, as well as rigged mesh hair, are still rendered and may very well get in the way.

This fix ensures that none of your rigged or unrigged attachments worn on any head attach point will be rendered while in Mouselook. If you are in Mouselook and want to see one particular rigged attachment that is now hidden, such as your rigged hair for instance, simply wear it on another attach point that is not one of the head, such as chest or spine. It doesn't matter where a rigged attachment is worn, it always looks the same.

Likewise, if you still get some rigged attachments in the way like your mesh head, this would be because it is not worn on the head. Wear it on nose, chin, skull, ear or any other head attach point to make it be invisible while in mouselook.

I might make it an option later if this feature is too bothersome.



Optimize the vision spheres

It has been an annoyance for a while : vision spheres (the spheres that are rendered to block your view when your vision is restricted) slow the viewer down when you are in a crowd.

To be more precise, when you are in a crowd and all the avatars around are rendered as silhouettes. This is due to having 40 alpha-blended spheres stacked upon each other, and the silhouettes being sprites. Graphics cards do not like this at all.

The fix to this issue is multiple. First, avatars and silhouettes are no longer rendered if they are further than the outer sphere and the latter is opaque. In other words, if you are blindfolded without any way to see through the spheres (with RR blindfolds, that means medium, thick and opaque locks, the others let you see through a little bit), then you should notice a speedup.

Second, displaying 40 spheres is good when you want to simulate fog, but most of the time you are just blindfolded, so you don't really need to see so many spheres. Now, the viewer will display 4 spheres for every 10 cm between the inner and the outer sphere, maxed out at 40. This should speed up the rendering as well.



Remove the artificial @fartouch restriction

When your vision was restricted, the RLV used to impose an artificial @fartouch restriction that prevented you from touching any object further than your vision range... But I don't think that kind of artificial restriction is needed, if you need to be prevented from touching further than your vision range, then there is a good chance the script that restricts you imposes the touch restriction anyway. And there are cases where you may want to touch beyond your vision range so this automatic restriction is lifted.



Include Kokua's RLV windows

With the permission of Chorazin Allen and Nicky Perian, this version of the RLV now includes Kokua's RLV windows (debug, console, status and worn status) that look a lot better than the original "List restrictions" action that simply shows all the current RLV restrictions on your private chat. That feature is still there in the RLV menu, but you now have more tools to control what restrictions you are under. You can find these additions in the RLV menu in your top menu bar. Thanks Chorazin and Nicky !

Here is how they look, you can see how much control you have with them :


You will find all the information you need about those windows on the Kokua blog :

http://blog.kokuaviewer.org/2018/12/08/new-rlv-information-windows/



Have fun !

Marine