1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Disappearing Trees

Discussion in 'ObPlacer and ObPlacer XML' started by Mick, 14/2/06.

  1. Mick

    Mick

    Joined:
    19/4/05
    Messages:
    116
    I've created a library BGL consisting of about 20 different trees. Now I'm making some more BGLs using Object Placer XML, to stamp out multiple copies of them.

    There are a few places in the scenery where I get a really weird bug. If I place a tree there using Object Placer, not only will the tree not show up in the scenery after I compile, but all other instances of that tree - including the original one in the library BGL - disappear! I can reproduce the bug consistantly - if I get rid of the offending tree and recompile, all previous instances of it will return. Put a tree back in that area, and it's instances disappear again. There are only a few areas where this happens, and I don't see anything unusual about them.
    :banghead:
    ________
    IslandGirl cam
    Last edited: 19/9/11
  2. Tasmanet

    Tasmanet

    Joined:
    9/3/05
    Messages:
    214
    Country:
    australia
    I did exactly the same and had the same problem.

    Bit short on time so I gave up and went back to
    Arno's trees
  3. arno

    arno Administrator Staff Member FSDevConf team Resource contributor

    Joined:
    28/5/04
    Messages:
    20,581
    Country:
    netherlands
    Are you maybe mixing placement of trees and the library definition in one BGL file? The problem you describe sounds a lot like what would happen if your object gets geographically locked.

    So just make sure you have a library BGL without any placement of the objects and another BGL file that only places the objects as defined in the library.
  4. Mick

    Mick

    Joined:
    19/4/05
    Messages:
    116
    Yes, my library BGL does have placement info in it. Below is the first 2 entries in the library BGL. Could you kindly do a quicky cut and paste job to show me what an entry should look like? From what you're saying, I obviously need to remove some stuff.

    Code:
    <!-- Tree_A -->
    
    	<SceneryObject lat="40 57.08" lon="-74 11.04" alt="0" pitch="0" bank="0" heading="0" altitudeIsAgl="TRUE" imageComplexity="NORMAL">
    		<LibraryObject name="9558C9FE475A5E2386A81F88302255BC" scale="1.0" />
    	</SceneryObject>
    
    	<ModelData name="9558C9FE475A5E2386A81F88302255BC" sourceFile="Tree_A.mdl" />
    
    
    
    <!-- Tree_B -->
    
    	<SceneryObject lat="40 57.10" lon="-74 11.04" alt="0" pitch="0" bank="0" heading="0" altitudeIsAgl="TRUE" imageComplexity="NORMAL">
    		<LibraryObject name="3AE8DD95454BC7435A13ED8F8010EEA5" scale="1.0" />
    	</SceneryObject>
    
    	<ModelData name="3AE8DD95454BC7435A13ED8F8010EEA5" sourceFile="Tree_B.mdl" />
    ________
    Live sex webshows
    Last edited: 19/9/11
  5. Stranger

    Stranger

    Joined:
    25/7/05
    Messages:
    120
    Try to move all model definitions to the end of file or to a separate file.

    Example:

    Code:
    <!-- Tree_A -->
    
    <SceneryObject lat="40 57.08" lon="-74 11.04" alt="0" pitch="0" bank="0" heading="0" altitudeIsAgl="TRUE" imageComplexity="NORMAL">
    <LibraryObject name="9558C9FE475A5E2386A81F88302255BC" scale="1.0" />
    </SceneryObject>
    
    <!-- Tree_B -->
    
    <SceneryObject lat="40 57.10" lon="-74 11.04" alt="0" pitch="0" bank="0" heading="0" altitudeIsAgl="TRUE" imageComplexity="NORMAL">
    <LibraryObject name="3AE8DD95454BC7435A13ED8F8010EEA5" scale="1.0" />
    </SceneryObject>
    
    
    <ModelData name="9558C9FE475A5E2386A81F88302255BC" sourceFile="Tree_A.mdl" />
    <ModelData name="3AE8DD95454BC7435A13ED8F8010EEA5" sourceFile="Tree_B.mdl" />
    Last edited by a moderator: 15/2/06
  6. Tasmanet

    Tasmanet

    Joined:
    9/3/05
    Messages:
    214
    Country:
    australia
    Do you mean like this one from Arnos trees

    Code:
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <FSData version="9.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="bglcomp.xsd">
    	<ModelData name="1111197920180505AD52556C34328A17" sourceFile="..\mdl\ag_tree01.mdl"/>
    	<ModelData name="1111197920180505AD52556C34328A18" sourceFile="..\mdl\ag_tree02.mdl"/>
    	<ModelData name="1111197920180505AD52556C34328A19" sourceFile="..\mdl\ag_tree03.mdl"/>
    	<ModelData name="1111197920180505AD52556C34328A1A" sourceFile="..\mdl\ag_tree04.mdl"/>
    	<ModelData name="1111197920180505AD52556C34328A1B" sourceFile="..\mdl\ag_tree05.mdl"/>
    	<ModelData name="1111197920180505AD52556C34328A1C" sourceFile="..\mdl\ag_tree06.mdl"/>
    	<ModelData name="1111197920180505AD52556C34328A1D" sourceFile="..\mdl\ag_tree07.mdl"/>
    	<ModelData name="1111197920180505AD52556C34328A1E" sourceFile="..\mdl\ag_tree08.mdl"/>
    	<ModelData name="1111197920180505AD52556C34328A1F" sourceFile="..\mdl\ag_tree09.mdl"/>
    	<ModelData name="1111197920180505AD52556C34328A20" sourceFile="..\mdl\ag_tree10.mdl"/>
    	<ModelData name="1111197920180505AD52556C34328A21" sourceFile="..\mdl\ag_tree11.mdl"/>
    	<ModelData name="1111197920180505AD52556C34328A22" sourceFile="..\mdl\ag_tree12.mdl"/>
    	<ModelData name="1111197920180505AD52556C34328A23" sourceFile="..\mdl\ag_tree13.mdl"/>
    	<ModelData name="1111197920180505AD52556C34328A24" sourceFile="..\mdl\ag_tree14.mdl"/>
    	<ModelData name="1111197920180505AD52556C34328A25" sourceFile="..\mdl\ag_tree15.mdl"/>
    	<ModelData name="1111197920180505AD52556C34328A26" sourceFile="..\mdl\ag_tree16.mdl"/>
    	<ModelData name="1111197920180505AD52556C34328A27" sourceFile="..\mdl\ag_tree17.mdl"/>
    	
    </FSData>
    and if so what does
    sourceFile="..\mdl \ag_tree17.mdl"/>
    mean
    Last edited by a moderator: 15/2/06
  7. Stranger

    Stranger

    Joined:
    25/7/05
    Messages:
    120
    Well, that's an example of separate library definition file. Can be done this way or by moving of all ModelData tags to the end of scenery placement XML similar to an example above.

    ..\ means one level up in subfolder structure. As seen in your example, MDL files are located in different folder, other than folder where XML resides.

    Let's say you have following folder structure:
    Code:
    MySceneryDesignFolder 
    |-SceneryXMLSource
    |  |-MyScenery.xml
    |
    |-MDL
    |  |-ag_tree01.mdl
    |  |-ag_tree02.mdl
    |  |-ag_tree03.mdl
    |  |-ag_tree04.mdl
    |  |
    |  |-ag_treeNN.mdl
    
    In this case, to instuct parser to look in MDL folder for .mdl files while compiling MyScenery.xml you can either give a full path (C:\Whatever\WhateverElse\MySceneryDesignFolder\MDL\ag_tree01.mdl) or use a shortcut (..\MDL\ag_tree01.mdl). The meaning of shortcut is:

    1. Go to the parent folder (MySceneryDesignFolder).
    2. From there go to MDL folder.
    3. Use ag_tree01.mdl file located there.

    Note:
    To go 2 levels up in subfolder structure you can use ..\..\ shortcut.
    To go to the root of current drive you can use .\ shortcut.
    Last edited: 15/2/06
  8. arno

    arno Administrator Staff Member FSDevConf team Resource contributor

    Joined:
    28/5/04
    Messages:
    20,581
    Country:
    netherlands
    Moving all the ModelData commands to the end of the XML file does not matter. That will not make any difference to this problem, it only makes the XML file easier to read.

    If you want to solve the geo-locking problem, you will have to make a library XML that contains no placement at all. All the placement can then be done in a seperate XML file.

    The XML file of my tree library, as shown above, is indeed an example of this. In this file I used relative paths. This is because all members of the scenery design team I am with use the same folder structure. And by using relative paths we can compile each others XML files without trouble. But if you have your XML and MDL files in the same folder, you can also just place the MDL filename there.
  9. Mick

    Mick

    Joined:
    19/4/05
    Messages:
    116
    Last edited: 19/9/11
  10. Tasmanet

    Tasmanet

    Joined:
    9/3/05
    Messages:
    214
    Country:
    australia
    More Questions

    Got all that and thanks

    Can the plane be rectangular ???

    What is the trick in regards to the direction the plane is facing.
    I had a bit of trouble initially as the plane seemed back to front.
    Nothing to do with normals.

    Tas
  11. arno

    arno Administrator Staff Member FSDevConf team Resource contributor

    Joined:
    28/5/04
    Messages:
    20,581
    Country:
    netherlands
    Not really sure what you mean here, but I guess we are going off-topic here :).

    If you mean the tree objects, yes the plane can have any shape you wish. If you see the wrong side of the tree you have either designed it wrong or if you are using a library, you have probably placed it with a heading, which is wrong as well.
  12. Mick

    Mick

    Joined:
    19/4/05
    Messages:
    116
    I've been specifying headings in the placement XML, with no problems. Usually, I just slew an aircraft to where I want to place the tree, and use whatever heading it happens to be at. In some early versions this would cause brightness variations - some trees would be ok and others dark, depending on their heading - but that turned out to be due to using bad normal values in the ASM. Since I started using the right values (which, I think, are 0-1-0 - it was discussed here in another thread), I haven't had that problem.
    ________
    Esy ape
    Last edited: 19/9/11
  13. arno

    arno Administrator Staff Member FSDevConf team Resource contributor

    Joined:
    28/5/04
    Messages:
    20,581
    Country:
    netherlands
    Yes, but if you use trees that also rotate to the user, this will not work. As it could be that you are looking at the side that is rotated away from you. For cross-plane models it is no problem of course.

Share This Page