Jump to content

Red Outlines in Render Metadata - Physics Shapes


Chic Aeon
 Share

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

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

Recommended Posts

I went over to research something in question in this post:

And took this screenshot. 

Who can tell me what the red outlines are here and there?  I have never seen these.  Basically the creator doesn't do physics for furniture pieces. The building HAS physics (made by another person). 

pixelmode.thumb.JPG.27bc41572ca2e5f76bc2354c740903fd.JPG

Link to comment
Share on other sites

OK, deep breath....you asked about the boxes, which is a completely diffferent thing to the tonal shading that Whirly mentioned. However there are a couple of things to note here with regard those, so I will first clarify that.

Counter intuitively the physics coloration is not based on the physics cost but on the overall object cost. It has been this way since the original code was written. I am tempted to make it selectable in a future firestorm.

The colours themselves are then defined relative to a viewer Setting (ObjectCostHighThreshold) and a linear interpolation is used to graduate the shades from "ObjectCostLowColor" through "Object CostMidColor" to "ObjectCostHighColor" based on a normalised cost. This is illustrated in the following graph which shows the default colours and threshold. I messed the labels up but effectively the X axis is the normalised cost and the y axis is the object cost. The plot is the equation shown (the normalised cost against object cost). The shading approximates the spectrum of colours you would see in the phsyics view.

aaef7f2eab98fd8dd81078922350901b.png

 

But what about those magenta wireframe boxes?

Any wireframe cube is indicative of an error or limitation while rendering the physics shape in the viewer. If you are using the 32bit Firestorm or Linden Lab viewers you will not see these very often, typically they will flicker into view very briefly during loading because the asset is still downloading and be gone before you have time to realise. On the 64 bit firestorm, you see these a lot more frequently. to explain why I need to take a step back...

Physics view is artificial.. my recent blog post about the "thin wall issue" illustrates one situation where the viewers get it wrong. The real physics is always calculated and enforced on the server however in order to draw the physics shape view on your screen, the viewer has code that "reproduces" the physics shapes. For some scenarios it is easy, a mesh with a non-analysed mesh physics shape is literally just another mesh that is sent to the viewer as part of the asset data. However, when it comes to convex hulls, the viewer does not know how to render them on its own. It uses a helper library that is licensed by Linden Lab from the makers of the physics system Havok. Until very recently the lab did not provide a 64-bit Havok build and as such there is no current 64 bit TPV that is able to decode things like convex hulls. Thus, there are a number of scenarios when the viewer cannot show a physics shape because the necessary library to provide the data is not there. 

Note though that this ONLY applies to the physics view, it has no impact at all on the physics collision shapes because these are handled on the server.

In fact the boxes, which are 50% of the bounding box of the object (fwiw) come in a range of colours, the reasons for the colours vary slightly depending on whether it is user mesh, with analysed or non-analysed physics, whether it is in convex hull display mode or prim physics mode etc. Here is a non-definitive list.

Orange (255,255,0) - viewer cannot decompose analyzed hull physics (Havok is not installed) or the user mesh physics has not downloaded yet (similar to cyan)

Magenta (255,0,255) - this is a standard prim in convex hull mode or its a mesh with no physics shape (only the default base hull) and we don't have Havok.

Cyan (0,255,255) - the physics data has not yet been retrieved from the CDN

I am writing a definitive guide which will appear on my blog but I am going to wait until we have a Havok enabled 64-bit Firestorm in release as that will make most of these boxes vanish.

 

regards

Beq

x

 

Edited by Beq Janus
cleaning up a few typos and grammos
  • Like 5
  • Thanks 4
Link to comment
Share on other sites

2 hours ago, Beq Janus said:

Counter intuitively the physics coloration is not based on the physics cost but on the overall object cost. It has been this way since the original code was written. I am tempted to make it selectable in a future firestorm.

THAT is very good to know. I actually understood most of what you had to say and it was exactly what I wanted! 

 

2 hours ago, Beq Janus said:

Magenta (255,0,255) - this is a standard prim in convex hull mode or its a mesh with no physics shape (only the default base hull) and we don't have Havok.

 

 I am confused on this part still. I can't seem to make something that appears like that.

I rezzed four cubes, joined them and turned them into convex hull. Still blue.

I took a mesh object that had physics (in this case just a cube for one part and a special hexagon prim that I use for round things as the other). I turned one object (it is a two piece linkset) to "none" in the physics tab -- still no red. I am using the current 64 bit FS viewer. How does one get a mesh with no physics shape?  I am missing something (possibly above my pay grade ¬¬).

 

I went on a colorful tour of my shop and found a few things "flash red lines" and then disappear. One was a scripted sign for an event that has really nasty mesh letters on it). I only found two things of mine that flashed the red lines and they were a distance away so hard to tell but I think it might be two stools with fairly complex geometry. They would have had a cube as the physics model. Puzzled.

AND when I cammed out there was a lot of red lines along the Linden Road out front of my shop. Those all seemed to be scripted objects (some invisible like the cubes that let the pods move along and some other things. Over on LEA12 I found a persistent red line and it too was a scripted object (not mine either :D). 

So "sometimes" things stick because they are scripted and are sending messages to the server?   Not a script person, it just seems like something is going on there. Note that the reason this is not a WIRED CUBE is because I have it pushed into the ground.

Just want to try and do the best I can. And I am VERY happy to know about the colors being for the complexity of the object as that was definitely confusing me in the past. 

59a602f3cc0d2_persistantredlines.thumb.JPG.b8b672c3b093a743cc238af3030f295e.JPG

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

9 hours ago, Chic Aeon said:

 I am confused on this part still. I can't seem to make something that appears like that.

Step by step:

  1. Enable physics view in render metadata
  2. Rez a prim
  3. change the prim physics to convex hull
  4. set the hollowness to >20%

Why these steps?

Prims are "speshal" a default prim is represented in physics by a very low cost physics primitive and you will notice that unlike meshes when it is painted blue it has no edges. This shows that we are using the optimised Havok box shape.

If we leave the physics as Prim and change the hollowness to >20% you will notice that it suddenly gets dressed in triangles. This is a triangle mesh physics being applied to the more complex shape in an attempt to better reflect the actual visible shape.

If we then try to turn that into a convex hull, the viewer cries foul, it needs the havok libraries, throws a little hissy fit and draws a pretty pink box instead.

502d4e742d525fbb69daaac6d23a869c.gif

 

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

  • 2 weeks later...

Quick update teaser....

Today I was able to test the new 64 bit Havok capability in FS. I will stress that this is not yet publicly available but is likely to be part of the next release.

This means that the 64 bit Firestorm will have full Havok support once again, just like its 32 bit version. 

The implication is that the little Magenta boxes will no longer appear and will instead be replaced by "pretty" physics shapes.

I am demonstrating here using a new feature that I have added to Firestorm that allows you to see the physics shapes in edit mode as well as the old render metadata route.

We are going to do the same test as above. Render a cube, adjust the hollow to demonstrate how the physics moves to mesh above 20% hollow and then flip to convex hull. 

In the previous animation, this resulted in a magenta box. In the Havok enabled version we see a blue box appear. I have to set the box partly transparent because the convex hull is slightly smaller than the containing object and is "hiding" inside.

61010c7263cd5ab08a2349e0ab835566.gif

  • Like 2
Link to comment
Share on other sites

  • 2 weeks later...
You are about to reply to a thread that has been inactive for 2410 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...