Jump to content

My journey making myself a mesh avatar


Ags Falconer
 Share

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

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

Recommended Posts

Step 9: Working new textures and a new UV map

- Reasonably happy with the mesh. Although I know I'll make at least a few more tweaks as I go.

- Getting the UV map right has required some iteration on the mesh and a little guess work on how I might end up doing the fur. Still not 100% sure.

- The texture is being done in Gimp 2.10. Lots of work to go there. 

UV map and texture work 20221118.png

  • Like 2
Link to comment
Share on other sites

Step 11: Exporting the blender model to Collada format and uploading to the SecondLife beta grid

- Happy enough with the texture,  UV map, and how it renders to try it out on the beta grid. 

- Rigged the mesh with one of the SecondLife armatures. 

- And. Let the troubleshooting begin. 

   -- The Collada export does not include the textures. Reading through posts about that and will troubleshoot simple cube models to verify export settings. 

   -- The upload to the beta grid also has trouble. 1st, I'll inventory the names of the bones in the armature. 

   -- Ah.  Troubleshooting is a special hell....

Edited by Ags Falconer
  • Like 1
  • Sad 1
Link to comment
Share on other sites

1 hour ago, Ags Falconer said:

The Collada export does not include the textures.

I've never bothered trying to get this to work. I just upload them separately later. It costs the same in $L -- and, actually, you can preview local textures on the model to tweak things without uploading multiple times, which is arguably better.

  • Thanks 1
Link to comment
Share on other sites

Lessons along the path:

1. When exporting the blender mesh to a Collada format, I don't believe blender actually bundles the texture image into the same *.dae file. Rather it includes the image file as a reference in the Collada file. So, you still have to upload the texture image into SecondLife and edit the avatar object to add the texture to it. Then, it seems to work fine. Picture of the result below. (If someone knows I am wrong on this, please set me straight!)

2. The rigging bones had an error. 1 bone was accidently added and its name did not conform to the SecondLife convention. With that accidental bone deleted, the upload and wearing the avatar worked as expected.

Except .... something has caused the avatar mesh to deform incorrectly. So, troubleshooting of that will continue. Pic of the worn avatar also included below.

Next steps: Of course, troubleshooting the mesh deforming, then retouching the texture image to fix areas and eliminate seams around neck, waist, shoulders, etc ...

Snapshot2_001.png

Snapshot1_002.png

Link to comment
Share on other sites

Step 11a. Troubleshooting the mesh movement.

- The mesh does not move and deform/transform as desired in SecondLife. This is not an uncommon problem and lots has been written on it. So, I've read all the SecondLife Community posts I can find on the topic. One consistent item stressed in posts is to double check the direction the model is facing in Blender. Should be facing +X direction which is not the default Blender starting point in its Viewport. But I made that change already and confirmed the model does face +X prior to being exported as Collada.

- In Parenting the mesh to the armature, I used Parent (Ctrl P) > Armature Deform > With Automatic Weights. That process is described at https://docs.blender.org/manual/en/latest/animation/armatures/skinning/parenting.html

Looking at the movement of the avatar in SecondLife beta grid, the worst portions appear to be the face, hands, and feet. Otherwise, the avatar mostly moves and reacts correctly. So I am suspecting that the weights for the vertex groups need to be refined. I'll start there.

Link to comment
Share on other sites

On 11/23/2022 at 12:14 AM, Ags Falconer said:

1. When exporting the blender mesh to a Collada format, I don't believe blender actually bundles the texture image into the same *.dae file. Rather it includes the image file as a reference in the Collada file. So, you still have to upload the texture image into SecondLife and edit the avatar object to add the texture to it. Then, it seems to work fine. Picture of the result below. (If someone knows I am wrong on this, please set me straight!)

 

Edited to add: See @OptimoMaximo 's reply below.  "A rigged mesh doesn't bring its textures automatically during upload, it's a long standing bug that was never fixed. One can try all combinations of options during export, and although the texture files can be correctly referenced, the uploaded won't take them. At all. Never, no matter what."

So unfortunately it isn't going to work for your monkey.  :(

