Jump to content

Scripting Info


Chellynne Bailey
 Share

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

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

Recommended Posts

7 hours ago, Jessicaann Wrigglesworth said:

Chellynne ... I dont know what you have but I would be very careful. Also please do try to make it to these meetings, I think it might be beneficial to all. Also I found a bug .. that well for me as a mesh creator is a show stopper, I will be posting a Jira tonight. 

What sorta bug?

  • Like 1
Link to comment
Share on other sites

8 hours ago, Jessicaann Wrigglesworth said:

Chellynne ... I dont know what you have but I would be very careful. Also please do try to make it to these meetings, I think it might be beneficial to all. Also I found a bug .. that well for me as a mesh creator is a show stopper, I will be posting a Jira tonight. 

Hi Jess,
I found a solution to the problem we were having with the shirt system clothing for Bakes On Mesh.  We can just use system tattoos for the Baked_Head, Baked_Upper and Baked_Lower.  They can even be tinted so using them for things like makeup layers will work fine.  I also tried system hair and it also worked fine for Bakes On Mesh. :)

I still like to find a solution so we can use all the system clothing for Bakes On Mesh that use custom UVs but at least the tattoo will work for now.

  • Like 1
Link to comment
Share on other sites

9 minutes ago, Cathy Foil said:

Hi Jess,
I found a solution to the problem we were having with the shirt system clothing for Bakes On Mesh.  We can just use system tattoos for the Baked_Head, Baked_Upper and Baked_Lower.  They can even be tinted so using them for things like makeup layers will work fine.  I also tried system hair and it also worked fine for Bakes On Mesh. :)

I still like to find a solution so we can use all the system clothing for Bakes On Mesh that use custom UVs but at least the tattoo will work for now.

Yeah, I don't think Bakes on Mesh is currently intended for non-SLUV meshes. I suppose it could by hijacked for that purpose, but it's not really a bug if it doesn't work. 

  • Confused 1
Link to comment
Share on other sites

Chellynne, recently in the last meeting they said you can use Bakes on Mesh for other Meshes ... so if that is going to be allowed (which it should for many reasons ) then they should fix this issue ... I am linking the report I made that also has videos of the issue.  https://jira.secondlife.com/browse/BUG-216054#comment-557118  

We found that if you use the Skirt system layer and Cathy found also works with tat layers, hair and I think eye layers ... if you move the sliders to 100, then you can use those layers to use Bakes on Mesh ... this will also help with any Alpha problems when baking down the other SLUVs textures...   I went and got your BOM test stuff today .. I think I have to wait until tomorrow for it to show up in my inventory so that I can use it. Because you have me totally lost in another direction as well.

Link to comment
Share on other sites

On 4/7/2018 at 2:13 AM, Chellynne Bailey said:

Yeah, I don't think Bakes on Mesh is currently intended for non-SLUV meshes. I suppose it could by hijacked for that purpose, but it's not really a bug if it doesn't work. 

Oh Bakes On Mesh works right now with non-SLUV meshes.  The textures you drop in the system tattoo file just has be made to match UV layout of the mesh you want it to go on.

The problem when trying to use a system clothing file for a non-SLUV texture is on the system shirt the hand area is always 100 alpha.  So if you try to use a system shirt for an non-SLUV texture there will be a big hole where the hand is showing the skin.

Since system tattoo files do not have any sliders there are is no alpha affecting them so the whole texture you use on them is visible.  It would be nice if LL adds more texture slots to the system tattoos.  Right now there are slots for the Head , Upper Body and Lower Body.  It would be nice to have slots for skirt, hair and eyes as well as slots for normal map and specular map.

Link to comment
Share on other sites

  • Lindens
9 hours ago, Cathy Foil said:

Right now there are slots for the Head , Upper Body and Lower Body.  It would be nice to have slots for skirt, hair and eyes as well as slots for normal map and specular map.

You know, I would have sworn that tattoos did have support for at least 5 texture slots. If you want to file a JIRA for this we can certainly take a look and see how feasible it would be.

