Jump to content

Best spot to place sit script in mesh chairs?


Guest
 Share

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

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

Recommended Posts

I'm working on my first mesh chair and I'm looking for advice on the best spot to put the sit script.

Right now the chair has 18 mesh pieces linked together for a Land Impact of 9. In order to keep the Land Impact low I'm going to have to separate one of the pieces from the linkset and use that piece to house the sit script.

I've seen it recommended to do this with the shadow piece that sits on the floor but then you would have to click on that piece to actually sit. This seems counterintuitive to me. On the plus side it might be easier to align that piece back with the chair if you make a mistake and forget to move the chair and shadow together.

I'm thinking it would be better to detach the chair cushion since that's where you would normally click to sit.

What do you think? Any other options come to mind? I really don't want to bump LI up to 18 by placing the script in the linkset.

Thanks!

Link to comment
Share on other sites

Maybe I'm missing something here, but I don't think scripts have any affect on mesh now. As for the sit script and where to put it, I'd link all the parts to the cushion. So the cushion would be the main prim. Of course, I'm not a furniture maker, so I bet there are things they would do that I would not think of. 

A Land Impact of 9 does seem a bit high tho, but I have no idea what it looks like or whatever. 18 different meshes seems a bit extreme. I'm not saying it has too much, just that that is alot of parts. I venture to say that with something like a chair, it might be good to make it all fewer meshes. Like I said tho, I can't really say without seeing the mesh or even a wireframe of the mesh.

Just a thought, but if the chair has 18 separate meshes, then I would think that means 18 different physics boxes. That is probably why the mesh has a Li of 9. Unless you really need them to be separate meshes, I'd just make them all 1, or maybe 2, with the 2nd mesh being the cushion.

Link to comment
Share on other sites

Yes, scripts still have impact, which you can lessen by joining some meshes together before upload -- someone else will have to explain why that is; I just kind of experiment. A 5 prim object will usually go to 9 prims unless you join meshes, but not always. Yet another thing LL might want to consider documenting, as it is 1) rather important and 2) SL - specific.

 

I do put the sit script in the seat but once I had it in the shadow prim and it worked fine.

  • Like 1
Link to comment
Share on other sites

Ok, I had to go look it up, as I was not seeing any jump in Land Impact when I add a script to anything.

Server weight: Measures the impact an object has on Second Life's server resources. Objects that are composed of many prims and have physics enabled and/or contain scripts tend to have high server weights.

So, then I went and looked again at my meshes that I dropped the scripts in. My server weights are so low, that adding a script does not raise the server weight high enough to change my Land Impact. The server weight does double tho, but mine are super low compared to the other weights. Notice how it says "Objects that are composed of many prims", I'm assuming they means Parts, not prims. Most of mine are only 1 mesh. Even my shack that I made, which has many parts and many scripts only has a server weight of 10, but my Land Impact is 29. In my meshes, server weight is basically irrelevant. Even my mesh animals that walk and move around and attack you only have a server weight of 5. I think the only time you are going to see a script impact a mesh, is if the mesh is only 1 or 2 as far as Land Impact.

  • Like 1
Link to comment
Share on other sites

I have had meshes go down from 67 in land impact to 21 when the mesh was separated in 3 parts and then linked in-world. So having a few components might make sense. 18 parts seems a bit on the high side though for a chair. 

Having 18 parts may also do something to your load times for textures unless they all use the same UV. 

  • Like 1
Link to comment
Share on other sites

There are only four reasons I can think of right now why a builder might choose to make a mesh model of multiple parts....

1. You want users or scripts to be able to manipulate the parts separately. For a chair, I suppose you might want the user to be able to move a cushion, change the shape of the back, raise and lower the arms, etc., but 18 pieces? No way can I see that as being useful.

2. You want to use more than the limit of eight textures. This is most unlikely for a chair. Generally inappropriate for small things like chairs,and unwise for performance reasons. Anyway, 18 meshes would give your chair an unimaginable 144 textures.

3. You want to reduce the download weight (as mentioned in another answer). This can be effective for some meshes, but involves compromises and depends on size in such a way that make it unlikely to be appropriate for a chair - see below.

4. You are using a 3D drawing/collada exporting package that forces this fragmentation on you (reported by some for Sketchup). This is unforntunate. If this is the reason, consider learning just enough of Blender (or another package) to let you import the model, join up the components and re-export it.

