Hi,
Ralf Gerlich wrote :
> Hi!
>
> Curtis Olson wrote:
> > Sure, just like any aircraft or object model can have it's own
> textures.
> > There may be some nuances that have disappeared over the years since
> I doubt
> > this has been heavily tested, but I used to have a KSJC demo with
> about 1
> > pixel per foot resolution. And don't forget that you could place an
> .ac
> > model at ground level and somehow forget to place the .btg file if
> you
> > really wanted to.
>
> Well, I think that photo may be better suited, as it takes the task
> of
> taking care of the height-field from the author.
>
> Loading a terrain tile differs in quite some way from loading an
> object
> model or aircraft, which also involves the use of the material
> library.
> The latter currently only loads its materials from materials.xml, but
> does not search for tile-specific textures in the scenery folders.
>
> I was rather hinting that maybe somebody more informed about the
> architecture of the terrain subsystem might want to implement this
> type
> of search. ;-)
>
in simgear/scene/tgdb/leaf.cxx branch PRE_OSG_PLIB_20061029, there is this code
:
139 : SGMaterial *mat = matlib->find( material );
140 : if ( mat == NULL ) {
141 : // see if this is an on the fly texture
142 : string file = path;
143 : string::size_type pos = file.rfind( "/" );
144 : file = file.substr( 0, pos );
145 : // cout << "current file = " << file << endl;
146 : file += "/";
147 : file += material;
148 : // cout << "current file = " << file << endl;
149 : if ( ! matlib->add_item( file ) ) {
150 : SG_LOG( SG_TERRAIN, SG_ALERT,
151 : "Ack! unknown usemtl name = " << material
152 : << " in " << path );
153 : } else {
154 : // locate our newly created material
155 : mat = matlib->find( material );
156 : if ( mat == NULL ) {
157 : SG_LOG( SG_TERRAIN, SG_ALERT,
158 : "Ack! bad on the fly material create = "
159 : << material << " in " << path );
160 : }
161 : }
162 : }
I didn't test it, but at least, the intention was there ;-)
-Fred
--
Frédéric Bouvier
http://my.fotolia.com/frfoto/ Photo gallery - album photo
http://fgsd.sourceforge.net/ FlightGear Scenery Designer
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Flightgear-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/flightgear-devel