• 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.

FS2004 Texture vs ground poly orientation

Messages
243
Country
italy
Hi all.
When I have a ground poly selected, I can pass over its vertexes reading one by one its related numbers (for example a rectangular poly has 4 vertexes numbered from 0 to 3). When I edit the poly, I loose the ability to understand the vertex number inside the editor. So many times (in particular when in some situation I copy the poly in another position and I need to rotate it and then I edit it inside GP Editor) I cannot understand the position of the texture related to the position of the polygon without compiling the project (and many times the position is wrong so I have to edit again). If I'm not wrong, I remember that in some previous version of GP Editor there was the possibility to recognise the vertex number inside the editor too. Is there another way to solve this point or something that I forgot to do?
More over I noted that If I rotate a poly and then I edit it in GP editor, If I click on the reset button inside the editor and I set the texture position again, after I compiled the project, I find the poly in the old position as If I had never rotated it.
 

gadgets

Resource contributor
Messages
9,388
Country
ca-britishcolumbia
The orientation of a GP poly in the GP Editor is (unless changed) always as in the ADE display. The area of the texture covered by the poly will be what you see in the sim after compilation. This has always been the general operation of ADE_GP. Once you have rotated/resized the poly (with respect to the texture) this is still the case. So, unless the poly is a pure rectangle or oval (or square or circle), the final orientation of the texture should be obvious. I am reluctant to risk destabilizing the GP Editor for a new feature of such apparent limited usefulness. Nonetheless, I will investigate displaying a tooltip containing the vertex number while the mouse hovers over a vertex.

If I click on the reset button inside the editor and I set the texture position again, after I compiled the project, I find the poly in the old position as If I had never rotated it.
The purpose of the Reset function is to return the relationship between texture and GP to that which existed when the GP was first submitted to the editor. The situation you are describing is not clear since the GP Editor does not "set texture position" nor does it change GP position. However, I infer from your statement that you rotated the Reset(ed) position of the GP relative to the texture but that, after compiling that relationship was unchanged from the relationship that existed on the entry to the GP Editor during which the Reset occurred. I have just attempted a similar action. The result was as I expected, i.e. after compilation the GP texture display was in accord with the most recent rotation. Are you sure you clicked OK and not Cancel?
 

gadgets

Resource contributor
Messages
9,388
Country
ca-britishcolumbia
Turns out displaying the vertex number was easy and non-threatening to the GP Editor's stability. It's done.

But, I will defer release until it's clear whether or not there's a problem with the Reset function.
 
Messages
243
Country
italy
The purpose of the Reset function is to return the relationship between texture and GP to that which existed when the GP was first submitted to the editor. The situation you are describing is not clear since the GP Editor does not "set texture position" nor does it change GP position. However, I infer from your statement that you rotated the Reset(ed) position of the GP relative to the texture but that, after compiling that relationship was unchanged from the relationship that existed on the entry to the GP Editor during which the Reset occurred. I have just attempted a similar action. The result was as I expected, i.e. after compilation the GP texture display was in accord with the most recent rotation. Are you sure you clicked OK and not Cancel?
Hi Don, I made again the same operation and I noted that probably I rotated the poly in the wrong direction and this was the reason of the problem. But this is the reason for which the tooltip could be useful to have a reference...
 
Messages
243
Country
italy
Don, I'll try to better explain the operative sequence I did.

I create with Helper Shape a rectangle Width 1.8m, Height 5.5m Heading 50 degrees.

I used Make Ground Custom Poly on it. In AdeGP editor I select the texture I want to use. (Clipboard01) Clipboard01.jpg

