Jump to content

Changing Default and Planar Texturing


Pamela Galli
 Share

You are about to reply to a thread that has been inactive for 2578 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

I doubt this is possible but then most of what I learn scripting can do, I would have thought impossible.

Some of my houses are part mesh, meaning the walls and sometimes floors are regular prim. With mesh I use default texturing, with regular prims sometimes planar, so I can align textures. The problem is that if you scale a house that uses planar and default texturing, one or the other will be messed up, depending on whether Stretch Textures is checked or not.

Is there a way to use a script to scale a house and preserve texture repeats as they are? 

Link to comment
Share on other sites

In planar texture mapping mode, the units are texture repeats per half meter. You could use llGetTextureScale to get what the current texture scale is for each relevant face, and then, when scaling your house (object) use some math to modify them by the object scale factor. This is already complicated, but it will get more complicated when used in an object where some faces are default and some are planar. Even after that, you may have some offset(s) issues where edges and corners meet that I don't think scripting can fix. We seriously need llEyeballTextureAlignment().

  • Like 3
Link to comment
Share on other sites

In theory, yes, which means that I think it can be done but I have never tried it -- or had a reason to try it.  It should be possible to use llGetLinkPrimitiveParams to grab PRIM_TEXTURE and PRIM_TEXGEN on each face of each link in the house, save them in a massive list, and then reapply them later.  It would be a gutsy thing to try the first time and, given the quirkiness of LSL and the Lab servers, not a move that I have great confidence in right now.  If there's a magic wand, though, that's what it looks like, Pam.

EDIT:  I see that Ivanova gave roughly the same answer while I was typing my typical slow, two-fingered response. Given the amount of experimentation necessary to get  it right and be confident that it would stay right, my feeling is that you could do the same job faster and less expensively by hand.

Edited by Rolig Loon
  • Like 3
Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 2578 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...