Jump to content

Skinned mesh export in 3ds max


Bentley Squeegee
 Share

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

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

Recommended Posts

Hello, I solved my issue in a jiffy, however now I have run into another issue... The actual exporting of the mesh with skin weights. I have followed the instructions on the SL wiki and after trying to export the mesh with the modifier on its own and the mesh with the bones,  I have come to a head where by I cannot seem to find the lines of code needed to be changed within the document, once the dae has been exported and nor is the mesh showing any available skin weights in the uploader.

 

I have the fbx plugin on my max 2010 installed that the wiki suggested. I would be really greatful if someone could provide a or indepth guide or at least some pointers to get me on my way to at least being able to get this out of 3ds max with its weights.

 

Regards and thankyou in advance

 

Bentley

Link to comment
Share on other sites

Awesome, Now the upload sees the weighted stuff, but its twisted on its side when adding it to the avi (Quardoped)  However I have followed the instructions with the z-up for the up-axis, Not quite sure whats going wrong here :/ Is there a particular way that my model should be rotated? or some other method point I am missing out that is twisting it?

 

Thankyou for your help so far once again kwakke, Its always appreciated

 

Bentley

Link to comment
Share on other sites

Coolio, I have reset the xforms on the mesh and the bones, interestingly the bones grew quite a bit bigger and flipped on their side, So if this is the case, Should I flip them so they are standing back up again? or does that defeat the object of resetting the xforms? Otherwise ill have to rig it on its side :P lol

Link to comment
Share on other sites

