Adding Objects to SBuilderX Library

General discussion about Scenery Design. Questions about SBuilder for Flight Simulator FS2004.
Post Reply
User avatar
pierrecor
Posts: 12
Joined: Thu Feb 26, 2009 6:42 am

Adding Objects to SBuilderX Library

Post by pierrecor » Sun Jun 14, 2009 4:45 pm

I want to add a 3D object created by Gmax to the SBuilderX Library. I have succesfully added objects to SBuilder (FS2004 version) but battle a bit to add the same object which is Exported using the FSXGamePack for GMax, getting only a .mdl file.

I used Libarary Createor (by AG) to create the relevant text file which contents I have to add to one of the LibObjects folder text files. On opening SBuilderX, using the Select Object tool, I can see the object and corresponding thumbnail in the Library Objects. I copied the corresponding Library Creator .bgl file to the Work folder (I presume I am right so far)

However, highlighting the object in the listbox in SBuilderX, the captionjust above the listbox reads "Old FS9 Library Object" and after trying to compile the scenery I get the follwoing error:

"There was a compilation error in this Project!" The rsulting SCASM reports reads:

Error in line 4
-> LibraryObject( -31.65143722 18.38455364 0.000 1 0.
-> in expression .. {99C4BC9 2-F788-4 5C ..
Scasm compilation status: error(s) 1

OK, I presume now I am totally on the wrong track. Please point me to where I can get more info in How To do it correct.

Thanks for a great product. I use it to develop scenes for "Saturday Night Live" events for the VATSIM VATSAF (South Africa Division) in both FS9 and FSX.

Cheers


Pierre
Last edited by pierrecor on Sun Jun 14, 2009 7:06 pm, edited 1 time in total.

User avatar
Luis Sa
Posts: 1734
Joined: Sun May 18, 2003 11:17 am
Location: Portugal
Contact:

Re: Adding Objects ro SBuildeX Library

Post by Luis Sa » Sun Jun 14, 2009 6:03 pm

Hello Pierre,

Please open the objects.txt and read the comments. I do not have it with me at this moment but in the line for the object you will see the GUID, the NAME, the SCALE, ... and there is a number 0 1 or 2. These numbers refer to the type of FS. For FSX the number should be 0 (or is it 2?). So you need to change the number and try again.

I also am sending you an email on this forum with instructions how to use version 313. We are working on the documentation before we release it. But you can try to place your MDL directly.

Best Regards,

Luis

User avatar
pierrecor
Posts: 12
Joined: Thu Feb 26, 2009 6:42 am

Re: Adding Objects to SBuilderX Library

Post by pierrecor » Sun Jun 14, 2009 9:13 pm

Hi Luis,

the objects.txt file refers:

;{6dc7e21e-4d73-4f0c-ac8d-4895a1992410} 2 38 15 1 ag_barn

I presume the 2 just after the GUID is FSX

The FSX_vehicles_aircraft.txt file:
[FSX_vehicles_aircraft]
;this was my model entry
{99c4bc92-f788-45cb-8849-c1d500ef2bf5} 1 50 50 1 seneca_wreckX
.....

... and changed it to {99c4bc92-f788-45cb-8849-c1d500ef2bf5} 2 50 50 1 seneca_wreckX

The file compiled normally with the follwing structure:

<!--seneca_wreckX-->
<SceneryObject
lat="-31.6424359722222"
lon="18.5363872777778"
alt="0"
altitudeIsAgl="TRUE"
pitch="0"
bank="0"
heading="0"
imageComplexity="NORMAL">
<LibraryObject
name="{99c4bc92-f788-45cb-8849-c1d500ef2bf5}"
scale="1" />
</SceneryObject>

...and after placing it the normal way I do other objects still there is nothing - I suspect I have to do something with the .mdl file but do not know what. Where do I place this file or what do I do with it.

Looking forward to 313

Pierre

User avatar
Luis Sa
Posts: 1734
Joined: Sun May 18, 2003 11:17 am
Location: Portugal
Contact:

Re: Adding Objects to SBuilderX Library

Post by Luis Sa » Mon Jun 15, 2009 3:45 pm

Hello,

All seems OK. If you have downloaded version 313 you could try to place the MDL file directly. There is a post by Dick (rhumbaflappy) in Fsdveleoper that illustrates how you can make a simple FSX BGL library from a FSX MDL file, but I could not find it.

Hope you sort it out,

Luis

User avatar
pierrecor
Posts: 12
Joined: Thu Feb 26, 2009 6:42 am

Re: Adding Objects to SBuilderX Library

Post by pierrecor » Mon Jun 15, 2009 9:36 pm

Hi Luis,

I can successfully create an object using GMax mdl file, Libraray Maker and BGLComp (FSX version) with a manually objectplacer XML file, and it works when adding it to the FSX scenery files. What I really want to do is to ad the object to the SBuilderX's Object Library. I can do it via RWy12 objetcs, but I'd rather use SBuilderX as the native Object Library.

Kind regards

Pierre

User avatar
Luis Sa
Posts: 1734
Joined: Sun May 18, 2003 11:17 am
Location: Portugal
Contact:

Re: Adding Objects to SBuilderX Library

Post by Luis Sa » Tue Jun 16, 2009 12:46 am

Hello Pierre,

I just read the complete thread. Here are my doubts. You say that above the listbox in SBuilderX310 you read "Fs9 object ...". That was before you changed the 1 >>> 2! Yes? If you have 2 in the TXT list then you should read "FSX object ..." above the listbox.

You say
The file compiled normally with the follwing structure:

<!--seneca_wreckX-->
<SceneryObject
lat="-31.6424359722222"
lon="18.5363872777778"
Is this the xml file found in the Tools/Work file?

You say that you can place your model previous placed in a library by writing a xml file by hand. The question is to compare the xml file generated by SBuilderX and the file that you make by hand.

I am confused - could you send me the xml file that places the object correctly and the xml file generated by SBuilderX?

Finally: did you download the 313 version?

Regards,

Luis

User avatar
pierrecor
Posts: 12
Joined: Thu Feb 26, 2009 6:42 am

Re: Adding Objects to SBuilderX Library

Post by pierrecor » Tue Jun 16, 2009 2:17 pm

Hi Luis,

First, I cannot find the thread to download version 313.

Ok, let me try again with a better explaination in a chronological manner.

The problem statement is:
I want to add an object to the SbuilderX own Objects Library to be used and placed in a scene using SbuilderX.


Manual adding object to scenery
This is what I can accomplish without SbuilderX or Sbuilder (FS9):

Lets name the object YellowBox
Get the coordinates where I want to place the scenery object
Create a YellowBox model with textures using Gmax and FSXGamePack, GUID and friendly name included
Export the model to YellowBox.mdl
Convert the texture bitmaps to Mipmaps and DTX1 bmp file
Create an xml placement file such as below:

<?xml version="1.0"?>
<FSData
version="9.0"
xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
xsi:noNamespaceSchemaLocation="bglcomp.xsd" >

<SceneryObject
lat=" S31 38.47"
lon=" E18 32.41"
alt="0"
altitudeIsAgl="TRUE"
pitch="0"
bank="0"
heading="0"
imageComplexity="NORMAL">
<LibraryObject name="{99c4bc92-f788-45cb-8849-c1d500ef2bf5}" scale="1.0"/>
</SceneryObject>
<ModelData sourceFile="YellowBox.MDL" />
</FSData>

Create YellowBox.bgl file using BGLComp (FSX version)
Place the YellowBox.bgl file and textures in the corresponding scenery and texture folders.



Using SBuilderX
I can add an object to the RWY12 objects library and us that object through SbuilderX by selecting the RWY12 object library, but this is not the objective.

I use Arno Geertsema’s LibrayCreatorXML application to create a YellowBox.bgl and YellowBox.xml, but the resulting XML file does not contain any placement data

What I know by creating a library object for SbuilderX is, but do something wrong here:
I create an object file MyScenery.txt with an objects category SNL:
[SNL]
{99c4bc92-f788-45cb-8849-c1d500ef2bf5} 2 47 34 1 YellowBox

I add the scenery file MyScenery.txt to the objects.txt file:
include=MyScenery.txt

Then I add the thumbnail image in the LibObjects folder:
{99c4bc92-f788-45cb-8849-c1d500ef2bf5}.jpg

On opening the library in SbuilderX I can see the object category and the objects in the category list with thumbnail, but placing it and creating a BGL with SbuilderX, the objects does not show in the resultant scenery.

My question is: How do I add this object to the SbuilderX objects library. What do I do with the YellowBox.bgl file created by LibrayCreatorXML. I know once it is in the library, SbuilderX will create the placement xml file.

All in all I understand the creating and placing of an object in a scene, but I do not know how to add it to the SbuilderX Library Objects.

Kind Regards

User avatar
Luis Sa
Posts: 1734
Joined: Sun May 18, 2003 11:17 am
Location: Portugal
Contact:

Re: Adding Objects to SBuilderX Library

Post by Luis Sa » Tue Jun 16, 2009 11:34 pm

Hello Pierre

First of all - sent you a message through the forum. Go to your user control panel. In the message I gave you a link to download the beta version 313. With that version you have a Library Manager. You open it. You add a BGL library file (the one you create with Arno's tool). You create Category names. You do not need to edit the Objects.txt as you do now.

Returning to your problem. Your editing of objects.txt is ok. I see no problems there. Note that I am not familiar with LibrayCreatorXML. You say the the file YellowBox.bgl is a library. That means that there is no "placement" information on it. So you need to create another BGL with the calling (in a specific location) to the model that is inside YellowBox.bgl. That second BGL can be created by SBuilderX. In fact as soon as you edited Objects.txt (as described) you can create the "calling" BGL even if the YellowBox.bgl is not OK. So place the object insode SBuilderX, select all objects and compile. Go to the Tools/Work folder and you see both the XML file just generated and the corresponding BGL (SBuilderX calls BGLComp to create the BGL out of the XML). So you need to copy the 2 BGL files (and the textures of course) to your target SCENERY/TEXTURE folders.

Note that you can have:

1) ONE BGL with both the placement and the model. The model can not be placed in a different place by using a "calling" or "placement" BGL. This is what happens when you place a "MDL object" with the new SBuilderX313

2) ONE BGL with one or several models. That BGL is called a library. All the models in the library can be called several times in several locations. But the BGL can not show anything if there are no BGLs that call the models that it contains. SBuilderX generates these "calling" BGLs.

Please see this post:

http://www.fsdeveloper.com/forum/showthread.php?t=14487

Hope you sort out this problem,

Regards, Luis

User avatar
pierrecor
Posts: 12
Joined: Thu Feb 26, 2009 6:42 am

Re: Adding Objects to SBuilderX Library

Post by pierrecor » Wed Jun 17, 2009 6:56 am

Hi Luis,

Many thanks for the advice. First, I did not recieve the private message and link. You are welcome to send it to spcornelissen@gmail.com.

I have follwed your instructions and it is working. This is what i did and it was actually so easy.

1. Created a model with GMAX and exported it using FSXGamePack
2. Create the bgl using Arno's LibraryCreatorX.
3. Create a scenery folder in FSX and place this bgl (created by LibraryCreatortX) and model textures in the appropriate scenery and texture forlders
4. Prep SBulderX Libray objects text file (MyObjetcs.txt) with the text in the text file generated by Arno's LibraryCreatortX application.
5. Create the thumbnail with the GUID.jpg filename in the LibObjects folder
6. Slew in FSX to where I wanted the object.
7. Opened SBuilderX and click on View, Show Aircraft
8. Set the files properties to the scenery file I just created in FSX as in 3. above
9. Place the object from the SBuilderX Libray on the cross representing the Aircraft
10. Select all and Compile to the folder created in 3 above.
11. Add the folder created above in FSX Scenery and play.


For thiose who want to read here, the bgl file created by LibraryCreatortX, which may contain more than one model (mdl), needs to be put together with the texture files of these models in the same scenery folder structure in FSX. Then use Sbuilder to create the placement bgl's and copy the SBuilderX generated bgl files to the scenery folder of the scenery you are creating.

Thanks a million. There is so much to learn, and so little time.
I'll wait for the download link and start using the beta and give feedback if needed.

Kind Regards

Pierre

cyana
Posts: 38
Joined: Sun Sep 02, 2007 9:01 pm

Re: Adding Objects to SBuilderX Library

Post by cyana » Sat Jun 27, 2009 11:33 am

Hello Pierre and Luis,

I'm also experiencing heavy troubles with placing my own objects into the scenery using SBuilderX. I guess I'm still missing the big picture, how a custom scenery is (or has to be) organized in FSX. There are tons of tutorials out here, telling you how to make 3D objects with various 3D programs, however when it comes to placement they either refer to FS9 or leave it open to 'the tool of your choice'.

What I did so far:

- created and sucessfully textured a 3D object with FSDS 3.51:

Image


- when I compile a bgl from within FSDS (and after temporarily changing the local settings for number formats to US (dot and comma switched), and place the file into FSX\Addon Scenery\Scenery folder, it shows up in FSX at the right place, however with wrong heading as you cannot apply a heading to an object from within FSDS:

Image


- Next thing, I compile a .mdl file with FSDS, and create an object library with LibraryCreatorXML 2.0.2. The library seems to be successfully compiled into PGObjects.bgl (has the correct size, and no compiler errors show up). From LibraryCreator I also create a text file for the object collection of SBuilderX. Here things start to turn out problematic. First, the produced text file clearly is intended for FS9, not for FSX, although the object is compiled with FSX SDK (I do not have FS9 installed). This might be a small bug in LibraryCreator, though. However, also the footprint size of the object is derieved wrong, actually the length is doubled while the width is correct.

- I successfully edit objects.txt and FSX_myobjects.txt to put the correct settings into SBuilderX files together with a thumbnail, and the object shows up in the objects dialog and can be applied to an object within SBuilderX.

FSX_myobjects.txt looks like that:
[FSX_myobjects]

{A6512AF6-42B0-664B-5068-AFA48BBDD7BE} 2 29 63 1 PG_StJohannCath
- When I compile the OBX from within SBuilderX, the object does not show up in the scenery. Because of so many steps and programs involved, it is hard for a newbie to detect, where the problem lies; sorry for being so verbous, I just felt I describe all steps done so far.

There are of course a few questions left open - specially, where do I have to place the object library, that is created with LibraryCreator ? All manuals and tutorials are very silent on this topic. Is it supposed to be somewhere in the FSX folder ? Shall it reside somewhere in SBulderX ? Both ?

Also, I'm missing basic informations, how a scenery can be organized. My 'Addon Scenery\Scenery\' folder already is messed up, however when I put all my files into 'Addon Scenery\Scenery\MyScenery\' nothing shows up anymore in FSX.

greetings and thanks
Cyana

User avatar
Luis Sa
Posts: 1734
Joined: Sun May 18, 2003 11:17 am
Location: Portugal
Contact:

Re: Adding Objects to SBuilderX Library

Post by Luis Sa » Sat Jun 27, 2009 7:47 pm

Hello Cyana,

Instead of trying to sort out some misunderstanding, I suggest that you try the new version 313. I will add your username to the group of testers.

In the new version you do not need to patch the objects txt file. If you have a BGL library (fs9 or fsx) you will be able to "import" it through the SBuilder Library manger.

On the other hand if you have a MDL file (fs9 or fsx) that is used once (as your nice church) you can place it directly without putting it in a library. There another type of object called "MDL". You just point to the file where it resides, you set heading, complexity, ...., and you compile.

Best Regards, Luis

cyana
Posts: 38
Joined: Sun Sep 02, 2007 9:01 pm

Re: Adding Objects to SBuilderX Library

Post by cyana » Sat Jun 27, 2009 11:18 pm

Hello Luis,

thank you very much for adding me to the tester's group ! Can't wait to have 313 installed ! When will it be available ?

best greetings and thanks
Cyana

User avatar
Luis Sa
Posts: 1734
Joined: Sun May 18, 2003 11:17 am
Location: Portugal
Contact:

Re: Adding Objects to SBuilderX Library

Post by Luis Sa » Sun Jun 28, 2009 12:04 am

Hi,

You can download it now from this forum. It will be available to all when documentation is ready.

Best Regards, Luis

Post Reply