Jump to content

Mesh triangles in LOD


Max Pitre
You are about to reply to a thread that has been inactive for 1116 days.

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

Recommended Posts

I was being lazy with something (testing) the other day and didn't upload a physics model. I had this same issue only it was just the lowest two LODs. I put in a simple CUBE  (again just testing textures) and all was well. Presumably that is what that thread says LOL.  It was a GOOD reminder for me as it happens so rarely now. Hopefully I will REMEMBER this :D   My land impact went from 287 (OMG) to 2 -   :SwingingFriends:

PHYSICS MODELS ARE IMPORTANT in more ways than one. 

So to the OP --- did you supply SOME kind of physics model?   

 

 

Link to post
Share on other sites

I find it interesting that 'use a box' isn't an option for physics in the uploader.  It should be, and then we wouldn't all have to make one.

I suspect most people pop over to beta and test-upload a mesh before they get round to developing all the LODs and a PHYS, I know I do.

Link to post
Share on other sites
19 hours ago, Max Pitre said:

Every once in a while I try to upload a mesh but all the LOD triangles are the same (except high) and the uploader wont change them no matter what I do. Why is this and what can I do about it?

I don't want to be rude but the answer to that will always be: make proper LoD models rather than the hopeless garbage the uploader can manage to generate. But if you really want to know, the problem you've ran into is usually (although apparently not always) fixed by clicking on the big conspicious looking "Clear settings & reset form" button.

Link to post
Share on other sites
11 hours ago, anna2358 said:

I find it interesting that 'use a box' isn't an option for physics in the uploader.  It should be, and then we wouldn't all have to make one.

Not only that. The box physics shape used for cube prims is significantly easier for the physics engine to handle than any of the physics shapes we can possibly use for an uploaded mesh.

The OP's problem has nothing to do with physics though, it's about a couple of other flaws and bugs in the uploader code - it's not as if there's a shortage of them.

Btw, for the benefit of any programmers who may read this, I came across a version of the mesh uploader source code, only with the bugs and bad code removed:

int main() 
{
    cout << "Hello, World!";
    return 0;
}

Brilliant, isn't it?

Link to post
Share on other sites

 

On 9/15/2017 at 3:25 AM, Max Pitre said:

Every once in a while I try to upload a mesh but all the LOD triangles are the same (except high) and the uploader wont change them no matter what I do. Why is this and what can I do about it?

Thanks in advance

LOD screenshot.jpg

LOD screenshot 2.jpg

Or it could be caused by,  quoting Drongle from this earlier thread   " It is certainly only happening when there's no UV map or the map is collapsed to a single point, and only when it's smooth shading. It is also very dependent on the closed "

 

 

Link to post
Share on other sites
1 hour ago, Aquila Kytori said:

Or it could be caused by,  quoting Drongle from this earlier thread   " It is certainly only happening when there's no UV map or the map is collapsed to a single point, and only when it's smooth shading. It is also very dependent on the closed "

It seems like there are MANY causes for this same issue and that makes it VERY hard to deal with. Here is something that I worked on for a long while and never could figure out what the issue was. This is just PART of an item but it was the part that would NOT upload LOL, so in the end I just left it off even if it would have looked super cool.

There are no doubles.  Vertices aren't THAT close together, it is mapped and has a material and has location, rotation and scale applied. It has a cube as a physics model (without a cube for the model there was a MAV_block error of some type.

Here is a screen shot and what the uploader did.

 

EDIT:  I even tried just uploading a single "line" of faces (deleting all but one row of the "wire" ) and still had the same issue.

wontupload.thumb.JPG.bb204d8993175cd841d2a65c447bf38c.JPG59c0437384ae7_wontupload77.thumb.JPG.393b1b0b57fd16d8ec185c87dba00f18.JPG

Link to post
Share on other sites
On 9/19/2017 at 10:02 AM, Aquila Kytori said:

I tried makeing a similar mesh object  ( I was curious how you did it :) ) smooth shading and UV unwrapped and it Uploaded ok.