Nine prims is a very high cost for a chair. The fact that it rises to 18 on adding the script proves that the server weight is the largest of the three weights and is therefore determining the LI. In general, you shouild avoid this ever being being the case in all circumstances where that is possible. It indicates an inefficient use of the prim allowance. If your model will never be scripted, you should join components together at least until the server weight is lower than the download weight*. If it's likely to ever be scripted, then try to keep the server weight less than half the download weight*, as it will double on addition of the first script. If the chair is joined into one mesh, the server weight will be 0.5, which will satisfy both conditions.

What about reducing the dwonload weight? Because of the steep dependence of download weights on mesh size, dividing a large mesh model into smaller pieces can reduce the total download cost. Note that it is the reduction of size, not of complexity, that has this effect. The reason the weight reduces is because the component pieces will now switch to lower LODs at shorter distances, so that the full mesh data will be required to be downloaded and rendered less often. But this involves two possibly undesirable side effects. First, the appearance of the mesh will degrade when it is nearer, possibly to an unacceptable extent (remember that may users will be using default renderVolumeLODFactor of 1.25 on low graphics). Secondly, even when linked, the components will switch LOD at different distances. This uncoordinated switching can be quite disconcerting unless the LODs are designed carefully to avoid the effect. Using this method to reduce LI requires deciding at what level to compromise with these effects. More than anything else, that depends on the size of the model.

If you study some graphs that show how the download weight varies with size, you will see that the effect is really quite small for anything with a radius less than about 2 meters. That includes chairs. Furthermore, in this sort of size range, the download weigh depends predominantly on the lowest LOD mesh, and providing an effective lowest LOD can drastically reduce the LI much better than fragmentation. Both these considerations become less valid as the size of the object increases. The download weight increases faster and faster with increasing size, and the effectiveness of good lower LODs successively decrease and disappear. In general, it is only for very large meshes that fragmentation may offer a better choice than simplifying lower LOD meshes for reducing LI.

So, to return to the chair - the best idea would be to combine all the parts into a single mesh, or at least to as many components as required by reasons (1) or (2). You are likely to be pleasantly surprised by the effect on the LI. If not, your model may be more complex that is reasonable for a chair. It is quite possible to make a reasonable chair with a LI of 1. For an elaborate chair, I would not expect anything higher than 4. Don't forget, it's the low LODs that count.

*Or physics weigh if that his higher - should not be the case for a chair which can have a very simple physics shape.

  • Like 1
Link to comment
Share on other sites


Medhue Simoni wrote:

I think the only time you are going to see a script impact a mesh, is if the mesh is only 1 or 2 as far as Land Impact.

The only time you will see the addition of scripts having a raise in landimpact is when the server weight of the object is more than half that of the other two weights, unless the object is physical, then there will be no extra impact. (not arguing with your statement...just narrowing it down...)

 

To the OP...

You could make a seperate "script prim" for the chair. Make the entire unscripted chair out of one mesh, to keep the server weight down, you'll see a lower number than 9. Then make a very simple chair shape (could be a box even), slightly bigger than the chair you have and make it invisible, just make sure it sticks out of the chair everywhere. Make it invisible, set it to phantom so people won't walk into it and put the sit script in that object. People can now right click the chair (or at least they think they are) and sit on the seperated prim. this will have all the benefits of the shadowprim being used for it, without people having to search for a place to click.

 

You could also put the script in the chair itself, as long as you make it out of one mesh. Chances are the server weight will still be under the download weight, then there will be no extra landimpact. It's possible the server weight will go over slightly, adding to the landimpact. Then it's for you to decide if the all-in-one-costing-slightly-more version is worth the extra impact. Having two seperate objects is ofcourse clumsy.

  • Like 2
Link to comment
Share on other sites

Many thanks to everyone for the informative responses!! 

There is so much to learn about mesh that I find it can be a bit overwhelming so I'm trying to take it one step at a time.  You certainly have given me a lot to think about. 

