secondlife / jira-archive

2 stars 0 forks source link

[BUG-8601] Normal and Specular Repeats are ignored, when using Texture Animation. #16195

Open sl-service-account opened 9 years ago

sl-service-account commented 9 years ago

Steps to Reproduce

To reproduce this bug you will need the repro object named ‘Normal and Specular Repeats are ignored BUG-8601’ if you require a copy of this please contact me.

After rezzing the repro object you will see the following text, you can also see the image, Reproduction of BUG-8601 part 1.

Please inspect the Horizontal scale and Vertical scale of the normal and specular textures, on the seats. Take note of how the material looks (nice clean, highly detailed leather). This effect is produced by taking advantage of the texture repeat options, using a normal and specular texture that is only 256x256 pixels, its very small, efficient and uses very little texture memory. Please click this object to continue.

After clicking the object you will see the following text. See image reproduction of BUG-8601 part 2 and reproduction of BUG-8601 part 3.

The texture animations have been applied to the rear tail lights (you will need to look at the rear of the repro object in order to see the animated features). But now, notice that the materials (normal and specular) textures have been switched to a 'visual' repeat value of <1.0,1.0,0.0> when they are actually set to <12.0,12.0,0.0> and should be displayed visually with there correct repeats. You will also find that you are able to manually change the normal and specular repeats, but again, visually there is no change, but this only happens while the texture animation is running. Please click this object again to have the texture animations turned off and observe the results.

After clicking the object for the final time you will see the following text.

You will now notice, that the texture animations have been turned off, and the materials (normal and specular) texture repeats have gone back to displaying correctly, on the seats.

Actual Behavior

When using llSetLinkTextureAnim or llSetTextureAnim on a single face (both mesh and prims are effected) we lose the ability to change the repeats value for the normal and specular maps.

Expected Behavior

I would expect the normal and specular 'repeats' to behave the same as the defuse texture repeats, while using a texture animation on a different single face.

Please note; that the texture animation is on one face, while the materials are on another.

Other information

I was creating an amazing seating item, that requires the ability to use texture animations while also having the ability to use materials efficiently, by using the repeat texture feature.

Attachments

Links

Duplicates

Original Jira Fields | Field | Value | | ------------- | ------------- | | Issue | BUG-8601 | | Summary | Normal and Specular Repeats are ignored, when using Texture Animation. | | Type | Bug | | Priority | Unset | | Status | Accepted | | Resolution | Accepted | | Reporter | Grid Strom (grid.strom) | | Created at | 2015-02-24T22:37:50Z | | Updated at | 2020-10-23T09:08:56Z | ``` { 'Business Unit': ['Platform'], 'Date of First Response': '2015-02-25T01:23:17.780-0600', "Is there anything you'd like to add?": 'Here is some simple code that you use to reproduce this bug, simply make a prim, make a new script and paste this within state_entry(). \r\n\r\nllSetLinkTextureAnim(LINK_THIS, ANIM_ON | LOOP, 2, 4, 4, 0, 16, 15.0);\r\n llSetLinkPrimitiveParamsFast(LINK_THIS,[PRIM_SPECULAR,0,"13b2d3c5-b6d6-98f3-33b4-5a04382c633c",<2,2.0,0.0>,<0.0,0.0,0.0>,0.0,<1.0,1.0,1.0>,51,0,PRIM_NORMAL,0,"39a0f2ea-9f85-40c2-b733-8e4c0cacfde6",<2.0,2.0,0.0>,<0.0,0.0,0.0>,0.0]);\r\n\r\nYou will notice that if you change the material repeats value, from ether the script or by manually editing, visually there is no change.', 'Severity': 'Unset', 'System': 'SL Viewer', 'Target Viewer Version': 'viewer-development', 'What just happened?': 'When using llSetLinkTextureAnim or llSetTextureAnim on a single face (both mesh and prims are effected) we lose the ability to change the repeats value for the normal and specular maps.', 'What were you doing when it happened?': 'I was creating an amazing seating item, that requires the ability to use texture animations while also having the ability to use materials efficiently, by using the repeat texture feature.', 'What were you expecting to happen instead?': "I would expect the normal and specular 'repeats' to behave the same as the defuse texture repeats, while using a texture animation on a different single face.\r\n\r\nPlease note; that the texture animation is on one face, while the materials are on another.", } ```
sl-service-account commented 9 years ago

