Jasana_BugBreeder
8th Oct 2006, 8:35 AM
Hope these would be helpful to someone :)
I already almost forgotten to write this, so I decided that I'd better write short instructions, since it might take months before I get to write a normal tutorial :(
These instructions assume that you are already familiar with package structure; experience of renaming/adding/color-enabling mesh parts will be handy also.
So, to make object visible in Neighborhood View, you need a (specially prepared) copy of scenegraphic resources, and a small correction in the 'original' package. I guess they can be safely added to 'original' package, but preferred to save them in separate one.
So, say, you already have a working object, with that unique name part (which you change via Fix Integrity dialog), for example, 'myobject-10.08.2006'; your object's mesh has 1 subset which named, for example, 'mesh1'. (By the way, you can pass not all mesh subsets to the 'neighborhood version' of the object - from now on, I'll refer to this version as LOD90 object.) Say, this object has 1 recolor - TXMT name is 'myobject-10.08.2006_mesh1_color_txmt'.
First, let's make the changes in the original package.
1) to GMND, add cDataListExtension, Name = tsDesignModeSlaveSubsets, values of type String, number of items is the number of items which will be included in LOD90 object; for each item, Name is the name of existing subset, String is Name+LOD90 suffix. Example (as it would be displayed in item list): mesh1 = (String)mesh1LOD90.
2) in CRES, add cDataListExtension, Name = GameData (it may already exist, if does, modify existent). Add item of type String, Name = LODs, String = 90. (Item with such name may be already present - with empty value - modify value, if so.)
3) in SHPE, on Content/Level of Detail Listing tab, add value 0x0000005A.
Done with original package, let's create the LOD90 package.
LOD90 package must contain no joints (at least it's so for Maxis objects). If your object has no joints, you probably can just clone it and delete extra resources; if it has joints (my object had), clone (by CRES name - use Resource Finder to find all resources with name ending on lod90_cres, and choose appropriate one) an existing chain of LOD90 resources - I picked the one with the same number of subsets as I need, it's up to you which would be easier to adjust.
When doing Fix Integrity, it's important that LOD90 object name is 'original' object name plus LOD90 suffix - i.e. 'myobject-10.08.2006LOD90'.
Note 1: well, I guess it's important for CRES only to have exactly the same name (with just lod90 addition) as original suffix; I had SHPE names with more differences than just lod90, and game eaten it.
Note 2: since LOD90 object has only these resources, you would be able to do FixIntegrity just once - I mean, if you'd do it again, SimPE wouldn't detect the 'unique name' part of resource name, and will just add new name as prefix, instead of replacing the old name.
So, making changes in this new package:
1) in GMDC, mesh subsets should have names with LOD90 - i.e. 'mesh1lod90' - use this name in all related resources, such as TXMT and Parts tab of SHPE; usually, though not required, lod90 meshes have less vertices than normal ones
2) GMND doesn't need the tsDesignModeEnabled block, but list of available TXMTs for a mesh subsets is present and correct, so I suggest to update it - not sure if it's required, though
3) adjust TXMTs. Important: you must have TXMTs matching all available recolors for 'inherited' subsets, and default materials for non-recolorable 'inherited' subsets; if a material without lod90 match is selected for object, it'll have the usual glowing blue material in Neighborhood View. Also, TXMT name should have lod90 in subset name part only, not in object name part! For my example - 'myobject-10.08.2006_mesh1lod90_color_txmt', not 'myobject-10.08.2006lod90_mesh1lod90_color_txmt'. That's the reason why lod90 materials are usually pulled with normal materials when recoloring an object with LOD90 version. By the way, bump maps, reflection maps, and by-tile animation don't work in lod90 materials (figured it while writing another tutorial), so there's no use to set them. Alpha settings, like blend or cutting holes via stdMatAlphaTestEnabled=1, do work, though.
Well, that's all :) good luck with adding your objects to Neighborhood View!
----------
Tutorials:How to make your object visible in the Neighborhood View
I already almost forgotten to write this, so I decided that I'd better write short instructions, since it might take months before I get to write a normal tutorial :(
These instructions assume that you are already familiar with package structure; experience of renaming/adding/color-enabling mesh parts will be handy also.
So, to make object visible in Neighborhood View, you need a (specially prepared) copy of scenegraphic resources, and a small correction in the 'original' package. I guess they can be safely added to 'original' package, but preferred to save them in separate one.
So, say, you already have a working object, with that unique name part (which you change via Fix Integrity dialog), for example, 'myobject-10.08.2006'; your object's mesh has 1 subset which named, for example, 'mesh1'. (By the way, you can pass not all mesh subsets to the 'neighborhood version' of the object - from now on, I'll refer to this version as LOD90 object.) Say, this object has 1 recolor - TXMT name is 'myobject-10.08.2006_mesh1_color_txmt'.
First, let's make the changes in the original package.
1) to GMND, add cDataListExtension, Name = tsDesignModeSlaveSubsets, values of type String, number of items is the number of items which will be included in LOD90 object; for each item, Name is the name of existing subset, String is Name+LOD90 suffix. Example (as it would be displayed in item list): mesh1 = (String)mesh1LOD90.
2) in CRES, add cDataListExtension, Name = GameData (it may already exist, if does, modify existent). Add item of type String, Name = LODs, String = 90. (Item with such name may be already present - with empty value - modify value, if so.)
3) in SHPE, on Content/Level of Detail Listing tab, add value 0x0000005A.
Done with original package, let's create the LOD90 package.
LOD90 package must contain no joints (at least it's so for Maxis objects). If your object has no joints, you probably can just clone it and delete extra resources; if it has joints (my object had), clone (by CRES name - use Resource Finder to find all resources with name ending on lod90_cres, and choose appropriate one) an existing chain of LOD90 resources - I picked the one with the same number of subsets as I need, it's up to you which would be easier to adjust.
When doing Fix Integrity, it's important that LOD90 object name is 'original' object name plus LOD90 suffix - i.e. 'myobject-10.08.2006LOD90'.
Note 1: well, I guess it's important for CRES only to have exactly the same name (with just lod90 addition) as original suffix; I had SHPE names with more differences than just lod90, and game eaten it.
Note 2: since LOD90 object has only these resources, you would be able to do FixIntegrity just once - I mean, if you'd do it again, SimPE wouldn't detect the 'unique name' part of resource name, and will just add new name as prefix, instead of replacing the old name.
So, making changes in this new package:
1) in GMDC, mesh subsets should have names with LOD90 - i.e. 'mesh1lod90' - use this name in all related resources, such as TXMT and Parts tab of SHPE; usually, though not required, lod90 meshes have less vertices than normal ones
2) GMND doesn't need the tsDesignModeEnabled block, but list of available TXMTs for a mesh subsets is present and correct, so I suggest to update it - not sure if it's required, though
3) adjust TXMTs. Important: you must have TXMTs matching all available recolors for 'inherited' subsets, and default materials for non-recolorable 'inherited' subsets; if a material without lod90 match is selected for object, it'll have the usual glowing blue material in Neighborhood View. Also, TXMT name should have lod90 in subset name part only, not in object name part! For my example - 'myobject-10.08.2006_mesh1lod90_color_txmt', not 'myobject-10.08.2006lod90_mesh1lod90_color_txmt'. That's the reason why lod90 materials are usually pulled with normal materials when recoloring an object with LOD90 version. By the way, bump maps, reflection maps, and by-tile animation don't work in lod90 materials (figured it while writing another tutorial), so there's no use to set them. Alpha settings, like blend or cutting holes via stdMatAlphaTestEnabled=1, do work, though.
Well, that's all :) good luck with adding your objects to Neighborhood View!
----------
Tutorials:How to make your object visible in the Neighborhood View