An exciting challenge for sure (when I'm not banging my head against the desk :) ).

 

Link to comment
Share on other sites

Yes, there are certainly some helpful and knowledgable people here. 

To generalize one aspect that is important for anyone building with mesh objects:

LI is the end result, but the resource weights are what you should be watching as you build and experiment. 

 

Mesh is more flexible and allows significantly more control than previous building formats (prim and sculpt), but it's also more complex. Prim building is much more straightforward, but there will be things you can simply never do. 

 

We show the resource weights of objects in the uploader, so you can see what they will be like before uploading (minus the effects of scale). This can help you get a feeling for the effects of LoD, but also tells you if something that is not your focus, like Physics, for instance, is high and driving the LI.

I realize our doc on the wiki is not as helpful as it should be and I'm trying to find the time to improve it.

Charlar

  • Like 2
Link to comment
Share on other sites

"...like Physics, for instance..."

The display of weights before upload is very useful, but it would be so much better if we could see the physics weight for "Prim" shape type as well as for "Convex Hull" type. Many meshes have accessible interiors and are destined to be used with "Prim" shape type. At the moment this is only available after upload. Any chance of that improvement? It can't be because the triangle-based weights are scale-dependent because that's the case for download weight too.

Link to comment
Share on other sites

I work in Blender and am reading this thread with great interest. I have learned how to join meshes within Blender, but have found if I go to upload my creation any object in my scene gets uploaded even if they are not joined within Blender and unwrapped on the same UV. For example, I have a table and a lamp. Is there a way to work on the table with the lamp in the scene but only export the table without the lamp? I bring this up because of the examples given about separating builds which I am also working on. Can I have a scene with two house parts and upload them separately?

 

Maybe I am thinking about this wrong and, while the scene would be uploaded together, the objects are already separate. For example, can my table in the above example have 8 materials as well as the lamp or am I limited to 8 materials for the scene which included the table and lamp? I hope this makes sense.

Link to comment
Share on other sites


Robert Galland wrote:

Is there a way to work on the table with the lamp in the scene but only export the table without the lamp? I bring this up because of the examples given about separating builds which I am also working on. Can I have a scene with two house parts and upload them separately?


In 3ds max you can "export selected", so you can have all your lods and all your different objects in a single scene. Possibly Blender has this option aswell.

 


Maybe I am thinking about this wrong and, while the scene would be uploaded together, the objects are already separate. For example, can my table in the above example have 8 materials as well as the lamp or am I limited to 8 materials for the scene which included the table and lamp? I hope this makes sense.

Again, in 3ds max, if the objects are seperate in the scene before uploading, they will be linked in SL, but seperate objects. So you can indeed use 8 materials on each of them.

 

 

Link to comment
Share on other sites

In the Blender 2.49 collada exporter, there is a toggle to upload whole scene or only selected object(s). I assume you can do the same in later versions.

If you do upload multiple Blender objects, whether the whole scene or less, each will become a separate object in SL (to be precise, a separate mesh prim), and each can have its own set of eight materials. They will appear either as a linkset object or as a coalesced object in inventory, depending on their overall size. In either case, they will retain the relative locations, transformations and scale that they had in the Blender scene.

The most likely problem with uploading multiple objects together arises when you are uploading several files with different LOD versions of the scene (and possibly physics shapes too). In that case, the uploader has to decide which object in the lower LOD scenes correspond to which in the high LOD scene. At present, as far as I can tell, that is determined by the order of the <geometry> sections in the collada files; the first at high LOD goes with the first at each lower LOD, the second with the second, and so on. With the Blender 2.49 exporter, that order is determined by the alphabetical order of the object names, which makes it relatively easy to get them in the same order in the different files. I don't know what determines the order with later versions of Blender (one reason I don't use them) or with other software.

 

Link to comment
Share on other sites


Kwakkelde Kwak wrote:

Again, in 3ds max, if the objects are seperate in the scene before uploading, they will be linked in SL, but seperate objects. So you can indeed use 8 materials on each of them.

 

 

IN 3DS max can I create 8 seperate materials and apply them to my model or do I need to create 1 multi/sub-object material with up to 8 sub-materials? Or do both work?

Also how do you import the texture? Is it automatically exported in the .dae and applied to the model when imported inworld? or do I need to extract and upload the texture seperately. 

Sorry for the noobishness of the question, still new to Max and currently stuck on UVW unwrapping, not actually got to the point of uploading a texture yet.

Link to comment
Share on other sites

Swobbly Minogue wrote:


 or do I need to create 1 multi/sub-object material with up to 8 sub-materials?

Exactly, and you can do this for each individual mesh. Watchout tho, you don't want to go too overboard with dozens of different textures. I try to stay as efficient as I can, and I usually put all the texture on 1 uv map, even if I'm using 8 different faces/materials.

 


Swobbly Minogue wrote:

