RuthAndRoth / Ruth

Virtual World Mesh Avatars
26 stars 15 forks source link

HUD design - alpha cuts and materials #21

Closed AdaRadius closed 4 years ago

AdaRadius commented 5 years ago

As I just posted at MeWe, I have a color palette that will work for the alpha cuts, so those of us with alternative color perception can see it.

I need to know the best way to set up the cuts so that they can be scripted. I'm not a scripter but I've worked with some good ones, and can follow directions :) Will you be scripting for mesh objects (cuts) as well as materials (8 max per mesh object inworld) or just cuts? There was some discussion months ago at MeWe and more at G+, I think, but I don't know show it ended up.

I'm referring to standards for dressmaking to come up with the cuts, (sleeve length = cap, short, elbow, 3/4, bracelet and long, for example) and it ends up looking like a checkerboard with the vertical and horizontal considerations, especially on the torso. To get to Sundance's design on the hips, I'll have to make some knife cuts on the model - not a problem, as it's triangulated when it comes inworld anyway.

ocsean commented 5 years ago

I completely rewrote RothTooRC1 HUDs to use the names and descriptions of every linked object instead of link numbers. This way we don't have to link in a certain order for HUD or Body nor do we have to create a list of link numbers for any reason. Considering how much of a pain linking order is, I would suggest using at least something similar. (FYI, This will not likely be compatible with older versions of the code.)

I only scripted for the cuts, not the materials. This should be fine as long as the HUD model is identical to the body in cuts and materials. In other words, whatever HUD model face/material was clicked will also be the face that is affected on the body.

AdaRadius commented 5 years ago

@ocsean Thank you!! OK, I'll name them if possible to clothing terminology - SleeveRtCap, SleeveRtShort, SleeveRt3-4, SleeveRtBracelet, otherwise body part names.

Is this the HUD the scripters are settled on for RC#4? If someone wants to rebuild with a different HUD it's not technically difficult to rename the bits - a complete PITA but not rocket science. I would certainly rather use names :)

More perpeturally-noobish questions: How far back is this HUD compatible? Will it work on Kitely - the largest grid running a version of .8 (I think)?

There will be more cuts this time - the last cuts did not take into consideration enough of the needs of clothing designers. I'll try to design it so that fewer cuts with materials scripting could be done in future, if someone wants to script it - it was just a hint in the forum, not developed beyond that as far as I know.

seriesumei commented 5 years ago

Ada, I kept Shin's original names for the body parts but did the list-o-prim approach to avoid the link order problem. This left my new HUD compatible with the older receiver scripts. I don't know how important that is for others. I can go either way actually, but doing the lookup in a list isn't too hard and lets us have multiple parts with the same name respond to the same click without having to code for it explicitly.

I am not married to the names we have, if backward compatibility is not a priority there are a couple of other changes I'll make too. I do think it would be nice to have a single naming for all of the parts though even if the scripts end up being different in different packages.

AdaRadius commented 5 years ago

@seriesumei I don't know what that means - what should I do on names? The cuts won't resemble Shin's much, as I'm basing them on clothing.

seriesumei commented 5 years ago

OK Ada, do what is going to be best going forward. If we can make it work with older bits that will be great, if not, well, time marches onward. :)

AdaRadius commented 5 years ago

OK and thank you! That said, I can make compromises, a lot of them, as far as dress design is concerned. But what I do has to work with what you and Sean are doing. So if I come up with something that's unworkable for a HUD, I'll redo it. Once I have the layers and basic dressmaking shapes worked out in Photoshop, it's not a big deal to do some repainting. The actual cutting and naming, back in Blender, is only half an hour or so.

aiaustin commented 5 years ago

I agree with Serie.. we are moving on now. A really good Ruth RC#4 (and perhaps Roth next RC) could set the scene for how we hope to create a proper release. So this is a good time to take on board all the feedback and lessons learned. Accommodation of previous clothing and attachments is useful but can't hold back on getting things right. That is what release candidates are for.

ocsean commented 5 years ago

I'm not tied to any particular way of doing the HUDs for the official Ruth 2.0/Roth 2.0. If there is an easy way to avoid having to link in a particular order, or even just not having to deal with links at all, I'm okay with it. I would suggest going with @seriesumei's way to program around it; I don't have a lot of RL time to devote to it, and I'm guessing Serie is pretty knowledgeable considering the sensible comments I have seen of hers.

