Forums


Physics Shape Type in the viewers:

Building using prims, sculpties and meshes. Texture creation techniques.

Physics Shape Type in the viewers:

Postby Kayaker Magic » Fri Jan 29, 2016 6:58 am

It used to be that the viewers didn't have a way to set physics shape type for child prims, we had to do that with scripts.
Then FireStorm added a user interface to do it in the Features tab of the Build dialog, but it was buggy.
Is it still buggy? I looked at a build of mine recently (with a recent copy of FireStorm 4.7.5 (47975) Nov 9 2015 18:48:20 (Firestorm-Releasex64)) and was horrified to find that most of my child prims were Physics Shape Type Prim when I wanted them to by type None. But If I tried walking through the prims, they acted as if they were correctly type None (phantom). So is is reasonable for me to assume that my builds are correct and the viewer is not reporting the physics type correctly?

I suppose I could write a script to look at all the prims and give me a report... which child prims are type Prim and which are None.

How about a new feature in Kitely Marketplace that shows you that report? It would help creators like me make builds that have a smaller footprint on the servers. It would help buyers evaluate how laggy a product is before they buy it.
User avatar
Kayaker Magic
 
Posts: 322
Joined: Sun Dec 01, 2013 8:40 am
Has liked: 54 times
Been liked: 391 times

Re: Physics Shape Type in the viewers:

Postby Kayaker Magic » Fri Jan 29, 2016 9:28 am

So I went to InWorldz, which is not quite OpenSim, and tried looking at some identical builds there. The prims I set to Physics Type None were still None. I came back to Kitely and some of the prims I set to None a little bit ago said "Prim" again! But if I clicked on something else, and clicked back on the prim a second time, then it told me that it was physics type "None". Same viewer both places, I'm going to blame OpenSim and send in a Mantis.

But in the mean time I wrote that utility script. I can drop this in my builds before putting them up for sale and make sure the prims are set the way I want them:
Code: Select all
    //print out a report of the prim physics type for all prims in a build
list phantype=["Non Phantom","Phantom"];
list primtype=["Prim","None","Convex"];
default
{
    state_entry()
    {
        llOwnerSay("build is "+llList2String(phantype,llGetStatus(STATUS_PHANTOM)));
        llOwnerSay("root prim is Physics Type "+
            llList2String(primtype,llList2Integer(llGetPrimitiveParams([PRIM_PHYSICS_SHAPE_TYPE ]),0)));
        integer i;
        for (i=2;i<=llGetNumberOfPrims();i++)
            llOwnerSay((string)i+":"+llGetLinkName(i)+" is physics type "+
            llList2String(primtype,llList2Integer(llGetLinkPrimitiveParams(i,[PRIM_PHYSICS_SHAPE_TYPE ]),0)));
    }
}

This script generates a report like this:
    [01:20] T-Rex 1.66: build is Non Phantom
    [01:20] T-Rex 1.66: root prim is Physics Type Prim
    [01:20] T-Rex 1.66: 2:Head1 is physics type None
    [01:20] T-Rex 1.66: 3:Head2 is physics type None
    [01:20] T-Rex 1.66: 4:Tail is physics type None
    [01:20] T-Rex 1.66: 5:legl0 is physics type None
    [01:20] T-Rex 1.66: 6:legl1 is physics type None
    [01:20] T-Rex 1.66: 7:legl2 is physics type None
    [01:20] T-Rex 1.66: 8:legl3 is physics type None
    [01:20] T-Rex 1.66: 9:legr0 is physics type None
    [01:20] T-Rex 1.66: 10:legr1 is physics type None
    [01:20] T-Rex 1.66: 11:legr2 is physics type None
    [01:20] T-Rex 1.66: 12:legr3 is physics type None
    [01:20] T-Rex 1.66: 13:LArm is physics type Prim
    [01:20] T-Rex 1.66: 14:RArm is physics type Prim
I leave the body of the T-Rex Non Phantom so it can be detected by llCastRay.
I set everything else to Physics Type None to decrease the load on the server when my dinosaur moves.
OOPS! I forgot to set the arms of the T-Rex to None! Well, they are small and easy to overlook. But now I have a tool (this script) to remind me to fix that.
User avatar
Kayaker Magic
 
Posts: 322
Joined: Sun Dec 01, 2013 8:40 am
Has liked: 54 times
Been liked: 391 times

Re: Physics Shape Type in the viewers:

Postby Ilan Tochner » Fri Jan 29, 2016 12:41 pm

Hi Kayaker,

If you're leaving the body non-phantom then please make sure to give it a VERY simplified collision mesh so that that it doesn't strain the physics engine when it moves.
User avatar
Ilan Tochner
 
Posts: 4333
Joined: Sun Dec 23, 2012 8:44 am
Has liked: 2031 times
Been liked: 2282 times

Re: Physics Shape Type in the viewers:

Postby Kayaker Magic » Fri Jan 29, 2016 7:47 pm

Ilan Tochner wrote:If you're leaving the body non-phantom then please make sure to give it a VERY simplified collision mesh so that that it doesn't strain the physics engine when it moves.

Already on it. The body of most of these dinos is pretty close to an elipsoid, and I always select LOWEST on the physics level of detail drop-down when uploading the mesh. I often wish there was a NONE option on that dropdown so that I could tag some mesh parts as always Physics Type None automatically in the build.
User avatar
Kayaker Magic
 
Posts: 322
Joined: Sun Dec 01, 2013 8:40 am
Has liked: 54 times
Been liked: 391 times

Re: Physics Shape Type in the viewers:

Postby Shandon Loring » Sat Jan 30, 2016 10:26 am

Kayaker wrote:I forgot to set the arms of the T-Rex to None! Well, they are small and easy to overlook."


LOL
Poor Rex! Can hardly pick Augie out of his own teeth.
User avatar
Shandon Loring
 
Posts: 704
Joined: Sat Oct 26, 2013 3:25 am
Has liked: 483 times
Been liked: 741 times


Return to Building and Texturing

Who is online

Users browsing this forum: No registered users and 3 guests