59c14ceaab42e_1ChicTwistUVUnwrapped.thumb.PNG.c219ea38a8b55bb39304d540a71c471f.PNG

But if i removed the UV map :59c14d270d115_2ChicTwistNoUVs.thumb.PNG.967ed9bcb3b417514a1ccb9d47cd16a1.PNG

So maybe it would be worth giving it a secong go .

You are so smart. I may try again. I think I was being TOO creative.    Won't use it for this project but for another maybe, But mine WAS unwrapped and textured and baked even LOL. I almost always do that on small items (not houses).  So a mystery.  Yours looks "rounder" (the cord) than mine which is flat.   I still don't understand why some things work and other very similar ones don't (sigh).  

 

Link to post
Share on other sites
  • 3 weeks later...
On 24/09/2017 at 8:47 PM, Xiija said:

just curious,

people always say to use a box for smallest physics LOD , would it be possible

to use a simple plane, if you did not need to worry about the physics in SL for your model?

 

1

The simple answer is yes. It works. The more complete answer is "please don't". As with LOD models, it is preferable for the overall experience to have a physics shape that roughly (and it can be very roughly) matches the shape and volume of your item.

The problem with a single plane physics shape is that it does not provide a good physics analogue of the item. Now there are many cases where you may not want physics at all, but please think very carefully for the following reason. In almost all case a box that conforms to the overall volume of the item is no more expensive (it will undoubtedly be less than the streaming cost) and is very simple to have just laying around on your hard drive.

Have you ever tried to rez an item on the coffee table in your living room only to be told that you cannot? In some cases, with no copy items, you will find that not only did it fail to rez, but it also vanished from your inventory. Why is this? Simple, inadequate physics.

32d81de5e6f0559af35ed208ca56347c.png

When you drag an item from your inventory and drop it inworld the viewer takes over.

  • First, it has to work out where in 3d space you are trying to drop it, to do this it converts the 2D coordinates of your mouse on the screen into 3D coordinate by projecting a beam (known as ray casting). This means that it draws an imaginary line from your camera into the 3D scene that is drawn on your monitor.
  • That beam hopefully collides with a target and identifies which object has been "hit". In my example let's say the "hit" was on an object called "coffee table".
  • It then works out approximately where on the object it hit and uses that same imaginary line to intersect with the bounding box (an imaginary box surrounding your object).
  • This vector and the point at which it intersects the bounding box are then sent to the server and this is where the physics becomes important.
  • The server has the physics shape of the object, more importantly, it has no idea whatsoever what the "visible" shape is, it can only "see" the physics shape. Its job is to decide where on the target object the item is to be rezzed.
  • The server, therefore, takes the vector and follows the line through the object and the first point that the vector collides with the physics surface is the point at which the item will appear.
  • If however, it does not collide at all, (because you missed the edge of the table or more commonly because the creator of your beloved table chose to skimp on the physics shape) what can it do? The viewer has said "the user wants to rez this mug of tea, on this table", the server says "but there is no table there" and thus it just throws a hissy fit and gives up.
  • You get the sulky "you can't rez there" message and if you are lucky the item returns to your inventory.

 

TLDR;

The moral of the story is "be very careful about what you consider as not needing physics, especially if you are going to sell it to other users". 

There is a detailed Jira that we produced a while back that illustrates this.

Footnote:

I am actively extending the build tools in Firestorm at present and one of the items on my (longish) list is to provide a cube physics default. In theory, it is simple, in practice making sure I cover all the bizarre meshes you lot might want to throw at it, means it is not quite so obvious. Keep an eye on my blog, or these forums for updates.

Link to post
Share on other sites
1 hour ago, Beq Janus said:

In almost all case a box that conforms to the overall volume of the item is no more expensive

It is but the difference is marginal.

A mesh with a single triangle as the physics model will always have a calculated physics weight of 0.200. A mesh uploaded with a simple 12 triangles, 8 vertice box as physics, will always have the physics weight 0.360. I do use single triangle physics for some objects I'm absolutely sure will never need any physics at all - very small items, simple plant shapes and such things. But I have to agree with Beq, with so little to gain, don't do it unless you know exactly what you're doing and are absolutely sure it won't backfire.

