Manual LOD for skinned characters
by ChrisP · in Artist Corner · 09/04/2005 (5:29 pm) · 15 replies
I have made a skinned character in 3dsMax and have sucessfully exported it into the engine and animated it. I would now like to add some level of detail (details done by hand; not using the multiRes modifier). I've been having trouble doing this despite adding the detail markers for two details levels (64 and 2), trying a number of different things and getting the following results in the showtool:
1) Main skinned mesh called 'base02', unlinked - unskinned mesh 'base64' also unlinked. Result: mesh displays at detail level 2, but detail level 64 does not
2) Main skinned mesh called 'base64', unlinked - unskinned mesh 'base02' also unlinked. Result: as expected, mesh displays at detail level 64, but detail level 2 does not
3) Main skinned mesh called 'base02', unlinked - linked unskinned mesh called 'base64' to it. Result: mesh displays at detail level 2, but detail level 64 does not
4) Main skinned mesh called 'base', unlinked - linked two unskinned meshes called 'base02' and 'base64' to it. Results: nothing is displayed (I tried this as it seemed to be along the lines of what you need to do to get multiRes modified LOD to work)
5) Main skinned mesh called 'base', unlinked, and two unskinned meshes called 'base02' and 'base64', all unlinked. Results: nothing is displayed
6) Main skinned mesh called 'base', unlinked - two unskinned meshes called base02 and 'base64' linked to 'start02'. Results: both levels of detail display correctly, but looking at the shape properties, it doesn't appear as if the skin data has been imported at all.
At the moment, to try and get things working, all meshes have been the same (i.e. the detail02 geometry is the exact same as the detail64 geometry). I would have thought 3) or 5) above would have been the most likely approaches to work and tried them first. Could somebody tell me where I am going wrong, or what the hierarchy should be for hand done level of detail meshes?
Cheers!
1) Main skinned mesh called 'base02', unlinked - unskinned mesh 'base64' also unlinked. Result: mesh displays at detail level 2, but detail level 64 does not
2) Main skinned mesh called 'base64', unlinked - unskinned mesh 'base02' also unlinked. Result: as expected, mesh displays at detail level 64, but detail level 2 does not
3) Main skinned mesh called 'base02', unlinked - linked unskinned mesh called 'base64' to it. Result: mesh displays at detail level 2, but detail level 64 does not
4) Main skinned mesh called 'base', unlinked - linked two unskinned meshes called 'base02' and 'base64' to it. Results: nothing is displayed (I tried this as it seemed to be along the lines of what you need to do to get multiRes modified LOD to work)
5) Main skinned mesh called 'base', unlinked, and two unskinned meshes called 'base02' and 'base64', all unlinked. Results: nothing is displayed
6) Main skinned mesh called 'base', unlinked - two unskinned meshes called base02 and 'base64' linked to 'start02'. Results: both levels of detail display correctly, but looking at the shape properties, it doesn't appear as if the skin data has been imported at all.
At the moment, to try and get things working, all meshes have been the same (i.e. the detail02 geometry is the exact same as the detail64 geometry). I would have thought 3) or 5) above would have been the most likely approaches to work and tried them first. Could somebody tell me where I am going wrong, or what the hierarchy should be for hand done level of detail meshes?
Cheers!
#2
So for the situation above, I will have two meshes in total, both fully skinned, one for each detail level? I already have two detail markers (detail02 and detail64) both connected to Bip01 which would seem to be set up correctly as some other unskinned parts of the character (e.g. the head, which is a separate mesh) export as they should for both detail levels, so the difficulty is only for the skinned mesh.
09/05/2005 (2:37 am)
So what you are saying is that 1) and 2) are the correct approaches only for the fact that both meshes need to be fully skinned (i.e. each separate detail level mesh needs a skin)?So for the situation above, I will have two meshes in total, both fully skinned, one for each detail level? I already have two detail markers (detail02 and detail64) both connected to Bip01 which would seem to be set up correctly as some other unskinned parts of the character (e.g. the head, which is a separate mesh) export as they should for both detail levels, so the difficulty is only for the skinned mesh.
#3
One thing to note though; shouldn't the marker be called 'detail2' rather than 'detail02'? Maybe it doesn't matter though, I don't know.
09/05/2005 (5:27 am)
I haven't used manual LODs, buy yeah; I would try what Joe said. Two unlinked, skinned meshes.One thing to note though; shouldn't the marker be called 'detail2' rather than 'detail02'? Maybe it doesn't matter though, I don't know.
#4
I am hoping now that the skinning will continue to work during animation, as a bug in the dts exporter was mentioned in another thread ... fingers crossed!
p.s. detail02 is okay to use in place of detail2
09/05/2005 (7:27 am)
Okay, I think I've found out how this is meant to be done and have it importing in the showtool: for manual level of detail, as mentioned above, all meshes that are skinned should be left unlinked. However, if for instance you want to have the highest detail level mesh skinned and leave its lower detail level counterparts unskinned, then these lower detail meshes should be linked to start02 in order to be imported (the high detailed skinned mesh should be left unlinked).I am hoping now that the skinning will continue to work during animation, as a bug in the dts exporter was mentioned in another thread ... fingers crossed!
p.s. detail02 is okay to use in place of detail2
#5
this should work just fine, and provided the setup is correct, should have no problems going into the engine. The DTS exporter is incredibly flexible in regards to arrangments like this.
If you create the shape and it does not export as intended, best thing to do is to take a snapshot of the schemeatic view and post it here, as well as the last few lines of the dump file (where it outlines the shape tree and what details were set) so that we can see what it going on.
09/05/2005 (7:54 am)
Skinned meshes need to be unlinked and need a detail marker that matches the meshes trailing number. If you have an unskinned mesh (or a bunch of 'parts' of a mesh are not skinned.. bascially a segmented version of the skinned mesh) then you need to put thos in the shape tree with the correct trailing number and havea matching detail marker.this should work just fine, and provided the setup is correct, should have no problems going into the engine. The DTS exporter is incredibly flexible in regards to arrangments like this.
If you create the shape and it does not export as intended, best thing to do is to take a snapshot of the schemeatic view and post it here, as well as the last few lines of the dump file (where it outlines the shape tree and what details were set) so that we can see what it going on.
#6
Here's my .cfg file for character export:
AlwaysExport:
eye
eye01
eye02
cam
mount0
NeverExport:
Bip01
Bip01 Footsteps
Bip01 L Finger*
Bip01 R Finger*
Dummy*
Bip01 L Toe*
Bip01 R Toe*
start02
mountpoint
DELETE*
Light0
Light1
+Error::AllowEmptySubtrees
+Error::AllowCrossedDetails
+Error::AllowUnusedMeshes
-Error::AllowOldSequences
-Error::RequireViconNode
-Param::CollapseTransforms
Edit: added .cfg file info
09/05/2005 (3:36 pm)
Thanks Joe. The image is available here. This hierarchy loaded into the show tool and everything displays properly at the different resolutions. The problem now is that sequences recorded will only play on detail level 64 (i.e. they don't play on detail level 2).Here's my .cfg file for character export:
AlwaysExport:
eye
eye01
eye02
cam
mount0
NeverExport:
Bip01
Bip01 Footsteps
Bip01 L Finger*
Bip01 R Finger*
Dummy*
Bip01 L Toe*
Bip01 R Toe*
start02
mountpoint
DELETE*
Light0
Light1
+Error::AllowEmptySubtrees
+Error::AllowCrossedDetails
+Error::AllowUnusedMeshes
-Error::AllowOldSequences
-Error::RequireViconNode
-Param::CollapseTransforms
Edit: added .cfg file info
#7
09/05/2005 (3:38 pm)
Of course it will only play on 64. You need to skin both meshes if you want the animation to show up on both. (or segment the lower lod and link the various parts to the right bones).
#8
09/05/2005 (3:44 pm)
Thanks for the quick response Magnus. I do not understand exactly what you mean by 'or segment the lower lod and link the various parts to the right bones' (I would prefer not to have to skin all the meshes). I have been using the multires example (it seems to be the only example) and in that example there is only a single skinned mesh - perhaps I have missed a more appropriate example somewhere?
#9
you will need to weight the mesh to the bones and set it up as you would for the skinned mesh and it will work.
09/05/2005 (3:46 pm)
What magnus said. If you want the mesh to deform with the bones, it must be skinned. Note that the multires stuff was added to the exporter because manual skinning of several hand created details was a PITA. As it is, base 2 is just playing the animations as the mesh stuck to the bone (the exporter working as designed).you will need to weight the mesh to the bones and set it up as you would for the skinned mesh and it will work.
#10
09/05/2005 (3:50 pm)
Ah-ha - thats the info I was looking for. Thanks all!
#11
Anyway, as I said, there are some magic going on when using multires so you can't really use models set up that way as examples for doing it manually. What you need to do if you want to manually set up lods and have all the LODs animated is to either skin ALL your LODs. Or you could split your lower LOD (that is base02) up into different parts like left_leg02, right_arm02, etc, etc and link each part to the bone you want it to follow.
09/05/2005 (3:51 pm)
The exporter does some things "magically" when you use multires (why aren't you using it by the way? It's by far the easiest way to set up LODs.... sure it doesn't look _great_ but your model will be _very_ far away when it's only 2 pixels big so it won't really matter anyway).Anyway, as I said, there are some magic going on when using multires so you can't really use models set up that way as examples for doing it manually. What you need to do if you want to manually set up lods and have all the LODs animated is to either skin ALL your LODs. Or you could split your lower LOD (that is base02) up into different parts like left_leg02, right_arm02, etc, etc and link each part to the bone you want it to follow.
#12
Multires seems fine for the lower detail levels, but the above file was just a test; I will be adding higher detail levels to the model. For these, I wanted to do some nice manual stuff and have better control over the results. Anyway, reading the docs, I wasn't clear on the processes involved with the alternatives to multires, but you guys have helped clear that up. That last bit of info will be invaluable to me too.
09/05/2005 (7:01 pm)
Magnus wrote: when you use multires (why aren't you using it by the way?Multires seems fine for the lower detail levels, but the above file was just a test; I will be adding higher detail levels to the model. For these, I wanted to do some nice manual stuff and have better control over the results. Anyway, reading the docs, I wasn't clear on the processes involved with the alternatives to multires, but you guys have helped clear that up. That last bit of info will be invaluable to me too.
#13
;)
Manually skinning multiple manually created meshes is a recipe for wanting to smash your computer. It is possible.. I know because way back in the day (before multires) it was not only possible, but necessary.. try skinning 6 manually created LODs... for 5 characters.. that much weight tweaking causes madness.
09/05/2005 (7:07 pm)
Heh.. it is not covered in the docs because it is a path to pain.;)
Manually skinning multiple manually created meshes is a recipe for wanting to smash your computer. It is possible.. I know because way back in the day (before multires) it was not only possible, but necessary.. try skinning 6 manually created LODs... for 5 characters.. that much weight tweaking causes madness.
#14
(I have some odd 50 characters, which of 20 have 3 different variations... talk about going mad =)
09/05/2005 (7:11 pm)
Quote:that much weight tweaking causes madnessUrgh... tell me about it. I already do that much and more even with multires.
(I have some odd 50 characters, which of 20 have 3 different variations... talk about going mad =)
Torque Owner Joe Maruschak