Below this only applies for Static mesh models :

 

 

 

To upload the the texture image along with the model you need to check the Include textures option in the mesh uploader.

Mesh Uploader > Upload Options > Include textures.  see images below.

I had always thought that it was necessary, when exporting to Collada , to have the Textures Options > Copy ("Copy textures to same folder where the .dae file is exported.") option enabled so that when opening in the Mesh uploader, the uploader could look in the same folder containing the model.dae and find the texture image that is referenced in the Collada file.

But apparently that is not necessary ?

Uploading a cube with a grid image texture assigned to it :

1-min.thumb.png.9127d0e686b3afdfc53410b55b6937f3.png

2-min.thumb.png.38feaa46dbd8bfc4672b4f791777303a.png

3-min.thumb.png.caa06920449e33274f6b5c9d90cd27f2.png

4-min.thumb.png.fa2dd2164a6b43dbe372789877e26221.png

 

 

As an experiment I painted on the grid image texture in Blender and repeated the export. Note that the modified image texture was not saved before exporting the Cube :

5-min.thumb.png.441f2a18e7d6d693b69441ef4d44f019.png

6-min.thumb.png.b8f3f00e5ae202490cda94fd29372c0b.png

7-min.thumb.png.4b1b20484b75dbee93d448739b26afe8.png

 

Looking inside the Collada file of the of the first Cube it seems to indicate that the image texture is to be searched for from its original location on my hard drive :

8-min.thumb.png.f2f7e529551c469c0e8bbf8fa25d76a5.png

 

but with the modified image texture it seems to be referencing the Blender file  ? :

9-min.thumb.png.4dd02b48ed746e71af22b0ec233f31cb.png

 

And with the Texture Options > Copy option checked it is again referencing the Blender file ?

10-min.thumb.png.2df5d756b802618596d6603b5ee2d31c.png

 

Deleting the resultant Image texture .jpg from the folder containing the Cube.dae still results in a succesfull upload of cube + image texture !

 

Any ways , that was just me doing some experimenting .................   As a general rule, enable Texture Options > Copy,  when you want to have your textures exported along with the model.

 

I can't think of any advantage of uploading the image texture along with the model and as Quarrel has already mentioned the best is, while still testing and modifying your image texture, to upload your image texture using the Local Textures option so that every time you modify your texture and "save" it in Gimp or PS or while Painting inside off Blender, you can instantly see the changes on your rezzed model inworld without having to continually re-upload it after every modification.

Edited by Aquila Kytori
  • Like 1
  • Thanks 1
Link to comment
Share on other sites

9 hours ago, Ags Falconer said:

Looking at the movement of the avatar in SecondLife beta grid, the worst portions appear to be the face, hands, and feet. Otherwise, the avatar mostly moves and reacts correctly. So I am suspecting that the weights for the vertex groups need to be refined. I'll start there.

Basically assume you will always need to tweak weights from the original auto-generated ones -- not just for SL but for any mesh you rig from scratch. The algorithm can only give you a decent starting point. It's particularly bad where there are several mesh pieces in close proximity, like the thighs and fingers. The face is extra bad -- if you auto-weight to the full complement of Bento face bones, you're going to have a soup of overlapping influences (like the eyebrows moving with the eyeballs) as well as weighting for bones you shouldn't rig to, like mSkull and mFaceRoot. You'll probably need to weight the whole head manually, save for maybe the neck blending.

EDIT: Turn off the "Deform" checkmark on bones in Edit Mode before auto-weighing to stop them from get used.

Also, SL is limited to 4 bone weights max per vertex. Blender can trim your weights down to that but if it generated more in the first place, you'll likely need to tweak again after stripping.

Edited by Quarrel Kukulcan
  • Thanks 1
Link to comment
Share on other sites

17 hours ago, Aquila Kytori said:

 

To upload the the texture image along with the model you need to check the Include textures option in the mesh uploader.

Mesh Uploader > Upload Options > Include textures.  see images below.

