View Full Version : Tutorial: Understanding the Scenegraph
13th Nov 2008, 10:42 AM
Understanding the Scenegraph
There are a lot of files in a package, and sometimes it's a bit hard to figure out how they're all related. How does a mesh know where to go to find its texture? How does a recolour know which mesh it belongs to? If a mesh goes in a GMDC and a texture goes in a TXTR, then why do we need all these other resources at all?
Many of the resources in a new object are part of what is called a "Scenegraph", which is like a family tree of resources showing which files are connected to which other files. This tutorial explains how the files are related, and how you can use that information to fix broken packages.
The tutorial has been 'wikified', and can be read in full on the wiki here:
Tutorials:Understanding the Scenegraph
If you have questions about the material in that tutorial, you are very welcome to post them here.
Tutorials:Understanding the Scenegraph
13th Nov 2008, 11:14 AM
Excellent, I have been snuffling in the scenegraph already when trying to fix my items, and this answers a lot of questions I had.
I have one more question - if an object works fine, but when I open the scenegraph and see orphans should I delete the orphans? Except for recolours of hair and clothes - looking at scenegraphs for the recolours of hair and clothes all things are already orphans?
13th Nov 2008, 11:32 AM
Often, yes, but not always.
Sometimes, orphans are necessary for a file to work. For example, if there is an object which uses BHAVs to change its texture image while it's in the game, then it may switch to a texture which appears as an orphan in the scenegrapher. It's entirely legitimate to have orphans in your package which are still needed for the object to function. I think the computer's various screen TXTR files are a good example of that.
However, if the orphans are files which were necessary in the original cloned object, but which are not used by the new version of the package, then they can be deleted. For example, if the original file had two texture images but the new file only needs one, then the spare one can be safely deleted. In this scenario it's actually a pretty good idea, because it will reduce the size of your package. :)
In summary, it's a judgement call. :)
13th Nov 2008, 5:57 PM
This is very helpful to me. Thanks Echo! :)
13th Aug 2010, 12:28 AM
Echo, this wiki is simply brilliant. You've made it seem like it was actually logical and manageable :) The descriptions of how the different parts point to one another are super useful. Thank you very much, everything is so much clearer now!
19th Jul 2012, 12:13 AM
Echo, do you know how the Property Set is linked in with all that? The 3IDR and the property set share an instance number, and the 3IDR links to the cres, gmnd (I think) and the matdef. I need to clone a property set and my new one isn't being used, so I need to fix where ever it links to. Any idea?
19th Jul 2012, 6:34 AM
Echo, do you know how the Property Set is linked in with all that?
What object are you looking at? Most of the 3IDR files are in clothing and sims, not objects, and they're not usually part of the scenegraph proper. In any case, I can offer these (rather terse!) notes from one of my many spreadsheets:
FragKey (BINX + 3IDR) - share instance number, points to BinKey and ObjKey
BinKey (COLL + 3IDR) - share instance number, points to Text Lists
ObjKey (XMOL/GZPS + 3IDR) - share instance number, points to scenegraph (CRES, SHPE, MMAT)
If you've only got the one 3IDR file and a property set, I'd guess that you've got the OBJKey. If that's the case, you need to find the object's FragKey resources and import/clone/update them to point to your new one... But I'm speculating, because I don't actually know what you're trying to do. ;)
Wes has some more detail in his pet collar tutorial here:
which might be relevant?
19th Jul 2012, 7:44 AM
I'm looking at skins. I was missing a property set for the emhair, and it looked like it was being shared by the amhair. I need to have two separate ones, so I cloned the amhair and changed the ages on it, but that wasn't enough. That's what prompted this. What should I change where to make it point to my new one?
vBulletin v3.0.14, Copyright ©2000-2016, Jelsoft Enterprises Ltd.