secondlife / jira-archive

2 stars 0 forks source link

[BUG-234690] LSL Feature - PRIM_TEXTURE_ANIM, flag for llSetLinkPrimitiveParamsFast() #11573

Open sl-service-account opened 9 months ago

sl-service-account commented 9 months ago

How would you like the feature to work?

Currently, we don't have any control over the different channel layers when it comes to both the existing spec/gloss or the new material layers for metallic, emissive, and normal channels. The existing behavior of llSetLinkTextureAnim() works great for animating sprite sheets but lacks the ability to animate the different channels independently. If you want to do this, you need to run a timer with llsetlinkprimitiveparamsfast to update the texture offsets for each cell of animation on your sprite sheet. This also requires a lot of complicated math to set the offsets for each cell of animation.

Introducing a flag for llSetLinkPrimitiveParamsFast() will allow us not only to set the textures/material properties of the object but also to start or stop an animation on multiple surfaces and channel layers as needed.

Material channels:

Integer CHANNEL_ALL - Applies the animation to all channels. Integer CHANNEL_BLINN_PHONG - Applies the animation to all of and only to Blinn-Phong channels. Integer CHANNEL_PBR - Applies the animation to all of and only to PBR material channels. Integer CHANNEL_DIFFUSE - Applies the animation to only the Blinn-Phong diffuse channel. Integer CHANNEL_NORMAL - Applies the animation to only the Blinn-Phong normal channel. Integer CHANNEL_SPECULAR - Applies the animation to only the Blinn-Phong specular channel. Integer CHANNEL_GLTF_DIFFUSE - Applies the animation to only the PBR material diffuse base color channel. Integer CHANNEL_GLTF_METALLIC - Applies the animation to only the PBR material metallic roughness channel. Integer CHANNEL_GLTF_EMISSIVE - Applies the animation to only the PBR material emissive channel. Integer CHANNEL_GLTF_NORMAL - Applies the animation to only the PBR material normal channel.

the ability to combine them as well much like how mode works would also be good. where you can define material channels, "CHANNEL_GLTF_NORMAL | CHANNEL_GLTF_METALLIC | CHANNEL_NORMAL | CHANNEL_SPECULAR ".

This would apply the animation to all but the defuse and emission layers,

How the function might look:

llSetLinkPrimitiveParamsFast(link_number, [PRIM_TEXTURE_ANIM, integer mode, integer face, integer size_x, integer size_y, float start, float length, float rate, integer material_channel]);

Why is this feature important to you? How would it benefit the community?

This would allow more control over how our animated materials look for things like water, morphing materials. Hot spots on metal. There are a vast number of use cases for this level of control over animated materials and this will also significently reduce the amount of overhead needed for animated textures.

Original Jira Fields | Field | Value | | ------------- | ------------- | | Issue | BUG-234690 | | Summary | LSL Feature - PRIM_TEXTURE_ANIM, flag for llSetLinkPrimitiveParamsFast() | | Type | New Feature Request | | Priority | Unset | | Status | Accepted | | Resolution | Accepted | | Reporter | dantia Gothly (dantia.gothly) | | Created at | 2023-11-18T16:25:08Z | | Updated at | 2023-11-29T18:59:40Z | ``` { 'Build Id': 'unset', 'Business Unit': ['Platform'], 'Date of First Response': '2023-11-18T10:53:55.604-0600', 'How would you like the feature to work?': "Currently, we don't have any control over the different channel layers when it comes to both the existing spec/gloss or the new material layers for metallic, emissive, and normal channels. The existing behavior of llSetLinkTextureAnim() works great for animating sprite sheets but lacks the ability to animate the different channels independently. If you want to do this, you need to run a timer with llsetlinkprimitiveparamsfast to update the texture offsets for each cell of animation on your sprite sheet. This also requires a lot of complicated math to set the offsets for each cell of animation.\r\n\r\nIntroducing a flag for llSetLinkPrimitiveParamsFast() will allow us not only to set the textures/material properties of the object but also to start or stop an animation on multiple surfaces and channel layers as needed.\r\n\r\nMaterial channels:\r\n\r\nInteger CHANNEL_ALL - Applies the animation to all channels.\r\nInteger CHANNEL_DIFFUSE - Applies the animation to only the Blinn-Phong diffuse channel.\r\nInteger CHANNEL_NORMAL - Applies the animation to only the Blinn-Phong normal channel.\r\nInteger CHANNEL_SPECULAR - Applies the animation to only the Blinn-Phong specular channel.\r\nInteger CHANNEL_GLTF_DIFFUSE - Applies the animation to only the PBR material diffuse base color channel.\r\nInteger CHANNEL_GLTF_METALLIC - Applies the animation to only the PBR material metallic roughness channel.\r\nInteger CHANNEL_GLTF_EMISSIVE - Applies the animation to only the PBR material emissive channel.\r\nInteger CHANNEL_GLTF_NORMAL - Applies the animation to only the PBR material normal channel.\r\n\r\nHow the function might look:\r\n\r\nllSetLinkPrimitiveParamsFast(link_number, [PRIM_TEXTURE_ANIM, integer mode, integer face, integer size_x, integer size_y, float start, float length, float rate, integer material_channel]);", 'ReOpened Count': 0.0, 'Severity': 'Unset', 'Target Viewer Version': 'viewer-development', 'Why is this feature important to you? How would it benefit the community?': 'This would allow more control over how our animated materials look for things like water, morphing materials. Hot spots on metal. There are a vast number of use cases for this level of control over animated materials and this will also significently reduce the amount of overhead needed for animated textures. ', } ```
sl-service-account commented 9 months ago

nagachief.darkstone commented at 2023-11-18T16:53:56Z

This would allow for much more complex effects without the need to hammer the simulator with parameter updates. It would certainly make for a nice stopgap between the implementation of glTF scenes, which would allow for multi-UV effects, in theory.

sl-service-account commented 9 months ago

Spidey Linden commented at 2023-11-29T18:59:37Z

Issue accepted. We have no estimate when it may be implemented. Please see future release notes for this fix.