Normal and specular maps are not so straightforward, as I'm sure you've heard before. Not so much adding the slots, as getting the baking service to handle them, and getting them to render on the system avatar.

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

  • Lindens
On 4/6/2018 at 4:29 PM, Chellynne Bailey said:

Hi folks! Has any scripting info been released? I have in my possession an object that CLEARLY uses bakes on mesh scripting, but damn if I can find the API anywhere...

We haven't specifically added any API for scripting yet. Do you have any thoughts on what you would want from one?

It seems like using llSetTexture() with the appropriate special UUIDs might work, but I don't think anyone has tried it yet.

 

  • Like 1
Link to comment
Share on other sites

4 hours ago, Vir Linden said:

We haven't specifically added any API for scripting yet. Do you have any thoughts on what you would want from one?

It seems like using llSetTexture() with the appropriate special UUIDs might work, but I don't think anyone has tried it yet.

 

Actuallllyyy, we have. And it works. Myself and a few other people have already put out appliers using the UUIDs.  (After I'd already posted this)

But since you asked, we will obviously need constant names for the BAKE UUIDs. (TEXTURE_BAKE_HEAD, etc?)

Also, a way to add (and remove again) textures to the bake stack. There's still alot of applier-only items laying around. If you want us to go onion-less, we need to be able to insert textures into the stack via scripting.   (If you can get it to work, it'll save alot of people a TON of reboxing work)
 

Edited by Chellynne Bailey
  • Like 1
  • Thanks 2
Link to comment
Share on other sites

On 4/9/2018 at 9:27 AM, Vir Linden said:

We haven't specifically added any API for scripting yet. Do you have any thoughts on what you would want from one?

It seems like using llSetTexture() with the appropriate special UUIDs might work, but I don't think anyone has tried it yet.

 

It would be very useful to be able to allow meshes to use bakes that only use a subset of the various layers in the full bake and to have these subset bakes be made on demand - for instance, a body could apply a bake made up only of the  skin and tattoo layers at skin layer, and then a bake made up only of clothing layers at a higher level or on a removable shell. https://jira.secondlife.com/browse/BUG-216061

This would be a way to get around the "one arm/one foot" issue as well - an additional channel could be done of the existing upper body and lower body stacks for the other arm/foot and flags could be set on tattoos/alphas/etc. saying whether they would be used on the left, right or both.

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

On 09/04/2018 at 2:21 PM, Vir Linden said:

[…] Normal and specular maps are not so straightforward, as I'm sure you've heard before. Not so much adding the slots, as getting the baking service to handle them, and getting them to render on the system avatar.

My emphasis. Now this would be really nice to have.

Link to comment
Share on other sites

On 4/9/2018 at 6:21 AM, Vir Linden said:

Normal and specular maps are not so straightforward, as I'm sure you've heard before. 

 

So what makes Normal and spec maps trickier? They're just textures like any other. I'm sure clothing makers would need to alpha out unused sections just like they do with diffuse textures, but once they've done that, what is keeping the system from baking those spec/normal textures together?

Link to comment
Share on other sites

2 hours ago, Chellynne Bailey said:

So what makes Normal and spec maps trickier?

Well for starters... The alpha channels on normal and specular maps if they exist, are supposed to control specular tightness and environmental reflection strength...

Baking those alpha channels out during the layering process, would severely mess the alpha channel controls up.

You'd have to effectively have the alpha channels as separate alpha layers composited in the same order as the normal /specular maps, with a merge mode where upper layers blank out the matching portion of the lower, it's a logistical nightmare.
 

  • Thanks 1
Link to comment
Share on other sites

12 hours ago, Klytyna said:

Well for starters... The alpha channels on normal and specular maps if they exist, are supposed to control specular tightness and environmental reflection strength...

Baking those alpha channels out during the layering process, would severely mess the alpha channel controls up.

You'd have to effectively have the alpha channels as separate alpha layers composited in the same order as the normal /specular maps, with a merge mode where upper layers blank out the matching portion of the lower, it's a logistical nightmare.
 