Now I rotate the poly to set it over the part of the texture I want to use. (Clipboard02)Clipboard02.jpg (and in particular I positioned the vertexes in the following position: (U0.574 V1.000, U0.994 V1.000, U0.574 V0.000, U0.994 V0.000)

Now I'm pretty sure that the tip of the arrow is on heading 50. Then I clic on OK and save it.

Now I want to use the same poly with the same part of texture I selected before, simply with different orientation over the ground.

I select it in ADE display, I copy and paste it (using copy object and paste object) in a different position and I rotate it for example of 180 degrees. I noticed that the rotation sometimes create texture problem (the texture is in a wrong position), even if this does not happens every time and I did not understand why nor when, so I double click on the poly to enter the ADE GP editor and I find this situation (Clipboard03)Clipboard03.jpg. This condition happens for every kind of rotation (180 degrees but also for only 1 degree rotation).

As you can see the poly is now in a strange position: it is not in the 50 degrees initial position, it is not aligned with the texture as I set in the previous poly and it is not in the 180 degrees rotated position. The only thing I noted is that it seems that two vertexes remained in the previous position while the other two rotated around the rectangle's diagonal (Ux.xxx Vy.yyy, U0.994 V1.000, U0.574 V0.000, Uz.zzz Vw.www) (Clipboard04)Clipboard04.jpg

Now I can re-set the two vertexes position manually and the situation is solved. The second poly is now rotated of 180 degrees and the texture is correctly aligned with its position (the tip of the arrow is 180 degrees)



This above described behaviour appears for every kind of shape used for the poly and every time I rotate the poly inside the ADE GP Editor to adjust it on the texture I need
 

gadgets

Resource contributor
Messages
9,388
Country
ca-britishcolumbia
But this is the reason for which the tooltip could be useful to have a reference...
I trust you saw my second post stating that I had already implemented the feature.

I select it in ADE display, I copy and paste it (using copy object and paste object) in a different position and I rotate it for example of 180 degrees. I noticed that the rotation sometimes create texture problem (the texture is in a wrong position), even if this does not happens every time and I did not understand why nor when, so I double click on the poly to enter the ADE GP editor and I find this situation (Clipboard03) Clipboard03.jpg . This condition happens for every kind of rotation (180 degrees but also for only 1 degree rotation).
I'm uncertain about what you mean by "the texture is in a wrong position". The GP Editor has no way of differentiating between a simple copy and paste on the ADE display and all vertices being moved to a new position otherwise. When you enter the GP Editor after pasting - whether or not rotated - the Editor will detect that all the vertices have different geographical positions from when the poly was last edited by the GP Editor. While the Editor can cope with a single vertex moving and adjust the UV parameters accordingly, it has no basis for doing so if all vertices have changed. So, it will initially display the poly as if it had not been previously textured.

The only thing I noted is that it seems that two vertexes remained in the previous position while the other two rotated around the rectangle's diagonal

This would be the effect if you had not selected all the vertices prior to rotating. (You could argue that there should be no need to select vertices prior to a rotation, but then somebody would find a need to rotate less than all them.)

This above described behaviour appears for every kind of shape used for the poly and every time I rotate the poly inside the ADE GP Editor to adjust it on the texture I need
Yes, as noted above, when the GP Editor detects two or more vertices have changed geographic position, it relies on the user to relocate the vertices relative to the texture as necessary I realize this is a PITA when all you've done is rotate after a copy and paste, leaving all texture assignments are still valid. But adding a "rotate detection" function at this point is "not in the cards".
 

gadgets

Resource contributor
Messages
9,388
Country
ca-britishcolumbia
Shortly after making my last post, I had the feeling I should check the code. (It's been years since I looked at that part of the ADE-GP code in detail.) So I did.

I found that the GP Editor already does check for simple moves and rotation of objects. I have confirmed that code works for moves and I see nothing in the logic that suggests it shouldn't work equally well for rotation.

I took you at your word that you actually rotated the GP. But, it does not appear that ADE supports rotation of individual objects. Which begs the question "How did you rotate the object". I suspect what you rotated was the helper shape and that you simply created a new object at the resulting heading - which explains the GP Editor behaviour.
 
Messages
243
Country
italy
Shortly after making my last post, I had the feeling I should check the code. (It's been years since I looked at that part of the ADE-GP code in detail.) So I did.

I found that the GP Editor already does check for simple moves and rotation of objects. I have confirmed that code works for moves and I see nothing in the logic that suggests it shouldn't work equally well for rotation.

I took you at your word that you actually rotated the GP. But, it does not appear that ADE supports rotation of individual objects. Which begs the question "How did you rotate the object". I suspect what you rotated was the helper shape and that you simply created a new object at the resulting heading - which explains the GP Editor behaviour.

Don, after I created the first poly, I removed the helper shape.
I clic on the poly in ADE display, I copy and paste it in another place, then I rotate it using ALT + mouse wheel or ALT+CTRL + mouse wheel. As you can see in the Clipboard05Clipboard05.jpg all the poly is selected (not only some vertex).
Anyway I tried to select only three of the four vertexes and in this way it is not possible to rotate the poly.

Anyway, it's quite difficult to explain exactly what happens and moreover why this happens on some poly and not on other. I attach (Test Project.zip) two poly created in two different moments but with the same crtieria (using the helper shape). One of the two after copied and pasted and rotated gives the problem I tried to describe, the other (after the same operations) does not.
----
When I said "the texture is in a wrong position" I mean (you can se in the previous clipboard03) that inside ADE GP Editor, the shape of the poly is not aligned to the texture as it was when I firtsly created and edited the poly. If I compile the project without edit again the poly the image appears as follows (Clipboard06)Clipboard06.jpg: the lower arrow is the one firstly created and edited, the upper one is the one copied pasted and rotated only 1 degree. As you can see the texture is misaligned due to the previously described behaviour.
 

Attachments

  • Test Project.zip
    34.3 KB · Views: 77

gadgets

Resource contributor
Messages
9,388
Country
ca-britishcolumbia
I am able to duplicate something similar and have confirmed (thanks to you having suggested I enable display of vertex number in the GP editor) that the vertex numbers in the GP Editor are no longer consistent with those on the ADE screen after rotation. Don't know why, yet, but I'll get there eventually.

Jon, when an object is copied and pasted by ADE, does the assigned vertex number (sometimes) change?

I searched "high and low", unsuccessfully, for instructions on how to rotate objects in ADE. I was convinced it was not possible. Thanks for the help.

Regarding my comment above about not having selected vertices, It appeared that particular rotation was being done in the GP Editor. The situation you described is what would have happened in the GP Editor had you attempted rotation without all the vertices selected.
 

gadgets

Resource contributor
Messages
9,388
Country
ca-britishcolumbia
Found it! (or at least a contributor). Turns out in the most complex part of ADE-GP code that I had missed a mathematical minus sign ("-") that required special treatment. That is now fixed. (It may only be half the problem. But, if it is, I'll know where to look for the other half.) This version also displays vertex numbers - right-click while on or right-click and move onto, a vertex.

Please test the attached
 

Attachments

  • ADE_GP_222311(a).zip
    164.1 KB · Views: 77
Messages
243
Country
italy
Found it! (or at least a contributor). Turns out in the most complex part of ADE-GP code that I had missed a mathematical minus sign ("-") that required special treatment. That is now fixed. (It may only be half the problem. But, if it is, I'll know where to look for the other half.) This version also displays vertex numbers - right-click while on or right-click and move onto, a vertex.

Please test the attached
Perfect Don, many thanks and glad to be useful. I'll test it immediately and let you know...
Ciao
 
Messages
243
Country
italy
Right, the vertex number indication is ok.
The strange rotation of the edge of the poly inside the ADE GP Editor is still present apparently randomly. A few tests made me think that it could be due to the fact that sometimes when in ADE display you rotate the poly, it could happen that the rotation is excessive so you want to rotate back a few degrees to adjust it. It seems that in this case when you double click on the poly to open the GP Editor, the edge of the poly appears rotated a little bit on the the texture. But this is not true every time. With some old poly created few days ago the problem is more evident, with others created at the moment using the new version it appears sometimes. I don't know. Anyway with the vertex indication inside the editor it is possible to correct easily the problem even if this behaviour force me to check them out pretty much every poly I paste and rotate on ADE display because I'm not sure if they remain correctly oriented over the texture or not.

I noted two three other things on this version of ADE GP editor:
1. before this update, it was possible to select more vertex of the edge of the poly using left click e moving the mouse dragging over the vertexes, now to select more than one vertex the only way is to use CTRL e clic on every vertex you want to select.
2. to rotate the edge of the poly inside ADE GP Editor now the only way is to use the mouse wheel (alone or coupled with ALT); before the update it was also possible to select (using select All) all the vertexes (or only those needed) and rotate the edge around simply dragging one of the vertexes.
3. it seems that it is not possible to move the edge of a poly (or a line) over the texture (ADE GP Editor) dragging it like it was previously. The only way is to insert the coordinates (UV)
 
Last edited:

gadgets

Resource contributor
Messages
9,388
Country
ca-britishcolumbia
Yes. It looks like I inadvertently disabled the the select box function. I'm about to leave for a long weekend but will fix that when I return

Re the "strange rotation", if you create a poly, whether or not rotated in ADE, send it to the GP Editor, rotate, resize or move vertices and send it back to ADE, and then copy and paste that GP in ADE, when you send the "pasted" GP to the GP Editor, any rotation, resizing or moves of its ancestor will still apply, i.e. copy and pasting in ADE does not reset the earlier X/Y or U/V settings applied by the GP Editor. To get rid of the effects of the earlier rotation, resizing or moves of its ancestor you must Reset. Please retest with this in mind.
 

gadgets

Resource contributor
Messages
9,388
Country
ca-britishcolumbia
Select box is back as well as rotate/drag/etc. functions. I hope this works for you because, due to the limited communication between ADE and ADE-GP, I don't see how I can improve it further.
 

Attachments

  • ADE_GP 222311(b).zip
    153.2 KB · Views: 76
Messages
243
Country
italy
Select box is back as well as rotate/drag/etc. functions. I hope this works for you because, due to the limited communication between ADE and ADE-GP, I don't see how I can improve it further.
Ok, it seems to work correctly. Thanks.
 
Messages
243
Country
italy
Re the "strange rotation", if you create a poly, whether or not rotated in ADE, send it to the GP Editor, rotate, resize or move vertices and send it back to ADE, and then copy and paste that GP in ADE, when you send the "pasted" GP to the GP Editor, any rotation, resizing or moves of its ancestor will still apply, i.e. copy and pasting in ADE does not reset the earlier X/Y or U/V settings applied by the GP Editor. To get rid of the effects of the earlier rotation, resizing or moves of its ancestor you must Reset. Please retest with this in mind.
Don, I think my explanation about the operation I did was not so clear.
I create the poly in ADE, I send it to ADE GP and inside there I set the position and the size of the texture. Then I go back to ADE, I copy and paste and rotate the poly in ADE (because I need to have it in a new position and new heading over the ground, for example an arrow sign over a street). Then in some cases when I send it to ADE GP I find that the texture is misaligned respect how it was in the first poly.

Anyway if this is hard to reproduce (and if this happens only to me and not to other designers), don't worry, the possibility to know the vertex numbers inside ADE GP now gives a big hand to re-set the texture position.

Thanks
 

gadgets

Resource contributor
Messages
9,388
Country
ca-britishcolumbia
We're both describing the same series of operations. It's not a matter of being unable to reproduce your situation; it's that, with the current "communication" between ADE and ADE-GP, I don't see any way to avoid your situation without adversely affecting other operations.

The fundamental problem is that the GP Editor has no "knowledge" of what's gone on in ADE. When you submit the copied, pasted and rotated poly to ADE-GP, it appears to the GP Editor to be a previously processed poly all four vertices of which have been moved. The Editor then determines whether all vertices have been moved by the same amount since the last edit and, if so, adjusts texture positioning. This would be the case if you had either "dragged" the original to poly to a new position, rotated it without moving or copied and pasted it to a new position. But, when you add rotation after copy and paste, the vertices no longer have moved the same amount (since the last edit) and ADE-GP has no basis for adjustment. I suspect this is the cause of the issue only "sometimes" occurring. In that latter case, the solution is to Reset the vertices and reposition the vertices relative to the texture.

The latter issue could be avoided by Jon clearing the texture positioning data upon pasting. But, that would mean all pastes, whether or not rotated, would be affected and those that now work no longer would. I don't see that as a "step forward". So, I think you are going to have to "live" with the current capability.

I will re-release the current version of ADE-GP since it does offer some additional capability over the previously-released version
 
Top