Also, my RothTooRC1 HUD/Body lsl code completely changes the way channels are used to communicate, as well as everything is encrypted. So, I suspect we may want to try to use something compatible with previous versions instead of completely changing everything about the lsl code, or at least make it somewhat similar to previous Ruth 2.0 versions. My RuthToo/RothToo are special derivations that are not compatible with official 2.0 versions, which is why I differentiate them with the special names.

@AdaRadius, I believe naming in Blender does not equate to naming in OS/SL. I am pretty sure upon upload it just takes the primary link name and appends numbers as each successive link name. So, renaming within OS/SL will be required if we use names at all anyway.

@AdaRadius, I am fairly certain my RothTooRC1 HUD/Body code works on all versions of OS/SL. I have not tried in Kitely; I avoid Kitely like the plague. But I have tested it in HGluv, OSgrid and DigiWorldZ. Also, since my RothTooRC1 has many more alpha-cuts than the official Roth 2.0, it could never be interchangeable with Roth 2.0. So, I wasn't worried about making it compatible.

Geeze, I guess I've written the first chapter of my Ruth/Roth novel. Next will be the courtship and wedding chapters. LOL

AdaRadius commented 5 years ago

And it's a ripsnorter of a novel :) I have a question: I'm nearly done slicing and dicing the alpha cuts. Should I make a root object to be the final (active) piece, as I select, or just choose something logical, like the front neck? Does it matter what my selection order is in Blender?

I have two versions going - 1) fewer cuts but separate faces for each color in that piece, in case anyone wants to work on scripting for faces in the linkset. 2)cut the way it was done for RC3 - each piece that is to be alpha is separate. As far as I know no one has tried scripting the HUD for faces, but the workflow in Blender lent itself to setting it up that way, so it wasn't more work to do it except for a bit of fiddling with materials.

I don't care how you all want to do make the HUDS, and am happy to make any changes to make what you're doing easier. There are A LOT more pieces this time. The alpha HUD is to make clothing work. I started with Sundance's post-RC3 layout, swapped out the colors with my colorblind palette, and cut it up the way an OCD dressmaker might.

seriesumei commented 5 years ago

Ada, doing faces is actually already included in the RC3 scripts, see https://github.com/RuthAndRoth/Ruth/blob/master/Mesh/Avatar%20Ruth/Scripts/ru2HUD_ac_trigger.lsl#L27 for the list of parts, the last number on each line is the face, with -1 meaning ALL_FACES. Some parts already use faces (arms, buttcrotch, feet) so this is not a hard change to make. If we are tossing compatibility with older versions I'll make some changes to the way the HUD talks to the body and teach the body parts to talk back :). (Spoiler: I'm doing that already anyway)

As far as the root object I make the chest the root of the doll body when I import it. That is only really important because I make my HUD with a script and it needs to know the position and rotation of the doll to properly position it. I've found that OpenSim and SL do not agree on those values anyway so for me it is just convenience and a bit of a neatness thing. It is nice to use a part that is centered on the body for positioning.

aiaustin commented 5 years ago

We had a “parts list” order which may or may not be relevant now. Documents are in

https://github.com/RuthAndRoth/Ruth/tree/master/Mesh/Avatar%20Ruth/Scripts https://github.com/RuthAndRoth/Ruth/tree/master/Mesh/Avatar%20Roth/Scripts

Main thing is to properly document the assembly process and any order specific information going forward.

AdaRadius commented 5 years ago

OK! This is encouraging, thank you!!!

Especially since Sundance's and my combined wishlist has 348 parts, which, by assigning between 5 and 8 faces to each cut, yields around 60 bits, and it should really be um, a smaller number. I realized by last night that it also needs to be easier for subsequent designers to correct errors and have other opinions on items such as pant/skirt lengths* and node settings. Yes, parts list, numbered. Then I can click up the outliner list, ending at zero and we should be in order.

