Jump to content

Texture Repeats and Mesh Faces


Wandering Soulstar
 Share

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

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

Recommended Posts

Hi All,

I have a question that I hope someone can help me out with. I am going to be creating an item, in-world with prims, that I'll then turn to mesh using MeshStudio. Before you jump in with 'You should use Blender', I do realise this, but for now I have not had the time to sit down and learn how this works, so please .. just the question at hand 🙂

The following scenario is an extremely simplified version, but hopefully explains where my question is:

  • Two prims, joined together.
  • On one of the faces (call it ID Face) I'll assign a texture where the top third of the texture has an Y in the middle, the middle an N, and the bottom third is blank
  • I'll set the repeat to 0.3333 vertical, and set the offset so that the Y half is showing
  • Then will create the DAE with MeshStudio, upload and apply the textures

Now my question: I'd like to be able to 'toggle' the ID face between the Y, X, and Blank. Can I do this by changing the offset of the face? Would I need to change anything else (repeats for example)?

I could test this in-world, but due to RL it looks to be some days before I can get in, and would like to continue forward with my scripting project in the interim. The answer here makes a major difference to how my project is designed and coded.

Thanks in advance!!
Wanda

Link to comment
Share on other sites

Hi Wanda,

Mesh studio exports the same UV parameters (texture layout) as the inworld mesh. So having adjusted the settings to get the right positioning on the prim version you will be able to apply the same parameters to the imported Mesh and see the same results. This means that using a script you will be able to adjust the parameters to display the correct 1/3 of the image offset should be enough. This is a good design choice as it it reduces the number of textures that the viewer has to hold. 

  • Thanks 2
Link to comment
Share on other sites

3 hours ago, Beq Janus said:

Mesh studio exports the same UV parameters (texture layout) as the inworld mesh.

That's right but there is one thing to keep in mind: it only works with regular UV mapping, not with planar. Planar mapping is client side so MeshStudio and other lsl based converters don't have access t that data so they can't incorporate it into the mesh they generate.

Link to comment
Share on other sites

35 minutes ago, ChinRey said:

That's right but there is one thing to keep in mind: it only works with regular UV mapping, not with planar. Planar mapping is client side so MeshStudio and other lsl based converters don't have access t that data so they can't incorporate it into the mesh they generate.

I'm not quite sure what you are saying @chinrey . it may have once been true (which would explain what I consider an oversight in the MS export), but you can read the texture mode from a face in lsl and you can quite happily use planar mapping in a mesh export from Mesh Studio. The only thing that you have to be careful about is to ensure that they texture/colour pair for a planar face is distinct from a non-planar mapped face that notionally would use the same if you wish to be able to adjust them independently. This is because the Mesh Studio script does not use the mapping type information when interpreting the pairs (perhaps alluding to times when the information was not available to scripts?) . I have a script that can force such items to be unique by munging the diffuse colour prior to mesh generation (though in the following example I just did it by hand!). 

I think I am probably misunderstanding what you are saying but here's what I just tested. 

  1. Simple old cube
  2. Select a face, set it to planar, fiddle about with the repeats etc
  3. Mesh it

9bf51f4c4f3488bbcc64e24ea576402d.png

The result is a mesh that has a UV layout conformant to the inworld layout but constrained to a single material. Adjusting the parameters messes with all the faces of the cube.

56426fb15a4fe10ec6888692fe567118.png

If instead we make MS believe that the planar face is separate material, but munging the diffuse colour for example. Then we create a mesh with two faces. 

When we rez the second cube inworld and set the planar face to be planar and apply the same settings as the cube it appears the same as the original prim model, we can also adjust it independently to the default, which is important if we happen to be to tiling a texture of course. (right is the two material version, left is 1 material version) 

a405537b61919dd03ffaa1faf1a27e7a.gif

 

 

  • Like 2
  • Thanks 1
Link to comment
Share on other sites

@Beq Janus

In regards to what you have shown above .. I too was under the impression that MS would not 'work' with texture faces that were planar .. that these would not transfer when we meshed things .. this was something specific in the MS documentation back when I started using it years ago .. and I have stayed away from planar ever since .. painstakingly aligning textures with texture align patterns rather than the simple function provided in the build tool using planar ...

So what you are say is that now I can use planar, and MS will create the resultant mesh in accordance to this so that when I upload all I have to do is set the texture to the face and nothing else?

  • Like 1
Link to comment
Share on other sites

3 hours ago, Wandering Soulstar said:

In regards to what you have shown above .. I too was under the impression that MS would not 'work' with texture faces that were planar .. that these would not transfer when we meshed things

Yes, that was quite a surprise and a nice one too. I was told there was no solution to the problem but TBB must have found one and implemented it silently.

 

3 hours ago, Wandering Soulstar said:

So what you are say is that now I can use planar, and MS will create the resultant mesh in accordance to this so that when I upload all I have to do is set the texture to the face and nothing else?

This is a job for ... THE BETA GRID!

Try yourself and see if it works. :)

Edited by ChinRey
  • Like 1
Link to comment
Share on other sites

7 hours ago, ChinRey said:

Yes, that was quite a surprise and a nice one too. I was told there was no solution to the problem but TBB must have found one and implemented it silently.

Glad to have been the bearer of glad tidings 🙂It's possible that TBB fixed something but it would have been back in the day for sure as It has certainly worked since version 1.3 or whatever the previous version was before we got 2.0. My guess is that TBB probably had it right in the first place but that the llGetObjectDetails() call was giving bogus info. The subsequently got fixed on the backend such that planar faces at least return correct parameters and lo and behold we have a workable solution. 

11 hours ago, Wandering Soulstar said:

So what you are say is that now I can use planar, and MS will create the resultant mesh in accordance to this so that when I upload all I have to do is set the texture to the face and nothing else?

As @chinrey says the beta holds the answers to your questions, but yeah.... I wrote a blog a couple of years back demonstrating a use case.  http://beqsother.blogspot.com/2016/08/mixing-planar-and-non-planar-faces-in.html

I do have a script kicking around in my inventory that basically walks through a linkset and builds a library of all the colour/texture pairs alongside the scalar/default setting. If it finds one that is both then it tweaks the colour of the planar face (adding a small value to the red channel I think) and compares again, continuing until it no longer has a clash. This ensures distinct materials are generated by MS. Drop me an IM inworld if you fancy a copy.

 

 

  • Thanks 1
Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 1922 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...