Announcement

Collapse
No announcement yet.

material index issue

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • replied
    I did not wrote it clear enough. Sorry for that.
    The mesh itself has only misplaced position to where originally was rigged to skeleton. In any other way it behaves normally. I try to dig out (or recreate) some preview.

    In the meantime I try to describe this issue:

    Let say You have model of hand and model of glove rigged to same biped.
    Due to the position an orientation of had and glove was not exactly the same You have to reposition the biped between rigging hand and glove.
    When You rig it and test it inside 3dsmax it acts as supposed. However when exported to FBX and imported to UDK somewhere on the way somethings screws up.

    inside UDK the hand with glove looks like the fingers are sticking out through the glove and both meshes are misplaced.
    Meshes are placed in position according to where these were rigged, but otherways the animation runs "normally" (except the fingers sticking out where they should not of course...)

    Leave a comment:


  • replied
    I hadn't ever exported something with bones that had multiple separate meshes, but with rigid body meshes you only have to export the meshes and not any dummies or helpers. I do know though that with something that's rigged with bones it will start off using the original pose as if you didn't have it rigged and so you'd have to play the animation for it to be in the pose you want.

    Leave a comment:


  • replied
    Thanks for reply.

    So Far What I have discovered from messing with FBX export.

    Originally posted by darthviper107
    For FBX, a skeletal mesh will be separated by it's parent object--so if you want it to show up as a single skeletal mesh in UDK then all the rigged objects need to have a common parent, so like for instance a character might have the Bip01 as the parent in the hierarchy. In the stuff that I've been doing that aren't characters (rigid body animations without bones but rather the objects themselves are animated) I just link everything to a single dummy object, and then it will be one object in UDK.
    The same parent is mandatory. That is something I was aware of. However. You need to select this parent as well when exporting using "export selected" option. If You select geometry and bone system it exports as You say. It exports correctly. One FBX file and when imported it imports into UDK as exactly one animated mesh structure.

    In opposite If You do not select the parent and just select the geometry (to be precisely clear I do not know whether or not it is crucial to select whole bone system or just parent bone or parent link) FBX exporter exports everything as one FBX file BUT on import in UDK You obtain one skeletal mesh per geometrical object in FBX file.

    So Not eve You have to link the structure but You have also select the linked parent/dummy.

    On the other hand ActorX does not behave like this. My experience with ActorX is the exporter exports selected geometry regardless of You select bone system alongside or not. So I made this mistake by just thinking the FBX export behave same way or similar.

    As I wrote I do not exactly know:
    1) if You need to select whole bone system or just parent bone system or parent link
    2) If this is behaviour of FBX 2011.11 only or it is feature of all versions

    If someone could check this for other people modding, this might be of any help. I do not plan this (at least for now)

    Originally posted by darthviper107
    Physique isn't the best modifier to use, but it should export OK, you might need to mess with some of the FBX settings.
    Yup I found this too.

    Just to explain, step sideways:

    Reason Why I am using Physics modifier is this part of my work contains work previously done for other mod used with previous versions of UnrealEngine (ThieveryUT if You are interested) and I am porting these and additional models to Thievery2 (to UDK).

    Part of models ported are models made by other modelers for deprecated mod (pre Thievery2 - NightBlade for UT2k4). I rigged these using Physics not aware of FBX limitations. As a matter of fact I do not supposed to use FBX. I was not experienced in FBX export and Would like to stick with ActorX as long as possible (known exporter, nothing personal).


    now BTT

    When using biped bone system and physics modifier (not sure if this occur when using skin modifier on biped, I did not test this) The FBX export physics -> skin has following limitations.
    The position of rigged geometry resets to its original position where it was positioned when You were rigging this. Under normal circumstances this is something You do not even notice.

    I was rerigging several models and trying to combine and normalize them (to create set of bodyparts that are interchangable and coders could link them into modular pawn during game). The model files I have had was not original but exported and base stance was not exactly the same for all of them. So on rerigging I have to reposition base stance of biped few times to be able to easily rerig body parts.

    This does not cause any problem when using ActorX. However when You use FBX above mentioned repositioning occur. every piece of geometry with physics modifier is converted to geometry with skin modifier and in addition reset its position to its base position.

    Idea: To solve this probably following steps might do the trick (NOT TESTED, this is just idea how it might work!!!) save physics, add edit mesh modifier on top, move smooth modifier on top, select edit mesh modifier below the smooth modifier on top, collapse everything under, add physics modifier, load previously tweaked physics saved in first step.

    As I wrote I do not exactly know:
    1) if this repositioning occur only on physics modifier
    2) or it is due to changing base stance of biped bone system

    Material index issues I have previously described occur when using ActorX exporter. From What I have discovered thus far. This is not problem of ActorX exporter but rather the PSK import routine of UDK. The routine normally parses and imports the geometry object(s), the routine reads correct material map index assigned to face form the geometry (these are exactly the same as in 3dsmax). However, the property table creation routine of the importer DOES NOT SUPPOSE there might be gaps in index numbering!!!

    PSK importer was used in previous version where linking of textures (among other things) was done by exec import directive written in the header of unreal class. So this was handled manualy.
    When adding PSK import to UDK/U3 the automated property table buildup was added and programmers wrote the code like this:

    for ( MaterialIndex=0; MaterialIndex<Get (PSKMeshImport.MaterialCount); MaterialIndex++ )
    Create (MaterialSlot[MaterialIndex]);


    I do not blame programmers for this. The idea is correct, just nobody supposed gaps in numbering...

    Thus far I used workaround mapped face not visible from outside (i.e. hidden inside the mesh) with material 0 assigned to it. Now the ActorX and PSK import does the import correctly. I Know this is not correct solution of the problem, but it was the fastest suitable solution...

    BTW sorry for the wall of text of this.

    Leave a comment:


  • replied
    For FBX, a skeletal mesh will be separated by it's parent object--so if you want it to show up as a single skeletal mesh in UDK then all the rigged objects need to have a common parent, so like for instance a character might have the Bip01 as the parent in the hierarchy. In the stuff that I've been doing that aren't characters (rigid body animations without bones but rather the objects themselves are animated) I just link everything to a single dummy object, and then it will be one object in UDK.

    So if you want to export several skeletal meshes at the same time, you just make sure they aren't attached to the same parent object.

    Physique isn't the best modifier to use, but it should export OK, you might need to mess with some of the FBX settings.

    Leave a comment:


  • replied
    The wrong material map index numbering seems to be caused be ActorX exporter. I tried FBX 2011.11 which creates all slots (even unused on that part, which does not hurt so much).

    On the other hand when I export several separately skinned meshes single export fbx file is created. However on UDK import these are imported as one skeletal mesh object of UDK per imported rigged mesh object of original 3d file. So If I export three meshes in one fbx I Will get not one skeletal mesh as when importing PSK of these but rather three separete skeletal meshes...

    From what I have learned until now this is done by export selected -> fbx when I export all the everything containing FBX file is created as supposed.

    Is the one Skelmesh per 3d object behaviour bug of 2011.11 fbx or I done something wrong?

    thx

    {Edit}
    The separated meshes seems to be problem of selecting object without the bones/skeleton.
    Anyway the fbx has its severe limitations with physics modifier. some bodyparts seems to be misplaced strangely

    So Either way I have to rerig all body parts as skin instead or use the ActorX export at leas for now and manually edit material slots
    {/Edit}

    Leave a comment:


  • replied
    I'm not sure exactly what causes it, but I think as long as your mesh is using the same material as what it's using in UDK when you export if you have Import Material selected then it should still use the same material without screwing things up, that's if you're using FBX. At least I think that's the right way to do it. More recently it's worked that way.

    Leave a comment:


  • started a topic material index issue

    material index issue

    Greetings,

    I would like to ask for an advice in following issue.

    I am importing parts of a model to be used as a modular pawn (something like this http://forums.epicgames.com/threads/...t=modular+pawn).
    These parts are exported out from one big 3dsmax file containing all bodyparts rigged. The skin maps are assigned using multi sub material with several (actually three) textures.
    Due to using multi sub material some body parts exported have only one or two materials assigned to them and sometimes the first material of this body part is not sub material 0 but either 1 or 2.

    Importing this bodypart into UDK causes following issue:

    model import routine creates number of material slots present on the imported model part, but these slots start from slot 0. For example, my model part has assigned materials in slot 1 and 2, but the importer creates slots 0 and 1 in material properties rollout. Indexing of mesh faces is correct, so if I manually add slot 2 and link the correct material to this slot it works well. Model shows correctly mapped materials.

    Problem is when I try to reimport (due to some mesh changes). The UDK import rebuilds the properties and there is slot 2 missing (again).

    Because to I am dealing with approx 50 skeletal mesh parts with same problem its really pain in ***.

    Is there any way how to tell UDK either to create correct material index (e.g. derived from mesh material index), or force the UDK to use user defined template (script or something of similar kind)?

    Thanks McF.
Working...
X