Horde3D http://horde3d.org/forums/ |
|
More flexible resource management http://horde3d.org/forums/viewtopic.php?f=8&t=632 |
Page 1 of 1 |
Author: | marciano [ 31.01.2009, 12:07 ] |
Post subject: | More flexible resource management |
We are seriously thinking about getting rid of the separation of resources by type in the content directory. This would mean that the setResourcePath utility function could be removed. Resources would always have a path relative to the content directory, for example: The knight in the samples would be loaded with addResource( ResourceTypes::ResourceTypes::SceneGraph, "models/knight/knight.scene.xml", 0 ); As a further example, the material files in knight.scene.xml would be referenced as "materials/knight/......", so always relative to the content path. The great advantage is that this enables a more flexible asset organization (directory structure). For example it would be possible to have the textures and materials of a model in the same directory as the scene graph file and still have a shared textures directory for common textures. Or this structure would be possible: content/characters/knight/knight.scene.xml content/objects/sphere/sphere.scene.xml I think the change will be a nice improvement but as a consequence it could mean that some paths need to be updated for current projects. That's why I wanted to ask if anyone sees serious problems... |
Author: | swiftcoder [ 31.01.2009, 14:46 ] |
Post subject: | Re: More flexible resource management |
It looks all to the good - I much prefer storing everything on a per-model basis, rather than scattered across directories. |
Author: | attila [ 01.02.2009, 11:52 ] |
Post subject: | Re: More flexible resource management |
This is a great modification. Getting rid of directory set is an option but maybe it could act as a global (fallback) directory. Common textures could be stored inside that directory (e.g. static reflection maps, cloud map, ...). I've already done something similar with xml file preprocessing. Maybe a little offtopic, but I also added embedded materials to the scene.xml files. This works better for us, but that depends on the pipeline. We are not modifying materials after the export/convert, it comes from the DCC app. If anyone else needs this, this could be also included. |
Author: | swiftcoder [ 03.02.2009, 01:55 ] |
Post subject: | Re: More flexible resource management |
Did this get checked into SVN already? All the resource paths are screwed up: Code: .120 Loading resource 'font.tga' 0.120 Resource 'font.tga' of type 7: No data loaded (file not found?) 0.120 Loading resource 'logo.tga' 0.120 Resource 'logo.tga' of type 7: No data loaded (file not found?) 0.174 Loading resource 'model.shader' 0.174 Resource 'model.shader' of type 6: No data loaded (file not found?) 0.175 Loading resource 'layingrock.jpg' 0.235 Loading resource 'layingrockBump.tga' 0.235 Resource 'layingrockBump.tga' of type 7: No data loaded (file not found?) |
Author: | SpOOky [ 03.02.2009, 03:25 ] |
Post subject: | Re: More flexible resource management |
just bumped into that. some of the materials must be edited as some textures are not tgas, but pngs. also model.shader should be skinning.shader.xml. works at this end after the edits |
Page 1 of 1 | All times are UTC + 1 hour |
Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |