tag:blogger.com,1999:blog-291069787086607412.post4924052022510066975..comments2018-12-02T04:28:14.910-08:00Comments on Antony Fairport: Texture hollow scriptAntony Fairporthttp://www.blogger.com/profile/03167109071277093747noreply@blogger.comBlogger11125tag:blogger.com,1999:blog-291069787086607412.post-47917649346011105492014-03-12T13:37:42.800-07:002014-03-12T13:37:42.800-07:00I'll have to try next week. Let's hope Nyx...I'll have to try next week. Let's hope Nyx will have the information by then.Mona Eberhardthttps://www.blogger.com/profile/08211176452617463387noreply@blogger.comtag:blogger.com,1999:blog-291069787086607412.post-8301470421561550302014-03-09T13:02:24.526-07:002014-03-09T13:02:24.526-07:00I'd be interested to hear what you find out.
...I'd be interested to hear what you find out.<br /><br />I've updated the script so that it at least does something cylinders as well as cubes now.Antony Fairporthttps://www.blogger.com/profile/03167109071277093747noreply@blogger.comtag:blogger.com,1999:blog-291069787086607412.post-73703260630250795772014-03-08T14:24:35.599-08:002014-03-08T14:24:35.599-08:00I'll poke Nyx again for the math to calculate ...I'll poke Nyx again for the math to calculate repeats in spheres and prisms. Official documentation here is very scarce, and I'm putting it very mildly.Mona Eberhardthttps://www.blogger.com/profile/08211176452617463387noreply@blogger.comtag:blogger.com,1999:blog-291069787086607412.post-76603031792216334382014-03-06T15:30:44.994-08:002014-03-06T15:30:44.994-08:00PRIM_TYPE_SPHERE doesn't look so good either. ...PRIM_TYPE_SPHERE doesn't look so good either. My guess at this point is that it's only really good, as quoted in the JIRA, for box and cylinder.Antony Fairporthttps://www.blogger.com/profile/03167109071277093747noreply@blogger.comtag:blogger.com,1999:blog-291069787086607412.post-27893489450116697402014-03-06T15:22:03.588-08:002014-03-06T15:22:03.588-08:00I forgot to mention: those calculations don't ...I forgot to mention: those calculations don't appear to work for PRIM_TYPE_PRISM.Antony Fairporthttps://www.blogger.com/profile/03167109071277093747noreply@blogger.comtag:blogger.com,1999:blog-291069787086607412.post-81985278570146536382014-03-06T15:17:33.762-08:002014-03-06T15:17:33.762-08:00Having a bit more of a play now. Here's a funn...Having a bit more of a play now. Here's a funny thing. I've been dabbling with building in SL since 2006, and have been avidly building since early 2010. And only tonight have I realised that the prism you can rez from the build floater (at least in Firestorm, I've not used the Lab viewer in such a long time) isn't PRIM_TYPE_PRISM.Antony Fairporthttps://www.blogger.com/profile/03167109071277093747noreply@blogger.comtag:blogger.com,1999:blog-291069787086607412.post-91846472206672320632014-03-06T14:20:02.700-08:002014-03-06T14:20:02.700-08:00That'd be great, Antony. Thank you.That'd be great, Antony. Thank you.Mona Eberhardthttps://www.blogger.com/profile/08211176452617463387noreply@blogger.comtag:blogger.com,1999:blog-291069787086607412.post-25361688461344016842014-03-05T15:59:24.981-08:002014-03-05T15:59:24.981-08:00I did try it briefly with a cylinder and another s...I did try it briefly with a cylinder and another shape that I can't recall now and it appeared to work okay (these were shapes where the hollow was really no different than if you'd hollowed a cube).<br /><br />I should probably tweak the script some more so that it works okay with other shapes.<br /><br />If you fancy trying it just comment out the test for "PRIM_TYPE_BOX".Antony Fairporthttps://www.blogger.com/profile/03167109071277093747noreply@blogger.comtag:blogger.com,1999:blog-291069787086607412.post-66914016110985009272014-03-05T12:53:30.266-08:002014-03-05T12:53:30.266-08:00Now, if only we had the math for texturing hollowe...Now, if only we had the math for texturing hollowed spheres, cylinders, rings, toruses and tubes...Mona Eberhardthttps://www.blogger.com/profile/08211176452617463387noreply@blogger.comtag:blogger.com,1999:blog-291069787086607412.post-87778916422983388972014-03-05T06:22:25.646-08:002014-03-05T06:22:25.646-08:00Yeah, I ran into the offset thing while writing it...Yeah, I ran into the offset thing while writing it, hence I set it to this:<br /><br />-( nOffset - (integer) nOffset )<br /><br />Ignoring the non-fractional part seems to work in every case I tried. (the negation is to get the texture flip, of course).Antony Fairporthttps://www.blogger.com/profile/03167109071277093747noreply@blogger.comtag:blogger.com,1999:blog-291069787086607412.post-74178820272502112682014-03-05T06:18:21.535-08:002014-03-05T06:18:21.535-08:00Hi Antony.
Thank you very much for writing this s...Hi Antony.<br /><br />Thank you very much for writing this script; it certainly saves performing those calculations by hand. However, I must point out one thing regarding the horizontal offset equation. There are cases where it ends up giving you an offset that's above 1.<br /><br />Let's take this simple example: We have a box, 40% hollow, and we want two texture repeats in the hollow part of it.<br /><br />According to the texture repeats equation I found in the JIRA, we need to enter 5 repeats. As for the offsets...<br /><br />The math is:<br /><br />Horizontal Offset = [ ( Desired Horizontal Repeats / Hollow ) - Desired Horizontal Repeats ] / 2<br /><br />So, it's:<br /><br />Horizontal Offset = [(2/0.4) - 2]/2 = 1.5<br /><br />This can be confusing and even off-putting to many builders. I figured out that 1.5 should be interpreted as 0.5. However, there's very little in the way of explanations in the documentation of the build tools w.r.t. texturing the hollowed-out part of a prim. Quite frankly, I happened upon that JIRA by sheer luck - I asked a question in one of Nyx Linden's meetings and someone had seen that JIRA and pointed me to it.<br /><br />What happens, though, when the prim in question is a cylinder? A ring? A torus? A sphere? A tube? I've yet to see any information that would help builders. That particular section of the official Second Life wiki could certainly use a lot of love, as the information in it dates back to the days of version 1.23 of the viewer.<br /><br />I'd really love to see documentation that would cover these other prim types as well - and, of course, this would enable you to write scripts for them as well.<br /><br />Once again, thanks for putting this script together.Mona Eberhardthttps://www.blogger.com/profile/08211176452617463387noreply@blogger.com