Horde3D

Next-Generation Graphics Engine
It is currently 26.11.2024, 07:49

All times are UTC + 1 hour




Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: 31.01.2009, 12:07 
Offline
Engine Developer

Joined: 10.09.2006, 15:52
Posts: 1217
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...


Top
 Profile  
Reply with quote  
PostPosted: 31.01.2009, 14:46 
Offline

Joined: 22.11.2007, 17:05
Posts: 707
Location: Boston, MA
It looks all to the good - I much prefer storing everything on a per-model basis, rather than scattered across directories.

_________________
Tristam MacDonald - [swiftcoding]


Last edited by swiftcoder on 01.02.2009, 14:31, edited 1 time in total.

Top
 Profile  
Reply with quote  
PostPosted: 01.02.2009, 11:52 
Offline

Joined: 26.08.2008, 18:48
Posts: 120
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.


Top
 Profile  
Reply with quote  
PostPosted: 03.02.2009, 01:55 
Offline

Joined: 22.11.2007, 17:05
Posts: 707
Location: Boston, MA
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?)

Image

_________________
Tristam MacDonald - [swiftcoding]


Top
 Profile  
Reply with quote  
PostPosted: 03.02.2009, 03:25 
Offline

Joined: 05.03.2007, 19:38
Posts: 167
Location: Romania
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

_________________
Paul


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 21 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group