This is a skeleton I imported from blender, it works perfectly in control terms so its all good to go in that sense, however when I reset the xforms on the pelvis (the controlling bone) :P it flips on its side, Should I rig it on its side or should I flip[ it back up so its standing straight?

 

Regards and thanks for all the help so far

 

Bentley

Link to comment
Share on other sites

Rigging isn't exactly my field of expertise, so I'm not sure if there's an easy way to rotate your current skeleton. Working on a rotated skeleton, no matter how it appears in your viewport, will likely give you issues.

I think the easiest way to get a good skeleton is using SLAV, you don't have to get the paid version, the free one has all you need. This unfortunately means your adjustments will be lost.

Link to comment
Share on other sites

Ok I got your email so ill help you but in the forum so I think is better for we all :P

 

First thing. You CANT modify as you want the defaut SL skeleton. I see you made a cuadruped from it but technically you cant rotate bones or the skeleton will be wrong. But lest talk about this more indeep later.

Second thing. DONT EDIT MANUALLY the bones set using the notepad. That method doesnt work most of time (used to work before, but not now, you end with bones rigged to different parts and all messed....), also dont use that executable file recommended in the website, mess your mesh just like when you edit manually.


I'll teach you a different way of fixing bones.

This apply to every mesh, so once you know how to fix the bones, we can look into others problems in your rigged model.

First rig your mesh as you could do always. Make sure that the max bones influence in the skin modifier is set to 4, so you dont rig the same vertex to more than 4 bones which is not compatible. Once you have done the whole rigging process, now add to the skin modifier the rest of bones that you didnt use. You rarely will use all bones even when you make a full avatar so now is time to add those bones that left.

Ok, now you should have all bones in the skin modifier. Now set the max bones influence to 26 or higher.

Select one vertex that is weighted to a single bone (a vertex with 1.0 of weight, this will make easier later to revert to its original weight). For example, lets say that we choose one vertex from the head that have 1.0 weight to the mskull bone.

Now select a different bone, and rig that vertex to that new bone. For example, start weighting it to the right eye, then select the left eye and weight to it too, then to neck, torso, etc...


When you finish with all bones, weight again to its original bone (1.0 to mskull). What we got with this? We got a single vertex that shows in the edit weight panel all bones with 0.0 weight except the mskull one that shows 1.0.

If you export your mesh now, it will contain all 26 bones/joints info, so you dont need edit your mesh wit notepad anymore and you also make sure using this method that everything is perfectly in its order and place.

 

 

ok, now the other problem. As I said before, you cant rotate your bones (asides of the pelvis in case you want make it to face the front viewport). You CANT either use resset Xform. SL bones need a special setting, and is that all of them need to be with <0.0, -90, 0.0> rotation (if I remember correctly). When you apply resset xform, you make your bones to be <0.0, 0.0, 0.0> which doesnt work with SL.


So, how can we edit the bones? I can tell that editing the bones will be a pain if not impossible. But there is a workaround and is using meshes as bones. Is very easy and I used this method to build my own skeleton while mesh was on beta before when MaxSLA didnt exist yet. I build mine using the default coords that there are inside of a file in the SL client, but you can do your own one using MaxSLAV as reference.

 

First make a skeleton with MaxSLAV. Dont change anything, just make the skeleton. Now make for example a box or a dummy if you want. This will be our joint, so dont make it too big and either too small so you can select them correctly later.

Select that box/dummy, use the align tool and align with mpelvis bone (just the position). Then rotate the box/dummy -90 on its Y axis so we get our <0.0, -90, 0.0> rotation. Name the dummy like the bone (mpelvis).

Now do copies of the box/dummy, align with the rest of bones (you shouldnt need rotate them anymore since they are copies) and rename all of them to get the same name of the joint that is aligned with.

After all this, you should save your "skeleton" made of boxes/dummies for later usage so you dont need to remake it everytim.


Anyways, it still being boxes or dummies, not bones. So go to the edit bone panel and check the box "bone" so that mesh or dummy acts now as a bone. Now you just need start linking them together in the same hierarchy than the default SL skeleton.

 

Now, when you want rig your cuadruped you need to do the following. Unlink all bones (the ones we made out of boxes/dummies). Now edit them but only moving them, remember that you can rotate the bones. Place each bone on its place. After you are done with this, link again all bones together (I recommend you that, before unlinking them, go to hierarchy view and save the position of the hierarchy so you can later use the hierarchy view to link them again more easilly).

After you have done this, you can rig your cuadruped or whatever you want and export (remember to do the trick of the vertex with 26 bones).

 

Things to keep in mind: Never rotate the bones, check carefully that the bones are in the proper original hierarchy, dont forget to add all bones with the trick of the vertex and dont forget either to check "skin joint" on the uploader.

I did a custom small avatar with this method and worked fine. Dont try to make with MaxSLAV skeleton, isnt even correctly made at 100% (have wrong rotations on the neck, but still works for clothes and such).

 

Sorry for the long text, but isnt easy to explain and english isnt my main language. If you still dont understand something or you stuck at some point, let me know, ill subscribe to thread.

  • Like 3
Link to comment
Share on other sites

WOW, I emailed you around an hour ago and you replied so quickly with such a comprehensive guide to doing things in max and with bones, Thankyou ever so much.

 

I will follow your steps carefully and recreate thebones of the quadroped using your method, If I have any fuirther questions I will ask.

 

Thank you so much once again.

 

Best regards

 

Bentley

Link to comment
Share on other sites


Kitsune Shan wrote:

 

I did a custom small avatar with this method and worked fine. Dont try to make with MaxSLAV skeleton, isnt even correctly made at 100% (have wrong rotations on the neck, but still works for clothes and such).

First of all, thanks for jumping in.

I didn't have any issues with making a small avatar using the SLAV skeleton. Not with the neck, not with anything else. Can you point out what the problem is?

TinyAv.PNG

Also, you IMed me the bone fix a while ago and now it's on the forum. Could you add it to the wiki when you have some time? I really think it should be there for everyone to see, instead of hidden on some forum page.

Link to comment
Share on other sites

The problem with bones is mostly that you cant edit them correctly without messing them.

Since they have already an resset xform modifier, if you unlink, enter in edit bone mode and move them, they will get weird rotations after relinking them. This is just because they always look at their child bone, which is really what they are supossed to do, just that SL doesnt works well with rotations on bones.

So yes, maybe just to shrinki an avatar is fine, but when you start moving bones around, is hard and "weird". Making a custom skeleton with few dummies or meshes is just really simple, you only need to do it once and you can reuse everytime you want. Is really perfect for custom avatars since you can move them freely without even using resset xform.

I will write that on wiki, thanks for the reminder ^^

Link to comment
Share on other sites

Hi again Kitsune

"Ok, now you should have all bones in the skin modifier. Now set the max bones influence to 26 or higher.

Select one vertex that is weighted to a single bone (a vertex with 1.0 of weight, this will make easier later to revert to its original weight). For example, lets say that we choose one vertex from the head that have 1.0 weight to the mskull bone.

Now select a different bone, and rig that vertex to that new bone. For example, start weighting it to the right eye, then select the left eye and weight to it too, then to neck, torso, etc..."

 

I am actually new to rigging in 3ds max as my area of expertise is more within hard objects. How might I actualy go about this process, How do I select the vertice and weight it to the different points?

 

Thankyou again in advance

 

Regards

Bentley

Link to comment
Share on other sites

I updated the wiki and added the whole process to the section of "Gotchas and workarounds".

 

https://wiki.secondlife.com/wiki/Mesh/Exporting_a_mesh_from_3ds_Max#Fixing_number_of_bones

 

Let me know if that makes it more clear or still needs some explanation. Anyway, answering your question, you just need select a bone in the skin modifier after you added all of them and use the Weight Tool for that. The process is really easy and simple. Can be done in few seconds. Is just a bit confusing to explain for those that aren't really used to the name of tools and options in 3D Max (which I really understand :) )

Link to comment
Share on other sites

However I do have another question, When creating my own skelton with the dummy boxes in the way in which you described, How exactly would I create the rig shown below? It needs to be exact as its for a third party accessorie for an avatar. I imported the rig below from the blender file they gave me to use, however its still messing up so I can only guess its the transition of the bones thats reeking havok on the structure. Would I have to change the box shapes and then attach them?

horse-rig.png

Regards

 

Bentley

 

P.S. I also have a blender image with the same rig and bone names should you need to see this for reference.

Link to comment
Share on other sites

First, dont use an imported skeleton from another application. Even skeleton imported from exported 3D Max files like DAE or FBX trends to get buggy.

The first that you need to do is to reproduce the default SL skeleton. Dont start making it for a quadruped. Just start making it as a normal avatar. Then, without changing anything like can be size of the skeleton or rotation to face the front viewport, try to rig something simple like a copuple of attached boxes to see if the skeleton really works.

Once you know that the skeleton really works, then you just need unlink all bones that you made with dummies or boxes, and move to each joint location in your cuadruped. Then link all bones again following the same hierarchy.

You just need move the dummies/boxes (in my case, I always use spheres with the minimum quality, then they looks like a "diamond" which makes easier to understand, but this is upt to each person).

 

So first make your own SL skeleton, check carefully the name of each bone and link them using this hierarchy:

 

2013010900001443.png

 

Then select all bones/dummies, go to Animation > Bone Tools, scroll down and check "Bone On". This will convert any kind of mesh, dummy or helper into bones. Your skeleton should look like this. Remember that you are just building the skeleton over the MaxSLAV one so you get the position correctly. For this just make a default skeleton using 1.0 as size and not 40.0. You will get a very tiny skeleton facing to the right viewport.

20130109000243344.png

 

Now test your skeleton rigging something simple. If works, then you just need select all bones again, uncheck "Bones On" and unlink all them. Now you can manipulate each joint freely as you want. Just make sure that you dont rotate/scale them. Just move to each position of the cuadruped. Then link all again and turn ON bones as you did previously.

Of course, this kind of avatars may require custom AOs to work since is a cuadruped you cant expect it to work correctly with default animations. It should end looking something similar to this:

20130109002025239.png

 

As you can see, I just moved the dummies to where each joint was supossed to be.

 

PS: Try to make each bone with zero rotation. I think isn't necessary to have -90 on the Y axis. Just test by yourself and see if both ways works.

Link to comment
Share on other sites

Thankyou once again for the comprehensive low down on how to make it all work, I created a successful rig that works in human form with the rotations, Then as a quadro ped it did not work so instead I changed their rotations to zero, Perfecto, it works the correct way up, but now I am getting the following issue and Im not sure how to go about fixing it, Firstly My mesh was very large and mashed up, So I did a second upload with joints incluided to see exactly what was going on, pictures are below:

 

Snapshot_003.png

Snapshot_004.png

 

And this is roughly the size it should be to fit the avatar:

 

Snapshot_006.png

 

I am not sure if its simply a case of moving around the points, or if Im doing something wrong, I also tried scaling both the bones and the rug in 3ds max to see if that would remedy the issue but it does not :(

 

Regards and thanks again for all the help

 

Bentley

 

(Please also bare in mind that I let the enevelopes do the rigging for me hence the terrible stretching in the correctly sized version, I wanted to see if it was going to work before going full on with rigging and then it not work like above.)

Link to comment
Share on other sites

When you work with meshes and 3D in general, there are two types of "scaling" meshes.

One is transform and the other are the real size. When you use the common scale tool, what you are doing is a virtual transform on your screen, but the size of the mesh still being the same. If you resize a box and make it bigger, then while you have selected the box, do right click on the scale tool button. You will see a little dialog that display the size in %. You may notice that it shows more than 100%. This means that the actual size of the mesh is lets say 200% (for example) but if the mesh was 1 meter high, the mesh will still being 1 meter for 3D Max and also for SL instead of 2 meters. We could say that there is a difference between the world scale reference size and the local real size.

So, when you make rigs, you cant resize them just selecting all bones and changing the size. You can change the size just changing the position of the bones. Or you can use the scale tool, but then you need to do an resset X form on all dummies/boxes that are part of the skeleton. And this need to be done before they being linked and converted to bones.

First check what kind of measure are you using in 3D Max. You cant just put the bones as they are. Make sure you work with meters. Go to units setup and set meters, then in advance set 1 unit = 1 meter. Your custom skeleton or the one made by Max SLAV should looks very small in this way. This mean that the skeleton is correctly made.

Second, take in account that you are making a mesh for an avatar that already is using custom joints positions. This means that the skeleton needs to have the EXACT position than the one done for the avatar, otherwise your mesh will change the joints overriding the ones that the avatar already have set.

If you have the original skeleton used for that avatar, then just place your joints and align them to that skeleton. Then you can mimetize the same structure of that custom skeleton made for that horse. You can even check their rotations so you make your skeleton exactly as the horse one. Then you should be able to build your mesh properly.

Also, I never used, but there is a tool to resize rigged meshes in 3D Max. I think is under the animation menu or something like that, I cant remember exactly. But you may be able to google a little about it in case you can find it.


What you are trying to do is kinda tricky if you havent the original avatar and skeleton. Even if you have them, if you are importing them from Blender, still kinda tricky due the differences on measurements.

Link to comment
Share on other sites

Cool thanks again, Rightio well this skeleton is the original skeleton but yet it is imported from blender, I used my initiative before hand and infact alinged my bones to them, However I did not mimic their rotations, so maybe I should try that as that could be casuing the issues couldn't it? Is it possible to use the align tool on these bones and tick the align to rotation boxes to? so it copies those over? Or will I need to input the rotations manually?

or it seems either the lengths are wrong which is odd considering its actually exactly the same in appearence to the one in blender, or I am infact Just needing to rescale it? I will try them all and see what comes of it, if not I suppose I will have to rig it in blender which I am not looking forward to, mainly becuase its a horrible UI and apain in the butt to use lol

 

Regards,

Bentley

 

 

Link to comment
Share on other sites

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