I had always thought that it was necessary, when exporting to Collada , to have the Textures Options > Copy ("Copy textures to same folder where the .dae file is exported.") option enabled so that when opening in the Mesh uploader, the uploader could look in the same folder containing the model.dae and find the texture image that is referenced in the Collada file.

But apparently that is not necessary ?

Uploading a cube with a grid image texture assigned to it :

1-min.thumb.png.9127d0e686b3afdfc53410b55b6937f3.png

2-min.thumb.png.38feaa46dbd8bfc4672b4f791777303a.png

3-min.thumb.png.caa06920449e33274f6b5c9d90cd27f2.png

4-min.thumb.png.fa2dd2164a6b43dbe372789877e26221.png

 

 

As an experiment I painted on the grid image texture in Blender and repeated the export. Note that the modified image texture was not saved before exporting the Cube :

5-min.thumb.png.441f2a18e7d6d693b69441ef4d44f019.png

6-min.thumb.png.b8f3f00e5ae202490cda94fd29372c0b.png

7-min.thumb.png.4b1b20484b75dbee93d448739b26afe8.png

 

Looking inside the Collada file of the of the first Cube it seems to indicate that the image texture is to be searched for from its original location on my hard drive :

8-min.thumb.png.f2f7e529551c469c0e8bbf8fa25d76a5.png

 

but with the modified image texture it seems to be referencing the Blender file  ? :

9-min.thumb.png.4dd02b48ed746e71af22b0ec233f31cb.png

 

And with the Texture Options > Copy option checked it is again referencing the Blender file ?

10-min.thumb.png.2df5d756b802618596d6603b5ee2d31c.png

 

Deleting the resultant Image texture .jpg from the folder containing the Cube.dae still results in a succesfull upload of cube + image texture !

 

Any ways , that was just me doing some experimenting .................   As a general rule, enable Texture Options > Copy,  when you want to have your textures exported along with the model.

 

I can't think of any advantage of uploading the image texture along with the model and as Quarrel has already mentioned the best is, while still testing and modifying your image texture, to upload your image texture using the Local Textures option so that every time you modify your texture and "save" it in Gimp or PS or while Painting inside off Blender, you can instantly see the changes on your rezzed model inworld without having to continually re-upload it after every modification.

A rigged mesh doesn't bring its textures automatically during upload, it's a long standing bug that was never fixed. One can try all combinations of options during export, and although the texture files can be correctly referenced, the uploaded won't take them. At all. Never, no matter what.

I'd be glad to be proven wrong though, but it never worked and so I quit trying long time ago.

Edited by OptimoMaximo
  • Thanks 1
Link to comment
Share on other sites

2 hours ago, OptimoMaximo said:

A rigged mesh doesn't bring its textures automatically during upload, it's a long standing bug that was never fixed. One can try all combinations of options during export, and although the texture files can be correctly referenced, the uploaded won't take them. At all. Never, no matter what.

I'd be glad to be proven wrong though, but it never worked and so I quit trying long time ago.

Thanks for the correction  Optimo,  :)

 

  • Like 1
Link to comment
Share on other sites

3 hours ago, OptimoMaximo said:

A rigged mesh doesn't bring its textures automatically during upload, it's a long standing bug that was never fixed. One can try all combinations of options during export, and although the texture files can be correctly referenced, the uploaded won't take them. At all. Never, no matter what.

Gotcha! Very helpful. And the difference between a static mesh and a rigged mesh helps clarify this. 

Thank you!

Link to comment
Share on other sites

Step 11b. Refining the mesh movement.

Feeling like I am making progress. But definitely not yet at my desired destination.

I've worked out the model, the texture, the armature, the export to a Collada file, and the import into the SecondLife beta grid. And I'm still working through a few details. One new lesson learned: all vertices in the mesh should be included in at least one vertex group and given a weight to determine influence from the armature. Without good vertex weights, you get a seriously deformed avatar in SecondLife. Thanks again to @Quarrel Kukulcan for offering that knowledge.

On 11/23/2022 at 4:32 PM, Quarrel Kukulcan said:

Basically assume you will always need to tweak weights from the original auto-generated ones ...

 Still, even with all vertices grouped and weighted, something is not as desired which is causing the spike in the face as shown in this pic.