Also how do you import the texture? Is it automatically exported in the .dae and applied to the model when imported inworld? or do I need to extract and upload the texture seperately. 

 

It depends, personally, uploading the texture in the dae never works for me and I have to upload it separately. Either way, it will still cost the same as LL will charge you 10 lindens for each texture.

 

 

Link to comment
Share on other sites


Robert Galland wrote:

Thanks, Pamela

 

Can you upload the parts separately? I guess the question is relevant if you use Blender 2.61 since I have already been told you can do so in 2.49. I know I am not presented with the same options when exporting to Collada in 2.61 that I am in 2.49.

You don't have to upload them separately, all of them can be in the same dae. Think of it like you are uploading a scene. All the meshes will just be linked like normal prims, and you can unlink them if you want, or whatever.

Link to comment
Share on other sites


Medhue Simoni wrote:


Robert Galland wrote:

Thanks, Pamela

 

Can you upload the parts separately? I guess the question is relevant if you use Blender 2.61 since I have already been told you can do so in 2.49. I know I am not presented with the same options when exporting to Collada in 2.61 that I am in 2.49.

You don't have to upload them separately, all of them can be in the same dae. Think of it like you are uploading a scene. All the meshes will just be linked like normal prims, and you can unlink them if you want, or whatever.

Correct, but I usually end up uploading each one individually. I get so many error messages that it's just easier to upload one at a time then I know when one is borked.

Link to comment
Share on other sites


Swobbly Minogue wrote:

IN 3DS max can I create 8 seperate materials and apply them to my model or do I need to create 1 multi/sub-object material with up to 8 sub-materials? Or do both work?

Adding 8 seperate materials to your mesh should have the same result as making a multi/sub. You can verify this by applying the 8 seperate materials, then picking the material from the object. You'll see it is now a multi/sub.

As you are new to max, this is what you can do. Put all the materials on the object, or attach all your objects with different materials to eachother (don't know your workflow or kind of object/scene). Then open the material editor. Select an unused material then select "pick material from object". It's next to the objects name.

If you use seperate objects for your different LoDs, I think it's better to use the multi/sub to begin with. I'm not entirely sure, but I can imagine the material order getting messed up in the .dae file. The materials for each LoD should be identical, I suspect a different order in 3ds max means a different order in the .dae aswell. In that case the uploader will refuse your models. Again, I'm not entirely sure. Making a multi/sub will also make it easier to keep an eye on the number of used materials.


Also how do you import the texture? Is it automatically exported in the .dae and applied to the model when imported inworld? or do I need to extract and upload the texture seperately. 

Sorry for the noobishness of the question, still new to Max and currently stuck on UVW unwrapping, not actually got to the point of uploading a texture yet.

Medhue said he can't include any textures in the .dae from 3ds max. The current autodesk collada exporter doesn't include a texture export for .dae files, unlike the .fbx. I'm not sure if there are any other exporters for max that do. I always upload the textures seperately. Just make sure you have your UV maps worked out. There aren't a lot of tutorials on max in the SL wiki, but there is one about UV mapping / UVW unwrapping.

Exporting a mesh from 3ds max

It's halfway through the page, three youtube movies.

Link to comment
Share on other sites


Swobbly Minogue wrote:

Thanks Medhue. Do you normally use a 512 x 512 texture or can we get away with 1024 x 1024? A 512 x 512 texture seems awfully low res if used on a larger object, but I was always taught to never use higher than 512 x 512 when building in SL? What do you think?

If you weren't supposed to upload or use 1024x1024 textures, LL wouldn't have given you the option. It really depends on the object what size of texture you use. I normally use 512x512 for 10x10 m and that seems to look fine. But that's for buildings with flat surfaces. If you have something very curvy, the surface can be a lot bigger compared to the size. If you have text you'll probably need a pretty high res texture. It all really depends. Just keep in mind a 1024x1024 uses 4 MB of video memory. And SL not being a high end game and the average SL resident doesn't have a high end PC, 4 MB is quite a lot. People with a 256 MB video card can only process 64 1024x1024 at a time at a reasonable speed. (At least that's how I understand it). 512x512 textures use 4 times less, so the same card can process 256 of those textures, 256x256 again 4 times smaller resulting in 1024 textures.

Repeating your textures either per surface or per object will do wonders for image quality without having to use very large textures, but ofcourse it's not always preferred or even possible.

Link to comment
Share on other sites

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