Brettzies Posted August 22, 2006 Share Posted August 22, 2006 <graphic_group name="scar" culling_object="gfx_body_loda"> <lod_object name="scar_body"> <object name="gfx_body_loda" shadow_caster="true" max_distance="500"/> <object name="gfx_body_lodb" shadow_caster="true" max_distance="1500" instance_struct="world_tm_ambient_cube"/> <object name="gfx_body_lodc" shadow_caster="true" instance_struct="world_tm_ambient_cube"/> </lod_object> </graphic_group> So, this is all referring to lod's and such. I assume these are part of the diesel file? I don't know much about Max, so I'm just going to guess here. You have 3 objects in the diesel file(or max file) with the names gfx_body_loda, b, and c? Or, is there some way to define lod's in max and they share the object name scar_body in this case? Can anyone elaborate on this? Quote Link to comment Share on other sites More sharing options...
GRiN_Bumbi Posted August 23, 2006 Share Posted August 23, 2006 <graphic_group name="scar" culling_object="gfx_body_loda"> <lod_object name="scar_body"> <object name="gfx_body_loda" shadow_caster="true" max_distance="500"/> <object name="gfx_body_lodb" shadow_caster="true" max_distance="1500" instance_struct="world_tm_ambient_cube"/> <object name="gfx_body_lodc" shadow_caster="true" instance_struct="world_tm_ambient_cube"/> </lod_object> </graphic_group> So, this is all referring to lod's and such. I assume these are part of the diesel file? I don't know much about Max, so I'm just going to guess here. You have 3 objects in the diesel file(or max file) with the names gfx_body_loda, b, and c? Or, is there some way to define lod's in max and they share the object name scar_body in this case? Can anyone elaborate on this? object_name="gfx_body_loda" is always the name of a object in the max scene - what follows in the same tag is the properties you want to give the object in the Deisel engine. graphic groups are for LODing (Level of detail) objects - so that the engine knows what objects are in the LOD. Quote Link to comment Share on other sites More sharing options...
Brettzies Posted August 23, 2006 Author Share Posted August 23, 2006 Thanks for the info. I have another question, like I said, I'm not a Max person, so maybe this is a standard procedure for that app. Anyway, is it as simple as having three versions of the object in your max scene? All parented to the root_point, with each object being named gfx_body_loda, b, and c according to their poly resolution? I understand what they are used for, what I'm trying to determine is, what is the procedure for getting the objects into the game based on the way you guys did it. Since there are only two diesel files per weapon, one for the base and one for the mag, I assume they contain 3 version of each. Loda, b, and c. Does the group name have anything to do with the max scene, or is that just for the game to define? I guess I'm just trying to figure out what "names" are pointing to what things(actual 3d objects with coorespoinding names) and what is being defined by the xml. Quote Link to comment Share on other sites More sharing options...
DiGiTALY -TC- Posted August 24, 2006 Share Posted August 24, 2006 the grins are very accurate kids they named 3d objects with "gfx_" while all other object's references are usually dummy entities (but they are also lazy kids so sometimes there are references pointing to nothing or to old abandoned stuff.. ) regarding your specific question, I don't think the group name is part of the max scene, but for sure you need to link all lod obj and animations under a dummy (and its name is no specified in the xml so I think you can select a random name but I'm not sure so wait for grin's confirmation) ..oh also note that the scar could not have a "root_point" but an "align" dummy at the top of the hierarchy Quote Link to comment Share on other sites More sharing options...
GRIN bogvaldt Posted August 25, 2006 Share Posted August 25, 2006 is it as simple as having three versions of the object in your max scene? All parented to the root_point, with each object being named gfx_body_loda, b, and c according to their poly resolution? Yup , it's that simple! Does the group name have anything to do with the max scene, or is that just for the game to define? No the group name can be whatever you want, it has nothing to do with the max scene. I guess the other stuff is pretty straight forward. culling_object - sets wich object to use as a culling volume. This will affect the entire graphic group. Just specify the highest LOD mesh here, and you'll be fine. max_distance - sets the maximum distance that the object will be rendered. When it reaches the max distance it will be hidden and the next object will be shown instead. instance_struct="world_tm_ambient_cube" - Watch out for this one. If the weapon has an instance shader on it, like most weapons do, it's for optimization purposes, this line has to be put in every object that has that material on it. Otherwize the game will crash. Quote Link to comment Share on other sites More sharing options...
Brettzies Posted August 27, 2006 Author Share Posted August 27, 2006 Thanks for the info. Every little bit helps. What happens if there's only one lod? In other words, the file contains a root_point and an object called gfx_body_loda, but, the xml is formatted like the example above? Will the game crash? ..oh also note that the scar could not have a "root_point" but an "align" dummy at the top of the hierarchy What is meant by that? Is that speculation or a fact, as in, a weapon should never be parented to a root_point dummy but an "align" dummy instead. I only ask because that contradicts the tutorial that was written about getting custom content into the game. Quote Link to comment Share on other sites More sharing options...
DiGiTALY -TC- Posted August 27, 2006 Share Posted August 27, 2006 it simply means that "align" was chosen to indicate the root_point by the person who did the weapons in max..it's not a big deal untill you call it with the same name in the xml. The important thing is that everything has to be linked to a dummy and the name of that dummy should be referenced into the xml the single lod should work (but what's the point of using the lod structure then? just rip it off..), but if the game crash, just clone the loda into lodb and loc for time saving-testing porposes.. Quote Link to comment Share on other sites More sharing options...
Brettzies Posted August 27, 2006 Author Share Posted August 27, 2006 it simply means that "align" was chosen to indicate the root_point by the person who did the weapons in max..it's not a big deal untill you call it with the same name in the xml. The important thing is that everything has to be linked to a dummy and the name of that dummy should be referenced into the xml the single lod should work (but what's the point of using the lod structure then? just rip it off..), but if the game crash, just clone the loda into lodb and loc for time saving-testing porposes.. Hmm. I see exactly what you are saying now. I'm going to try using "align" instead of "root_point" since I am using the Scar-L as the base. Easier to change it once in the 3d file as opposed to finding every spot in the numerous xml's. Maybe it will be that simple of a solution. Sheesh. GRIN's pretty consistent in their naming conventions, but I do see little discrepancies here and there which can send me down the wrong path scratching my heading and saying whuh? I'm going to leave the xmls as "in tact" as possible, so I'm not going to delete the lod refrence for now. Thanks for the tips and insight. Quote Link to comment Share on other sites More sharing options...
GRIN bogvaldt Posted August 27, 2006 Share Posted August 27, 2006 If you're modding weapons, make sure that the orientation node is named "align" because that's the name being used in the weapon scripts. The game will most likely crash if you name it something else. About the lod, if you're only using one model then you won't need the lod group at all. Just put the object in the graphic group and remove all the lod parameters. Don't forget to remove the max_distance parameter also. And again, watch out what shader the model uses. If it's an instanced shader make sure you put instance_struct="world_tm_ambient_cube" in the object tag. Example: <graphic_group name="scar" culling_object="gfx_body_loda"> <object name="gfx_body_loda" shadow_caster="true"/> </graphic_group> Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.