- Doing a deep dive into Blender's bone envelopes and head and tail radii. After tweaking envelopes and radii for all the bones, I'll do another upload and check out the avatar.

Snapshot2_004.png

Link to comment
Share on other sites

Hm. That could be a vert with no weighting, or weighting to a bone that isn't exporting, or weighting to a bone that SL thinks is in its original position when you've actually moved it.

You can get a better idea which vertex it is by turning on wireframe mode in SL. The hotkey is Ctrl-Shift-R in some browsers, including the basic one IIRC.

Asymmetric errors like that can easily creep in if you make so much as one single edit while mirroring is on when you think it's off, or vice versa. This may or may not be what happened here, but it's something to watch out for regardless. Mirroring errors are harder to fix than to prevent IME.

  • Like 1
Link to comment
Share on other sites

On 11/26/2022 at 9:28 AM, Ags Falconer said:

Step 11b. Refining the mesh movement.

...

 Still, even with all vertices grouped and weighted, something is not as desired which is causing the spike in the face as shown in this pic.

- Doing a deep dive into Blender's bone envelopes and head and tail radii. After tweaking envelopes and radii for all the bones, I'll do another upload and check out the avatar.

Snapshot2_004.png

Results: looking into Blender's bone envelopes and head/tail radii, I learned that those are used within Blender to *generate* vertex group weights. Those are an alternative to Automatic Weights and other methods for setting weights. But they got nothing to do with exporting to Collada or uploading to SecondLife. So. Onward.

Turns out the spike shown in this pic was caused by 2 bones (i.e., mFaceCheekUpperLeft & mFaceCheekLowerLeft) that had gotten unparented from the mFaceRoot bone during editing. Without being properly parented within the bone hierarchy, they don't act as desired as shown in the pic. Found that problem by looking through the skeleton hierarchy.

Thanks to @Quarrel Kukulcan for your suggestions. They helped me work thru the issue.

On to the next challenges!

Link to comment
Share on other sites

Step 11b continued: Refining the mesh movement.

- I don't understand what is causing the difference in size between the uploaded model. See pic. On the right is the model when I rez it on the ground. I scale it during upload to that size--roughly 1.6m tall. When I wear the model, it shows as shown on the left. I turned on Show Bones and you can see that the skeleton of the avatar is roughly the size of the rezzed model (right).

Thoughts?

Snapshot015 5 w bones.png

Link to comment
Share on other sites

23 hours ago, Ags Falconer said:

Step 11b continued.  Still working on the vertex group weights in blender. I assume that is the problem shown in the post above. But not having too much luck yet in getting a good fix on place.  

It's very strange. I don't see any bones displayed inside the head & arms to explain why the mesh has moved.

(FYI, when you display bones in SL, red means a bone you've moved to a custom position, aqua means a bone your mesh uses in its default position and green means a bone you've neither moved nor weighted to.
https://community.secondlife.com/knowledgebase/english/enhanced-skeleton-project-bento-r773/ )

Does everything look fine when you rotate bones in Blender's pose mode? Go through every bone you think you're rigging to.

Have you applied all scaling/location/rotation to your mesh and your armature? Do you have any modifiers on the mesh other than Armature?

 

  • Like 1
Link to comment
Share on other sites

On 12/7/2022 at 1:24 PM, Quarrel Kukulcan said:

It's very strange. I don't see any bones displayed inside the head & arms to explain why the mesh has moved.

(FYI, when you display bones in SL, red means a bone you've moved to a custom position, aqua means a bone your mesh uses in its default position and green means a bone you've neither moved nor weighted to.
https://community.secondlife.com/knowledgebase/english/enhanced-skeleton-project-bento-r773/ )

Does everything look fine when you rotate bones in Blender's pose mode? Go through every bone you think you're rigging to.

Have you applied all scaling/location/rotation to your mesh and your armature? Do you have any modifiers on the mesh other than Armature?

 

@Quarrel Kukulcan, thanks for the suggestions. I'll work through each of those and post what I find. I appreciate you!

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 517 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...