Lucia Nightfire commented at 2015-02-25T07:23:18Z

See https://jira.secondlife.com/browse/STORM-1909 & https://jira.secondlife.com/browse/BUG-6443

sl-service-account commented 9 years ago

Caleb Linden commented at 2015-02-26T19:17:24Z

Hi Grid,

Could you provide a screen shot of what it currently looks like? I tried to paste your script into a regular prim but I couldn't see the symptoms.

Thanks, Caleb

sl-service-account commented 9 years ago

Whirly Fizzle commented at 2015-02-26T20:41:28Z

I think this is maybe the same problem Lucia linked to at STORM-1909.

I'll give 2 example repros, one which fails and one which works.

}

* Add this script to Cube B

default { state_entry() {llSetTextureAnim(ANIM_ON | SMOOTH | LOOP , 1, 0, 0, 1.0, 1.0, 0.1); }

} {code}

Observed

sl-service-account commented 9 years ago

Grid Strom commented at 2015-02-26T22:18:40Z

Sorry but the above is not the same issue I am trying to bring to your attention. The bug I am trying to show you is this.

Faces that are not associated with the ‘animation face’ should be able to have there normal and specular repeats changed ‘independently’. Currently all the ‘other’ faces on the object have there ‘normal and specular’ repeats locked, even though they are completely, ‘unassociated faces’.

The only way to force the normal and specular repeats to change is to use the ‘Synchronize materials’ option in the build menu, however this will not work, if a creator requires the ability to set the ‘normal and specular repeats’ independent of the defuse texture on any objects that use texture animation.

Tip: The Advanced lighting Model, option should be enabled in your viewer, in order to see the material textures.

sl-service-account commented 9 years ago

Whirly Fizzle commented at 2015-02-26T22:55:08Z, updated at 2015-02-26T22:55:34Z

Aha! Okay I understand now I think.

Using an unscripted version of my repro cube from above, I can edit any face and set the normal & spec textures to have different repeats from the diffuse texture. http://i.imgur.com/pZVpl4I.jpg shows the left face using diffuse, normal & spec all set to horizonal/vertical scale of 3 and the right face using diffuse set to horizonal/vertical scale of 3 and normal/spec set to horizonal/vertical scale of 1.

Repeating the above on the scripted version of the cube, the left face is animating and on the right face I set diffuse to horizonal/vertical scale of 3 and normal/spec set to horizonal/vertical scale of 1. http://i.imgur.com/e2a6oO9.jpg The normal & spec repeats on the right face, though set to 1 in build tools still visually display as if they are set to 3.

Am I understanding correctly?

sl-service-account commented 9 years ago

Grid Strom commented at 2015-02-26T23:15:07Z, updated at 2015-02-27T01:02:25Z

Yes, you understand :)

Also I just want to point out for Caleb Linden that the script i have provided, is only provided to help create the 'repro' object, this issue is not a scripting bug it is a Content Creation bug, sorry.

sl-service-account commented 9 years ago

Grid Strom commented at 2015-02-27T04:31:31Z

I have created an easier to understand repro object, that I have handed to Caleb linden.

This new repro object is not only provided to help people visualize this bug, but it’s also to provide a more logical example of why this bug needs attention and how it ties in with second life’s ‘Good Building Practices’, that gives people the knowledge to create more efficient builds.

This repro object also comes with a very detailed step by step ‘chat guide’, that explains what is happening each step of the way. I know that this bug is very hard to communicate, but it’s important and this is why I have gone the extra mile to bring it to your attention.

sl-service-account commented 9 years ago

Grid Strom commented at 2015-02-28T22:43:52Z

I have updated the steps to reproduce this bug. I also created a new repro object and added updated screenshots.