Cool VL Viewer forum

View unanswered posts | View active topics It is currently 2024-03-28 23:08:16



Reply to topic  [ 7 posts ] 
Can't remove Normalmap & Specularmaps via LSL 
Author Message

Joined: 2015-09-18 22:54:04
Posts: 3
Reply with quote
Log file: http://pastebin.com/1WJmypEc

LSL scripts can set normal and specular maps fine, but setting NULL_KEY does not remove the normal/specular map and revert to the "grey x" in the build editor. You will see the normal/specular maps persist until a relog. This does not happen on the official client where setting to NULL_KEY removes the normal or specuar maps.

Reproduce:
1.) Manually set a normalmap and/or specular map to a prim.
2.) Run the following LSL code on the prim:
Code:
default
{
   state_entry()
   {
      llSetLinkPrimitiveParamsFast(LINK_SET, [PRIM_NORMAL, ALL_SIDES, NULL_KEY, <1,1,0>, <0,0,0>, 0.0]);
      llSetLinkPrimitiveParamsFast(LINK_SET, [PRIM_SPECULAR, ALL_SIDES, NULL_KEY, <1,1,0>, <0,0,0>, 0.0, <1,1,1>, 51, 0]);
   }
}

3.) Observe normalmap and specularmap don't vanish.
4.) Relog
5.) Observe normalmap and specularmap are now properly gone.

About CoolVL information:

Cool VL Viewer 1.26.14 (6) Sep 12 2015 10:25:41 (Cool VL Viewer)
RestrainedLove viewer v2.09.11.21
Release Notes

You are at 252322.3, 256402.6, 1998.0 in Bay City - Brewster located at sim10177.agni.lindenlab.com (216.82.49.43:13003)
Second Life RC Magnum 15.09.14.305056
Release Notes: Retrieving...

CPU: Intel(R) Core(TM) i7-5820K CPU @ 3.30GHz (3299.97 MHz)
Memory: 16212 MB
OS version: Microsoft Windows 8.1 64-bit (Build 9600)
Memory manager: OS native
Graphics card vendor: NVIDIA Corporation
Graphics card: GeForce GTX 970/PCIe/SSE2
Windows graphics driver version: 10.18.0013.5582
OpenGL version: 4.5.0 NVIDIA 355.82

J2C decoder: KDU
Audio driver: FMOD Ex 4.44.56
Networking backend: libcurl/7.38.0 OpenSSL/1.0.1h zlib/1.2.8
Embedded browser: Qt Webkit v4.7.1 (version number hard-coded)
Packets lost: 0/922 (0.0%)

Built with MSVC version 1600

Compile flags used for this build:
/O2 /Oi /MD /MP /DNDEBUG /D_SECURE_SCL=0 /D_HAS_ITERATOR_DEBUGGING=0 /DWIN32 /D_WINDOWS /W3 /GR /EHsc /Oy- /GS /arch:SSE2 /fp:fast /TP /W2 /Zc:forScope /Zc:wchar_t- /c /nologo /DLL_WINDOWS=1 /DUNICODE /D_UNICODE /DWINVER=0x0501 /D_WIN32_WINNT=0x0501 /DLL_PRIVATE_MEMORY_POOLS=1 /DLL_VB_MEM_POOL=1 /DLL_VOLUME_MEM_POOL=1 /DCARES_STATICLIB /DLIB_NDOF=1


2015-09-18 23:09:58
Profile

Joined: 2009-03-17 18:42:51
Posts: 5523
Reply with quote
This is kind of a catch 22 situation: the reason why the materials *removal* is not rendered in real time is because of fixes (that went into LL's viewer-lion and were backported to the Cool VL Viewer but that did not yet made their way to LL's viewer-release). If I revert those bug fixes, the old bugs will creep back up...

Now, the question is: is there any practical use case for wanting to *remove* materials from prims via LSL and having the said prims immediately reflecting it (note that you do not need to relog: de-rezzing the object and re-rezzing it would do, just like TPing away and back in after a couple of minutes) ?...


2015-09-19 10:15:21
Profile WWW

Joined: 2015-09-18 22:54:04
Posts: 3
Reply with quote
Henri Beauchamp wrote:
Now, the question is: is there any practical use case for wanting to *remove* materials from prims via LSL and having the said prims immediately reflecting it (note that you do not need to relog: de-rezzing the object and re-rezzing it would do, just like TPing away and back in after a couple of minutes) ?...

This will be a problem for scripted content that changes material. Diffuse, normal, and specular textures are most often intended to be displayed as a full set. If you have an item that is intended to be customized by displaying different materials - here's an example in the wild - it won't be able to remove the normal map for diffuse maps that don't have a normal/spec and will use the previous texture's normal/spec. The only workaround is to have two different attachments and swap alpha between them to simulate removing the material.

It is particularly annoying to have to relog to fix attachments. (I have found that detatching and re-attaching things does NOT fix them, but I could try again.)

After making this post I have also realized that the alpha mode is effected by this problem as well, and you don't need LSL for it. If you change a texture's alpha mode to Alpha Masking, you can't set it back to Alpha blending - or at least you can, but it looks like you can't. After a relog you'll see it back to being set to blending.

If I understand you correctly, this will work itself out with time if we wait on LL? I wouldn't consider it high priority (especially because I'm the only one complaining about it) but it is all pretty annoying when building.

What bugs would reappear if fixed?


2015-09-19 17:56:27
Profile

Joined: 2009-03-17 18:42:51
Posts: 5523
Reply with quote
Adeon Writer wrote:
What bugs would reappear if fixed?
Follow the link I gave in my above message... I don't think I'll even bother, sorry. Materials is just a gadget feature as far as I am concerned and I don't use at all the "advanced lighting model" (which, in excess of badly impacting the frame rate, makes everything look ugly, with blur, desaturated colours and an overall gloomy lighting, especially inside buildings) so I won't investigate this mere glitch myself; I got more important things to do, including things related with the viewer development, and I'd rather wait for LL to find the issue and fix it...


2015-09-19 19:09:57
Profile WWW

Joined: 2015-09-18 22:54:04
Posts: 3
Reply with quote
Understood. Thanks for speedy responses!


2015-09-19 23:37:22
Profile

Joined: 2009-03-17 18:42:51
Posts: 5523
Reply with quote
The bug apparently made its way to LL's release viewer. See BUG-10459.

I'm experimenting a work around found by Ansariel Hiller (for Firestorm): if it works, it will be adopted for the next Cool VL Viewer releases.


2015-10-16 19:40:31
Profile WWW

Joined: 2009-03-17 18:42:51
Posts: 5523
Reply with quote
Firestorm's "fix" adopted for today's releases, till LL finds a proper fix to this issue.


2015-10-17 10:11:09
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 7 posts ] 

Who is online

Users browsing this forum: No registered users and 29 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group
Designed by ST Software.