• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

Library object "rotation to user"

Messages
26
Country
unitedkingdom
Hello again everyone, Arno you have been a great help. I hope this question is again in the right forum. My topics tend to be cross-genre.
Ok, once I have modified the source code to enable rotation to user, can I export that model to a library object successfully?
It seems to work ok, but there is odd behaviour in the rotation. The bitmap will rotate about three hundred degrees before snapping round 180 degrees (showing the back face) and back again, before allowing another three hundred degrees of rotation. I hope that description makes sense.
If I compile the object by itself and use XML to place it, it works fine. I understand that the rotation requires all Gmax rotation axes to be zero, and the original model adheres to that rule. Does that also apply to objects placed from a local library? It doesn't make sense to be able to place references to objects if they all have to be at the centre of the Gmax world. Or have I got it all wrong?

Thanks

Marcus
 
Hi Marcus,

Are you sure you are rotating to the viewpoint along the correct axis? In the example code on the forum here it is rotating around the z-axis.

After that you can include your new MDL object in an object library, just like you can do with any MDL object.

Does that also apply to objects placed from a local library? It doesn't make sense to be able to place references to objects if they all have to be at the centre of the Gmax world. Or have I got it all wrong?

I don't know what you are exactly meaning here :), but the rotate to user command given in the tips does rotate the entire GMax scene around the 0,0 point till it faces the user. So if you object is not at 0,0 in GMax you get trouble with the rotation.
This is no problem, as you place your objects with the XML code.
 
Cheers for the reply Arno, I could have sworn I posted this in the Gmax forum, (too much caffeine) sorry.
Basically what I am trying to do is in Gmax make individual bitmaps of people to place in my scenery. I edit the source code to enable rotation to user. Then with bglc_9 I compile as a model. As I said, if I place the object at this point, with XML everything works fine. But what I am trying to do is using your library_creator_xml (THANKYOU very much btw) to make a local library, so I can then place the people models using the attach script in Gmax for my larger scenery, rather than edit the XML every time I want to reuse a model. Is this not a correct way of doing things?
As I said above if I use the library method the object appears in the correct location, and has rotation but only to a degree.
I hope that makes more sense.

Thanks, arno

Marcus
 
Hi Marcus,

First, I moved it to the BGLC editing forum as this is more about source code tweaking. So nothing wrong with your mind here :D.

I have never tried the approach you mention, but I guess it should work. As long as the rotate to user trick is inside your library object. The new scene where you attached them to should then normally be exported.

But it is not a good idea to use this method to place objects all over your airfield. Because if you attach them all to one GMax scene they are seen as one big object, with one RefPoint and one visibility distance, etc. For the performance it is a lot better to place them using XML code or SceneGenX for example. As long as you only want to place a few objects around a building you made (some trees and people for example), it is no problem of course.
 
Hi Arno,

Thanks for your response. I think, perhaps that maybe it's the attachtool method that I am using that doesn't work for rotating library objects. As you have not tried this method yourself, I can presume that it's not the correct way of working.
The only concern I have with SceneGenX is my scenery is not an airfield, but an aristocratic house and safari park in England. Situated in rolling hills, I need to be able to place objects with an individual height ASL.
When I opened SceneGenX and tried to set up a location, it seemed that it uses the flat airport structure. ie It asked for a height ASL and I need to be able to place my objects at different elevations.
I have a feeling that I am going to have to bite the bullet and place all rotating objects with XML.
Your assistance in these matters have been extremely helpful arno, it's been a great help being able to ask questions rather than pour over tutorial after tutorial, in the hope that it might have the information I need. :D

A very grateful

Marcus
 
Hi Marcus,

I don't think SGX adds a flatten to the area you are working on, so if you just place all your objects at altitude zero, with altitudeIsAgl set to true, they should all appear at the altitude of your mesh.

Maybe it is easier to use a program like Rwy12 and just slew around while you place your objects? For objects outside of airports that might be easier.
 
Cheers, Arno. I'm way ahead of you. :)
I've been getting to grips with Runway12 this afternoon. It's a very useful program. One question I have, however, you might be able to answer. In the RW12 tutorial for adding your own objects, it says to group all models into one XML and compile as a BGL. Well whenever I have used XML in the past I have provided coordinates for just one object at a time. If I were to group all my mdl's in one XML and compile, should I leave out the Lat/Long information? To be honest I only know enough about XML to do what I need to, copying and pasting from one file to another.
The tutorial makes it sound easy, but I have no idea on what the structure of this XML file should be like.
Or would you rather I asked this question on the RW12 forum?

Thankyou for coming back to me with more ideas :D

Marcus
 
Hi Marcus,

I think they are talking about making your object library in that case. In your library XML there are no coordinates (Rwy12 makes the XML file with the coordinates for you). You could also try Library Creator XML (available on this site), that gives you a GUI for making the library.

Besides that you also need to make a XML file for Rwy12 itself, there is an article about that on the Rwy12 site.
 
Hi Arno,

"Besides that you also need to make a XML file for Rwy12 itself, there is an article about that on the Rwy12 site."

I think that's what I need, I'll go have a look now. Cheers

I am already familiar with your Library Creator XML, hence my thanks in the post above. If I can use it consort with RW12 then, thankyou all the more.

Cheers

Marcus
 
Haha, no worries now. I'll just copy the structure of one of the XML files included with RW12 and change the information to my own ends. It should work.................... hopefully.

Cheers

Marcus
 
Back
Top