Cool VL Viewer forum
http://sldev.free.fr/forum/

camdraw spheres and ALM
http://sldev.free.fr/forum/viewtopic.php?f=4&t=2338
Page 1 of 1

Author:  Lycia_Undercroft [ 2023-01-28 04:36:01 ]
Post subject:  camdraw spheres and ALM

Hi Henri,

I was playing with camdraw restrictions lately and there was an ALM interaction that surprised me.

The camdraw spheres seem to be interacting with more than just the diffuse texture layers.
With camdraw on, it looks like the spheres and surroundings have a high specular/environment setting, and you don't see this behavior with ALM off.
When switching ALM on and ALM off with camdraw active, you can quickly see the difference.

I have included some code you can just drop in a prim so you can see the settings I used, toggle them on and off, and see if this reproduces itself for you.

I am not sure if this is expected behavior or not, since I have never used anything but solid black before, but it seemed worthy of mention.

Thanks!
~Lycia

Code:
integer toggle = FALSE;

show_spheres()
{
    string restrictions;
   
    restrictions  = "@camdrawmin:3.0=n";
    restrictions += ",camdrawmax:10.0=n";
    restrictions += ",camdrawalphamin:0.1=n";
    restrictions += ",camdrawalphamax:0.9=n"; 
    restrictions += ",camdrawcolor:1.0;0.6;1.0=n";
   
    llOwnerSay(restrictions);
}

cleanup()
{
    llOwnerSay("@clear");
}

default
{
    state_entry()
    {
        cleanup();
    }

    touch_start(integer total_number)
    {
        if (llDetectedKey(0) == llGetOwner()) {
            toggle = !toggle;
            if (toggle) show_spheres();
            else cleanup();
        }
    }
}


Author:  Henri Beauchamp [ 2023-01-30 12:57:23 ]
Post subject:  Re: camdraw spheres and ALM

Well, it does render differently, but I am not sure what would be the "right" way to render it... Only marine could tell, I guess... There is also this comment in her sources, for the line that decides whether to render avatars at all when draw limit distance spheres are rendered:
Code:
      // If the avatar is farther than the "camavdist" distance, render as silhouette.
      // But if the outer sphere is opaque, no need to render a silhouette or even the avatar at all.
Which means the processing is indeed different wether the outer sphere is fully opaque (avatars not rendered at all beyond the outer sphere) or not (avatars rendered as impostors, and thus, still visible)...

I could change the logic to skip avatar rendering at all for lower alpha values (the cut off is currently set at an alpha of 0.999, under which avatars keeps being rendered as impostors), but I am not sure what is the "right thing" to do.


EDIT: in fact, I think there was a misinterpretation as to what Marine means by "silhouette": I now think she is meaning "jelly doll", while I originally interpreted it as "impostor", and the latter is still recognizable an avatar, unlike the former. For next release, all avatars beyond the outer sphere (whatever its opacity) will be rendered as jelly dolls by the Cool VL Viewer.

EDIT2: there was another issue, because of the performance viewer changes: I moved a sphere drawing in the bad place (because the pre-perf viewer code where it use to be vanished), for when ALM is on, and this resulted in the rendering discrepancies with ALM off for non-opaque outer sphere... I now use the same trick as in Marine's latest viewer release, and it repaired the ALM rendering of spheres...

EDIT3: definitely bugs... I also fixed avatars not properly getting turned into jelly dolls via @camavdist, and not properly disappearing behind the outer sphere with ALM off and legacy avatar body. The fixes will be part of next release.

Author:  Lycia_Undercroft [ 2023-02-06 03:19:46 ]
Post subject:  Re: camdraw spheres and ALM

Awesome, I tried it out and it looks good! I was not sure this would be fixable with all the changes ALM has introduced.

Thanks Henri!
~Lycia

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/