Link to post
Share on other sites
6 minutes ago, ChinRey said:

It is but the difference is marginal.

A mesh with a single triangle as the physics model will always have a calculated physics weight of 0.200. A mesh uploaded with a simple 12 triangles, 8 vertice box as physics, will always have the physics weight 0.360. I do use single triangle physics for some objects I'm absolutely sure will never need any physics at all - very small items, simple plant shapes and such things. But I have to agree with Beq, with so little to gain, don't do it unless you know exactly what you're doing and are absolutely sure it won't backfire.

Yep yep, totally agree, if you can be completely certain of the usage, (anyone trying to rez a coffee cup on a plant leaf is prolly not worth thinking about). My point on cost was more that the small difference will never be noticed by a user, it's only for us self-confessed "mesh nerds". In fact,a physics cost that small will always be overshadowed because even at 0.360 even the default server cost will rule the day when it comes to evaluating LI!

Question, if/when I add "box physics" to the uploader, would it be preferable to add a Havok primitive or a Mesh one? Thoughts appreciated.

Link to post
Share on other sites
20 minutes ago, Beq Janus said:

Question, if/when I add "box physics" to the uploader, would it be preferable to add a Havok primitive or a Mesh one?

According to both the HAVOK documentation and LL's physics weight formula,t he HAVOK cube is far lighter than a mesh cube interpreted as a hull. In fact, it's much lighter even than a single triangle. The physics weight formula giver the cube a weight of only 0.060

If I remember correctly, the order of physics weights was:

  1. Sphere
  2. Cube
  3. Capsule
  4. Triangle
  5. Cylinder
  6. Hull
  7. Triangle list

(It's possible the capsule is lighter than the cube - not absolutely sure)

The question is, can you? LL seems to be fairly adamant they ionly want the heavy physics shapes for meshes, not the light ones.

Link to post
Share on other sites

I'm not sure, but I'll try, the thought I had was to look at how the Havok libs encode a cube and replicate that. It may get shot down in which case the decision is made for us.

I'm just finishing a couple of other tools for meshers at the moment. 

 

 

 

Link to post
Share on other sites

The problem that I have with the triangle physics for the couch is that most people seemed to WANT to bump into their furniture, not walk through. I certainly do. There was another long thread on this a few weeks ago.  There are exceptions but for furniture most items have the largest upload cost in download, not in physics. It would be quite simple and still cost effective uploadwise to make a physics model for the couch that conforms to the shape of the couch.

I know that was only an example :D. but I really do wonder about furniture with no physics at all. GRASS we can walk through in real life. That makes sense as do a few other things -- but not tables or chairs -- in my book anyway.

 

Link to post
Share on other sites

yeah that was an example of a bad physics design,  I hate furniture I can walk through, it makes no sense, hence the table example in the my text, I *want* to be able to sit/stand/put plants, cups etc on my table and as you rightly say it is very very unusual for a moderately complex mesh of a moderate scale to have a download cost so low that a properly thought out simple physics will still remain lower. Frankly, it is either laziness or lack of knowledge in most cases, my hope is to make the latter harder to claim so that lazy designers are compelled to do the right thing or be shown for their laziness.

Link to post
Share on other sites
9 hours ago, Beq Janus said:

and as you rightly say it is very very unusual for a moderately complex mesh of a moderate scale to have a download cost so low that a properly thought out simple physics will still remain lower.

Saving on physics weight might make sense in a linkset though. You may want to reduce it for some parts to have room for more detailed physics for other parts. And I also think it's a good idea to make it a habit not to add more load than necessary of any kind. But even so, if an object needs a slightly more complex physics shape, there's hardly ever ny reason not to give it one. (One of my pet pevees there is the non-walkable house roof ;))

As for actual load on the physics engine, there shouldn't be any at all unless an avatar or a physical object actually bumps into the item.

Link to post
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...