[*Which I have currently labeled boyshort, micro, mini, jamaica, bermuda, knee, belowknee, pedalpusher, toreador, capri, maxi, and ankle, each with 8 vertical divisions, and that's after consolidating cuts Sundance and I would each like to have. Givenchy and Dior got nothin on us.)

I think a piece currently called 'underbust' is closest to the center, so that can be ground zero. But I should add a cube to the inside of dollbaby's body, easier to orient, and easy to delete if it doesn't work. I avoid creating in SL, and didn't realize it has different orientation than OS now. But then the meaning of zed varies among 3D software as well as game platforms, so not that surprising.

I'll see if I can be cleverer today.

aiaustin commented 5 years ago

Ada wrote: I avoid creating in SL, and didn't realize it has different orientation than OS now.

Interesting as I have seen the warning about orientation of the avatar mesh on uploads. And as the mesh loads when attached to the avatar on slower links it does show for a second or two as laid across at right angles to the body!

AdaRadius commented 5 years ago

Do you need the parts list to includes faces? How should it be worded?

Do you know how Blender materials translate to face numbers inworld?

I have been careful to be consistent from object to object as much as possible. Each part has identical materials - 8 each - but not all parts use all the materials.

seriesumei commented 5 years ago

Austin: the differences I saw between OpenSim and SL were in the position offsets. I don't remember which was which but one used the position of the root object and the other seemed to use the center of the linkset.

Ada: The faces do not need names, they are deterministic and can not be changed outside Blender as far as I know so numbers are fine. Once we set them we will want to do our best to not change them in Blender or the alpha HUDs will need to be updated. Hmmm, actually, the only real requirement is that the faces on the doll match the faces on the body being modified, we detect the face number from the click. Just the same, once we set it we'll want to keep it for compatibility going forward. But we do not have to worry about not changing things until we do a release so we have time to figure it out and get it right.

AdaRadius commented 5 years ago

Serie: I think my question is: does the order of the materials in Blender determine the numbering of the faces inworld? I'll take the doll inworld and see if I can figure it out.

seriesumei commented 5 years ago

Ada: I think the order is the same in both but I've not done more than simple objects in Blender. The only time I think the face order will matter is if/when we want to put different textures on different faces and the texture applier would need to know which face to specify.

AdaRadius commented 5 years ago

OK. I'd like to do this so that scripting is easier. So far, I crash when I try to upload the doll, so there may be more to it.

seriesumei commented 5 years ago

I had trouble uploading your test earlier, I figured it was something I was doing. FS 6.0.2

AdaRadius commented 5 years ago

I got Ms. AlphaCuts to upload and am looking at it now. I'm not sure what I was doing wrong the first time, maybe nothing, lol. The bad news is that is looks as though face numbers are assigned randomly, have nothing to do with the order or name of the material in Blender. I'm going to futz around with different export settings and see if I can improve anything.

AdaRadius commented 5 years ago

AND each link is named , randomly, according to the name, in Blender, of the Object data (edit mode name) of the last piece selected, the active link. As in "01CenterCube#45". But randomly, nothing to do with the order I selected them in Blender. Yikes. One thing I can do at least is renumber the parts list to start with 00 so that the arbitrary inworld naming at least matches the Link number. Gack.

seriesumei commented 5 years ago

Ada: eek! So I wouldn't stress too much about link order or link names. If it is not going to honor what you name parts in Blender then we'll be re-naming it after import anyway. I had to do that with the RC3 parts, it was annoying but not terrible. All the more reason for us to get a good reference and make it easy for folks who want to grab the mesh in-world and do other cool things (/me looks in mirror :).

AdaRadius commented 5 years ago

Serie: ya. I have a logical numbered list in Blender, and also in a text file. I'm still futzing to see if there's any way of making this just a little easier. With 55 pieces and something like 350 unique faces, that's at least worth doing :)

AdaRadius commented 5 years ago

Kayaker Magic was inworld last night and I got an answer on the faces ordering - they're alphanumeric, from the materials in Blender. So I set up a file just for exporting, numbered the materials, cleaned out source objects and their material lists. Yellow is face 0, cyan = 1 and so forth. Kayaker also suggested that relying on any order in the objectson upload is unreliable, better to name them inworld and script accordingly. So there it is.

I baked the colors ( UPPER and LOWER done, I still need to bake the feet) to give us a texture inworld. I don't know if that's the way to go with the HUD, or if you'll need each face with a blank texture, colored with the RGB values.

But I should have blend files to upload after I do some cleanup and finish documentation, and a model inworld I can hand off to you in a few hours.

Then a little break :) then Roth. This is fun, except when I can't figure out stuff, lol.

seriesumei commented 4 years ago

Closing, this will all be re-done with the new simpler alpha cuts on the Ruth2 v4 and Roth2 v2 meshes.

Elizaangel commented 1 year ago

Hello guys! I'm new to the project! I really wanted to understand about the scripts part. Would there be a video tutorial showing how to make the script?