That actually explains alot.  But it sounds like the system could use the corresponding diffuse layers as the Alpha Map (They'll need to be flattened of course).  We just need to make sure spec and normal maps are attached to diffuse textures.

  1. Start with skin spec- (if it exists)
  2. Alpha out the shape of the 1st diffuse texture.
  3. Add that texture's spec map.
  4. Alpha out the shape of the 2nd diffuse texture
  5. Add that textures spec map
  6. rinse repeat till you reach the top of the stack.

You should end up with all the visible textures having their spec map visible where the diffuse is visible and nowhere else. The same process should be useable for Normal maps.
We will need a tag for items that should be skipped in the process. Ie, Tattoos that want to adopt the spec map of the skin could skip the Alpha out step.

Unless there's some flaw in my logic?

  • Like 1
Link to comment
Share on other sites

6 hours ago, Chellynne Bailey said:

Unless there's some flaw in my logic?

Erm... Let's just do normal maps for now as an example, remembering this also needs to be done for specular maps too

1. Get the specular control alpha channel for the skin layer normal to use as a base

2. Get the specular control alpha channel from the tattoo layer normal, and alpha mask it for non zero values to apply over the skin normal alpha so NONE of the skin specular control shows through the tattoo specular controls non zero areas

3. Do the same for the undershirt layer so none of the skin and tattoo layers show through the undershirt layer

4. Same again for the shirt layer

5. Now you have alpha masked the layers, bake them together as the alpha channel of the baked normal, remembering the normals will also need to be alpha masked so skin & tattoo bumps dont show through the undershirt or shirt layers. Remember also, that although you are using alpha MASK to rotoscope and layer the normal maps alpha channels, the actual alpha data has to be preserved as alpha blend .

Thats the nasty part, you have to use masking to rotoscope the blends so each clothing layers alpha blend data is masked into it's own area of the image, so your leather bra  isn't ruined by your latex undershirt or your african style tribal scarification tattoo layer, or your hi res normal mapped skin...

It helps if you think of the alpha channels being coloured rather than grey scale... say the skin normal alpha is red, the tattoo normal alpha is green and the undershirt normal alpha is blue, you want a FINAL backed alpha thats still a 'blend'  but no red must show through the green or blue areas, no green must show through the blue areas.

6. repeat the whole process for the alpha channels on the specular maps.

...

It could be done, but it's a logistical nightmare, expecially if some muppet has convinced LL to implent Bake-fail-Aux with 1,000,000 sequence numbers, and the ability to wear 50 or 60 bakefail aux diffuse, normal and specular maps.

Can you imagine the server load if the server has to sort this process out for 150-180 separate layers for EVERY bake-fail using person on a sim?

/me shudders at the ideas of such a system at say a busy shopping event.
 

Link to comment
Share on other sites

4 hours ago, Klytyna said:

Erm... Let's just do normal maps for now as an example, remembering this also needs to be done for specular maps too

1. Get the specular control alpha channel for the skin layer normal to use as a base

2. Get the specular control alpha channel from the tattoo layer normal, and alpha mask it for non zero values to apply over the skin normal alpha so NONE of the skin specular control shows through the tattoo specular controls non zero areas

3. Do the same for the undershirt layer so none of the skin and tattoo layers show through the undershirt layer

4. Same again for the shirt layer

5. Now you have alpha masked the layers, bake them together as the alpha channel of the baked normal, remembering the normals will also need to be alpha masked so skin & tattoo bumps dont show through the undershirt or shirt layers. Remember also, that although you are using alpha MASK to rotoscope and layer the normal maps alpha channels, the actual alpha data has to be preserved as alpha blend .

Thats the nasty part, you have to use masking to rotoscope the blends so each clothing layers alpha blend data is masked into it's own area of the image, so your leather bra  isn't ruined by your latex undershirt or your african style tribal scarification tattoo layer, or your hi res normal mapped skin...

It helps if you think of the alpha channels being coloured rather than grey scale... say the skin normal alpha is red, the tattoo normal alpha is green and the undershirt normal alpha is blue, you want a FINAL backed alpha thats still a 'blend'  but no red must show through the green or blue areas, no green must show through the blue areas.

6. repeat the whole process for the alpha channels on the specular maps.

...

It could be done, but it's a logistical nightmare, expecially if some muppet has convinced LL to implent Bake-fail-Aux with 1,000,000 sequence numbers, and the ability to wear 50 or 60 bakefail aux diffuse, normal and specular maps.

Can you imagine the server load if the server has to sort this process out for 150-180 separate layers for EVERY bake-fail using person on a sim?

/me shudders at the ideas of such a system at say a busy shopping event.
 

Well, let us let LL worry about server load. People should br turning off materials affects in busy areas anyways. 

Yeah, I think   1-4 is basically what I said.. but wordier... but 5 we diverge. I'm suggesting, instead of using alpha channel to define a spec or normals alpha'd out areas, since that's being used for other things, we instead use the corresponding diffuse texture as an alpha. Should be fairly simple for the system to black or white it out so it's solid color + transparencies.

As for server load, I don't think it'd be much. There's no real reason to recalculate unless you add or remove something. As long as people aren't sitting at events spamming items on and off if should be fine.

 

Link to comment
Share on other sites

On 4/13/2018 at 1:25 AM, Chellynne Bailey said:

... People should br turning off materials affects in busy areas anyways.  ...

Why? Materials is mostly a viewer side load. Materials are enabled by turning on Advanced Lighting in the viewer. The server still sends all the 'texture/map' info to the viewer, basically UUID's. The viewer asks for the texture/maps actual files, if needed, and the data is delivered by the 'local' CDN service. So, there is very little load on a simulator from ALM...

My thinking is, if your computer can handle the render, enjoy as it has very little impact on others.

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

On 4/14/2018 at 9:09 AM, Nalates Urriah said:

Why? Materials is mostly a viewer side load. Materials are enabled by turning on Advanced Lighting in the viewer. The server still sends all the 'texture/map' info to the viewer, basically UUID's. The viewer asks for the texture/maps actual files, if needed, and the data is delivered by the 'local' CDN service. So, there is very little load on a simulator from ALM...

My thinking is, if your computer can handle the render, enjoy as it has very little impact on others.

I wasn't suggesting it had any impact on others. Only that people should turn them off if they want to be able to move. :P Can't say I've ever encountered anyone who doesn't need to turn down settings for a smooth experience at something like a Skin Fair.  

If we wanna talk about the impact on others, it's not the settings that need to change, but what you wear. Stripping down to alphas can help your fellow shoppers a great deal.

Link to comment
Share on other sites

On 4/12/2018 at 11:20 PM, Klytyna said:

Can you imagine the server load if the server has to sort this process out for 150-180 separate layers for EVERY bake-fail using person on a sim?

 

Except, of course, that avatar baking is done by dedicated servers that aren't running the simulation and has been since 2013.

Link to comment
Share on other sites

  • Lindens
41 minutes ago, Theresa Tennyson said:

Except, of course, that avatar baking is done by dedicated servers

It's true that baking is done on separate servers, but the question of load on them is still relevant. If baking becomes far more expensive, or far more frequent, then those servers will bog down. It's possible to add more servers (as we will need to do for the 1024 resolution change), but there are going to be constraints on that, like any hardware expense.

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

On 4/20/2018 at 4:46 AM, Vir Linden said:

It's true that baking is done on separate servers, but the question of load on them is still relevant. If baking becomes far more expensive, or far more frequent, then those servers will bog down. It's possible to add more servers (as we will need to do for the 1024 resolution change), but there are going to be constraints on that, like any hardware expense.

As requested at the Creator Meeting, a Jira has been constructed for the Insertion of Textures into the Bake Stack. It is here: https://jira.secondlife.com/browse/BUG-216137?

I have a couple questions about how things are currently stored.  Are the attachments we see in appearance stored in one list? Or is what we see actually the compilation of several stored lists? There's been a bit of discussion about the best way to indicate where to put something in the stack, and it'd be nice to know how things are done now.

Also on a related note, has there been any thought about simplifying the current scheme and getting rid of some of the layers?  Currently, all they do is force System Layer creators to create more than one layer for their items since everything seems locked to it's own layer. 

 

Link to comment
Share on other sites

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