ingen-lab / Ruth

Project Ruth - an Open Source Mesh Avatar by Shin Ingen
56 stars 38 forks source link

Ruth: Fingernails, Toe Nail & Fingernail HUD #22

Closed ingen-lab closed 6 years ago

ingen-lab commented 6 years ago

Just so it will have its own space for future reference and further technical discussion issue fingernails hud

SundanceHaiku commented 6 years ago

I wanted to add a conversation that I had with Typhaine Artez since it provides background on a bug in the code underlying OpenSim . . .

TYPHAINE ARTEX: "Hi Sundance - I saw your words about specularity, and I wonder how? OpenSim does not support modifying normal and specular settings by script (http://opensimulator.org/mantis/view.php?id=8282)."

HERE'S MY RESPONSE: Well that's a bummer. It's a very cool feature and convenient. You can turn specularity on or off and adjust it (using llSetLinkPrimitiveParamsFast(0,[ PRIM_SPECULAR). Dang. Works in SL, but not in OpenSim. Well, at least until things are fixed in OpenSim. It's been tested and it works in the SL environment, so I'll keep everything in place and temporarily disable that feature for OpenSim. For the time being, folks will have to manually adjust specularity in the Edit window."

Thanks for telling me about this. I would have been doing some serious head scratching. Any idea how long it will be before it's fixed for OpenSim?

TYPHAINE ARTEX: Yes, I work on a derivative version of the Athena body since a while, and have been stupefied when I saw OpenSim doesnot support changing it by script. I saw getting the values is ok in latest releases of OpenSim (and even, you must know the number of faces on a mesh, you can't request for ALL_SIDES because of an old bug). But the missing feature seems to be postponed, so I have no idea when this will come out.

What I did is to keep the code managing it (on the hud side), and accepting normal and specular commands in the receiver (body) but making them dumb (doing nothing actually), otherwise you get errors in the debug channel (unsupported parameter for rule #x).

BTW, the same applies to alpha modes (mask/blend)

MY COMMENTS: Because of this bug, I've added a global variable to the HUD code. When set, the user receives a message informing them of the underlying bug, and that for the time being the specularity feature is not available.

SundanceHaiku commented 6 years ago

It looks to me that in order to use the specularity settings found in the EDIT window: Edit >> Texture >> Shininess (Under the the terms "Glossiness" and "Environment), you must have "Advanced Lighting" turned ON in Preferences. I'm showing this to be the same for both Second Life and OpenSim.

Does this agree with other's observations?

typhartez commented 6 years ago

Yes, as replied on G+ :)

Those "material" settings needs adv. light. model to be applied to the rendering (as a few others things, like depth of depth, shadows, etc..).

aiaustin commented 6 years ago

This is the OpenSim Mantis issue that Typhaine Artex raised on this... maybe we can get some code and constant support so scripts compile and do nothing for now?

http://opensimulator.org/mantis/view.php?id=8282

typhartez commented 6 years ago

From what I saw in the OpenSim code (I'm not an expert, I just have put a look in it), upstream developers prefer to avoid making things compiling for unsupported features (I saw the different values for Get/Set*PrimitiveParams added during the various commits).

As the Get part looked pretty simple (once you understand the underlaying logic of objects organization in the code), I thought of trying to code the Set part. using the viewer code as reference (to know where the hell material commands are received in the protocol) but as Ubit mentionned, it's not so simple, so I gave up (not enough time for that).

SundanceHaiku commented 6 years ago

Thanks Typhartez. I couldn't find anything in the documentation concerning the connection between advanced lighting and the "Glossiness" and "Environment" settings. It's nice to have confirmation - and thanks for your quick response and the additional information. I'll leave specularity turned off until the bug is fixed.

At this point, I have everything working fine in OpenSim except for what appears to be a weighting problem with the high feet. (Flat feet are just fine.) I'm using the same weight settings as flat feet with the weight of all vertices set to 1.0 to the L_FOOT AND R_FOOT. Everything is positioned fine in Blender. Yet, once in-world, the toe nails are off-set slightly above the toes. Any suggestions?

SundanceHaiku commented 6 years ago

Yes, Ai. It certainly would be nice to see this bug cleared up. It may be a little above my pay grade :).

SundanceHaiku commented 6 years ago

Everything is ready to go from a fingernail/toenail standpoint - except one last issue with the high foot. This one has me stumped. I'm going to share it with the entire community with the hopes that someone might have a solution. I explained things in detail in my Google + posting and have included illustrations. I also uploaded the blender file to my directory: Ruth >> Mesh >> Avatar Ruth >> Sundance >> Fingernail Project.

SundanceHaiku commented 6 years ago

I think we're pretty well through with this discussion. I suggest we go ahead and close it.