Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

WorldComposer a tool to create real World AAA quality terrain

Discussion in 'Assets and Asset Store' started by eagle555, Dec 6, 2013.

  1. TheCheese

    TheCheese

    Joined:
    Nov 25, 2009
    Posts:
    82
    Hi Nathanial,
    Thank you for your fast replies to my questions -

    I'm wondering if there is a way to get the position of an object in Unity world space given real-world latitude, longitude and altitude coordinates? I saw the post by FogGobbler a couple weeks ago, but I can't figure out how to use the methods he was referring to.

    It would be great if you could provide a function that returned a Vector3 position value given a long, lat and altitude values... or an explanation of how to do that would be appreciated!
     
  2. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,705
    Hello,

    Here's a script that calculates latlong of a Target transform and also calculates the position based on latlong coordinates. You need to enter the latlong center of your exported area from WC. Global_settings_tc.js needs to dropped on an empty GameObject in the Hierarchy and assigned to the script.

    Code (csharp):
    1. #pragma strict
    2.  
    3. var global_script: global_settings_tc;
    4. var latlong_center: latlong_class = new latlong_class();
    5. var latlong: latlong_class[];
    6. var offset: Vector2 = new Vector2(0,-27);
    7.  
    8. function Start(){
    9.    
    10.     var counter : int = 0;
    11.    
    12.     latlong[2].latitude = 49.34544372558594;
    13.     latlong[2].longitude = -119.579584441234;
    14.    
    15.     for(var p in latlong){
    16.        
    17.         var pos = calc_position(p.latitude, p.longitude);
    18.         var go = GameObject.CreatePrimitive(PrimitiveType.Cube);
    19.         go.transform.position = new Vector3(pos.x, 0, pos.y);
    20.        
    21.         Debug.Log(calc_latlong(go.transform.position).x+" : "+calc_latlong(go.transform.position).y);
    22.        
    23.         go.name = "Test point " + counter;
    24.        
    25.         counter ++;
    26.     }
    27. }
    28.  
    29. function calc_latlong(pos : Vector3) : Vector2
    30. {
    31.  
    32.     var map_pixel: map_pixel_class = new map_pixel_class();
    33.  
    34.     var map_pixel_center: map_pixel_class = global_script.latlong_to_pixel2(latlong_center,19);
    35.  
    36.     var map_resolution: double = global_script.calc_latlong_area_resolution(latlong_center,19);
    37.    
    38.     map_pixel.x = ((pos.x-offset.x)/map_resolution)+map_pixel_center.x;
    39.     map_pixel.y = (-(pos.z-offset.y)/map_resolution)+map_pixel_center.y;
    40.  
    41.     var returnVal : latlong_class = global_script.pixel_to_latlong2(map_pixel,19);
    42.  
    43.     return Vector2(returnVal.longitude, returnVal.latitude);
    44. }
    45.  
    46. function calc_position(lat : double, lon : double) : Vector2
    47. {
    48.     var latlong = new latlong_class(lat, lon);
    49.  
    50.     var returnVal : Vector2;
    51.  
    52.     var map_pixel: map_pixel_class = global_script.latlong_to_pixel2(latlong,19);
    53.     var map_pixel_center: map_pixel_class = global_script.latlong_to_pixel2(latlong_center,19);    
    54.  
    55.     var map_resolution: double = global_script.calc_latlong_area_resolution(latlong_center,19);
    56.    
    57.     returnVal.x = (map_pixel.x-map_pixel_center.x)*map_resolution;
    58.     returnVal.y = (-map_pixel.y+map_pixel_center.y)*map_resolution;
    59.    
    60.     returnVal += offset;
    61.    
    62.     return returnVal;
    63. }
    Nathaniel
     
    Last edited: Mar 25, 2014
  3. TheCheese

    TheCheese

    Joined:
    Nov 25, 2009
    Posts:
    82
    Excellent! Thank you very much!

    [Edit: - is altitude simply the y value in Unity world units?]
     
  4. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,705
    Yes it is, although the altitude is not needed in the conversion.

    Nathaniel
     
  5. FuzzyQuills

    FuzzyQuills

    Joined:
    Jun 8, 2013
    Posts:
    2,871
    Here's a question for you. I saw how you did the shadow removal - are the shadows then used to build a heightmap to generate the terrain? this is one impressive package, would allow me to build my home, if i had money to spend, which i don't so ah well...

    Again, nice work! And the shadow thing sounds like something this tool could do!

    -FuzzyQuills
     
  6. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,705
    The shadow removal works on images, the heightmap is extracted from the server seperately.

    Nathaniel
     
  7. FuzzyQuills

    FuzzyQuills

    Joined:
    Jun 8, 2013
    Posts:
    2,871
    @eagle555: Got your PM, thanks! and I had no idea satellite images actually had heightmap data in them. But here's a theory i was thinking of after seeing your tool remove the shadows:
    • the shadows would not be completely removed, rather the shadows are extracted from the image upon removal, storing them in a texture.
    • the shadow texture is then used to build a heightmap, which is then applied to the terrain, allowing for almost pixel-perfect accuracy!
    Just a theory, as obviously a pre-made heightmap makes things dirt-easy to do! And it would also mean the removed shadows wouldn't go to waste in the black hole of resource saving. And again, thanks for the PM.

    -FuzzyQuills
     
  8. lazygunn

    lazygunn

    Joined:
    Jul 24, 2011
    Posts:
    2,749
    The elevation data for each point on the image is grabbed in a different function to the images, the shadow removal process helps the imagery stay consistently lit so existing shadows in it won't contradict unity's own shadowing and sun position
     
  9. FuzzyQuills

    FuzzyQuills

    Joined:
    Jun 8, 2013
    Posts:
    2,871
    @lazygunn: well, i did assume that, just thought the shadows could have another use... Anyway, i do know that normal maps are sometimes generated from shadows like the ones this tool removes.Could be used so that terrains could have a parallax offset in the LOD for the terrain, giving a healthy performance boost!
     
  10. TheCheese

    TheCheese

    Joined:
    Nov 25, 2009
    Posts:
    82
    Hi again,

    Sorry, I'm having some trouble with the script you provided above - it doesn't seem to be working correctly for me - the returned position is always in the same position relative to the exported terrain (just south of the terrain's edge). When I go back and re-import a new terrain encompassing that position, the script again returns a value just south of the new terrain's area. Could I send you a simple example of my project?
     
  11. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,705
    Hello,

    Yes, if you upload it and send me the link to my e-mail Nathaniel_Doldersum@hotmail.com, I will take a look...

    Nathaniel
     
  12. rahul007

    rahul007

    Joined:
    Jul 9, 2013
    Posts:
    45
    Hi eagle555. This is an amazing product. Could you just make a video of this composing amazon forest. I want to see the the coverage it can do.
     
  13. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,705
    For the rain forest quality you can take a look at Bing maps as it is the current source of WorldComposer:
    http://www.bing.com/maps/

    Nathaniel
     
  14. rahul007

    rahul007

    Joined:
    Jul 9, 2013
    Posts:
    45
    No I meant if you could do a video of world composer making the amazon forests.
     
    Last edited: Mar 6, 2014
  15. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,705
    When TerrainComposer 2 comes out I will make new video's. I think the 24 hour demo is a good example of what you can adhieve.
    http://forum.unity3d.com/threads/218650-24-Hour-Terrain-Demo

    Amazon forest will require an Art Package like Michael O's Tropical Nature pack. Also for placing trees and grass TerrainComposer is needed.

    Nathaniel
     
  16. SimStm

    SimStm

    Joined:
    May 24, 2013
    Posts:
    44
    Hey Nathaniel, I'm making some tests comparing quality, and I noticed an interesting thing in Google Maps "3D Earth Mode": https://www.google.com.br/maps/plac...2!3m1!1s0x808f7937fb7bd2e3:0x9c775799fe273227

    I mean, the height map is very precisely, even with the minimal mountain details.

    I have achieved this using WorldComposer (+ more erosion with WM):
    $7lWvk.jpg

    Have you tried using the Google Maps API with a "WorldComposer test build" if he exports the heightmap precisely as he shows at the GMaps Earth Mode?
     
  17. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,705
    It is possible to use Google Maps Elevation Api. But at the moment it is too restricted, it can only do a 150x150 heightmap in a day without exceeding the 24.000 requests. A 150 heightmap is so small, that it is not interesting to build in WC at the moment...I hope google will improve this.
    http://chrisbrough.com/project/2012/11/Heightmaps-with-Google-Elevations/

    Nathaniel
     
  18. SimStm

    SimStm

    Joined:
    May 24, 2013
    Posts:
    44
    I get it. it's such a shame that google continues to put these limitations in ver api's. I already have many issues with PHP YouTube API one time.
     
  19. lazygunn

    lazygunn

    Joined:
    Jul 24, 2011
    Posts:
    2,749
    The ArcGIS store has a nice selection of height data available to trial owners on Beta

    It might not be as good as Bing (actually it seemd very similar, NED for america (10m or less, generally), STRM for most the rest of the world(90m)

    I'm sure google have compiled the most amazing elevations system in the world but decided to holdback until it was unusable for gis (seemed aimed at geolocation and basically stuff for bike meters and car readouts) but costs you 10 grand to get a decent service
     
  20. TomEnokR

    TomEnokR

    Joined:
    Jan 23, 2014
    Posts:
    17
    Hello all.

    I'm suddenly experiencing a very strange anomaly I'm hoping you can help me resolve.

    I successfully created a terrain using world composer, saved the scene, and left it alone. Three weeks later, I just opened it up, and it's acting strangely. The terrain images are completely whited out until I click on the specific terrain mesh. Then it appears, UNLESS I zoom toward it, and then it turns white as I approach it. Additionally, I have added a camera, and, as you can see in the camera, there is no image information. Just a white terrain.

    Any suggestions?

    $Capture.JPG

    Any help would be appreciated.
     
  21. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,705
    Hello,

    This looks like an additional terrain shader issue. You proberly have an Asset in your project that included a terrain shader that causes this. What you need to do to get it normal again is find the terrain shader and delete it.

    Nathaniel
     
  22. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,705
    Hello Everyone,

    I did send the users that bought WorldComposer from my site in the past, an email with the latest WorldComposer 1.15, as auto update is broken in version 1.1 and 1.11. If you bought it from my site and didn't receive a mail let me know...

    Nathaniel
     
    Last edited: Mar 17, 2014
  23. neopan

    neopan

    Joined:
    Jan 15, 2013
    Posts:
    47
    could world composer be configured to:

    1 - take a raster image of the earth, a la "Natural Earth ii" http://www.naturalearthdata.com/downloads/10m-raster-data/10m-natural-earth-2/
    2 - create some sort of biome map that populates according to ground color, terrain and trees grass shrubs etc.. or in conjunction with terrain composer

    that would then spit out a series fo maps that connect to form a planet earth?
    or do that using its standard modern world imagery? [allowing you to erase the world imagery layer when needed after replacing buildings and trees or whatever]
     
  24. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,705
    You can do it using standar world imagery from WorldComposer, then use TerrainComposer to select the colors, I think it's more precise:



    Nathaniel
     
  25. bilke

    bilke

    Joined:
    Jul 13, 2012
    Posts:
    54
    First thanks for the script. Unfortunately I found it just recently, it had saved me a lot of time if I found it earlier. Three questions:

    1. Why is it necessary to instantiate the global_settings script in a GameObject? I tried to instantiate it with new() directly in the convert-script but this does not work.

    2. I assume the factor *1.19 comes from the Bing ground resolution in zoom level 17, right? It is stated several times in this forum that in zoom level 17 one pixel corresponds to 1 m in real world but this is obviously not the case.

    3. My terrain has a scale != 1.0 (set in "Create Terrain") where do I have to multiply with this factor in your conversion script?

    In general it would be very cool to more modularize the functionality of WorldComposer. For example the latlong/pixel conversion functionality could be refactored in its own class without any dependencies to the global_settings script.
     
    Last edited: Mar 24, 2014
  26. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,705
    Hello Bilke,

    I have an update of the script, as it wasn't working correctly.

    Code (csharp):
    1. #pragma strict
    2.  
    3. var global_script: global_settings_tc;
    4. var latlong_center: latlong_class = new latlong_class();
    5. var latlong: latlong_class[];
    6. var offset: Vector2 = new Vector2(0,-27);
    7.  
    8. function Start(){
    9.    
    10.     var counter : int = 0;
    11.    
    12.     latlong[2].latitude = 49.34544372558594;
    13.     latlong[2].longitude = -119.579584441234;
    14.    
    15.     for(var p in latlong){
    16.        
    17.         var pos = calc_position(p.latitude, p.longitude);
    18.         var go = GameObject.CreatePrimitive(PrimitiveType.Cube);
    19.         go.transform.position = new Vector3(pos.x, 0, pos.y);
    20.        
    21.         Debug.Log(calc_latlong(go.transform.position).x+" : "+calc_latlong(go.transform.position).y);
    22.        
    23.         go.name = "Test point " + counter;
    24.        
    25.         counter ++;
    26.     }
    27. }
    28.  
    29. function calc_latlong(pos : Vector3) : Vector2
    30. {
    31.  
    32.     var map_pixel: map_pixel_class = new map_pixel_class();
    33.  
    34.     var map_pixel_center: map_pixel_class = global_script.latlong_to_pixel2(latlong_center,19);
    35.  
    36.     var map_resolution: double = global_script.calc_latlong_area_resolution(latlong_center,19);
    37.    
    38.     map_pixel.x = ((pos.x-offset.x)/map_resolution)+map_pixel_center.x;
    39.     map_pixel.y = (-(pos.z-offset.y)/map_resolution)+map_pixel_center.y;
    40.  
    41.     var returnVal : latlong_class = global_script.pixel_to_latlong2(map_pixel,19);
    42.  
    43.     return Vector2(returnVal.longitude, returnVal.latitude);
    44. }
    45.  
    46. function calc_position(lat : double, lon : double) : Vector2
    47. {
    48.     var latlong = new latlong_class(lat, lon);
    49.  
    50.     var returnVal : Vector2;
    51.  
    52.     var map_pixel: map_pixel_class = global_script.latlong_to_pixel2(latlong,19);
    53.     var map_pixel_center: map_pixel_class = global_script.latlong_to_pixel2(latlong_center,19);    
    54.  
    55.     var map_resolution: double = global_script.calc_latlong_area_resolution(latlong_center,19);
    56.    
    57.     returnVal.x = (map_pixel.x-map_pixel_center.x)*map_resolution;
    58.     returnVal.y = (-map_pixel.y+map_pixel_center.y)*map_resolution;
    59.    
    60.     returnVal += offset;
    61.    
    62.     return returnVal;
    63. }
    1). You need to include it because the convert functions are inside there. You can also paste those functions in this script and then you won't need to include it.
    2). No this is not the case. I have a different calculation now straigth from Bing to calculate the map resolution.
    3). Don't have to use this anymore in the new script.

    Yes that indeed is a good option, thanks for suggesting :), will do that for TC2 version of WorldComposer...

    Nathaniel
     
    Last edited: Mar 25, 2014
  27. bilke

    bilke

    Joined:
    Jul 13, 2012
    Posts:
    54
    Thanks a lot Nathaniel, it works! I have also added handling of the terrain scaling factor: https://gist.github.com/bilke/9801439.

    One last question: where does the offset-vector (0, -27) come from?
     
  28. John-G

    John-G

    Joined:
    Mar 21, 2013
    Posts:
    1,122
    Hi Nathaniel with RTP3.1 submitted to the asset store, will you be uploading the new workflow tutorial for Worldcomposser terraincomposer and rtp workflow?
     
  29. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,705
    It seems there's some inaccuracy with converting using the bing provided math. I think it is because of the Mathf in Unity uses floats while doubles are needed...That's why I added the offset, so you can see a lat/long in worldcomposer and with the offset you can get it exactly matching.

    Nathaniel
     
  30. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,705
    I will make a video for it with TerrainComposer 2, as I'm working fulltime on getting it released. I hope it will be released somewhere at the end of next month...

    Otherwise I would have to make it again for TC2 and that would be double work...

    Nathaniel
     
  31. TheCheese

    TheCheese

    Joined:
    Nov 25, 2009
    Posts:
    82
    Hi,

    I have some real-world altitude readings that I'm trying to map onto a world-composer generated terrain, and the readings aren't matching up 1:1 with Unity Y coordinates.

    Is there some conversion I need to be doing to make this work?

    Thanks,
     
  32. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,705
    Hello,

    WorldComposer default uses 9000 units for the terrain Y, as the earth highest point is lower then 9000, this way everything can be exported into a heightmap without getting a ceiling. If you need 1:1 you have to set 'Terrain Height' to 1000 in the Create Terrain tab in WorldComposer and recreate the terrains. If you have TerrainComposer you can change the terrain Y in TC Terrain List -> Size -> Y, then shift click <Fit All>.

    Nathaniel
     
  33. TheCheese

    TheCheese

    Joined:
    Nov 25, 2009
    Posts:
    82
    OK - will give it a try.

    Thanks!
     
  34. dbrian

    dbrian

    Joined:
    Jun 1, 2013
    Posts:
    32
    Hi Nathaniel -

    In the Create Terrain window, it's not obvious to me what "Max Size" does. Could you explain it?

    Thanks
     
  35. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,705
    From 'Image Import Settings' down to 'Format' in the Create Terrain tab are all texture import settings. Normally if you click on an image in your project you get these Texture Import Settings in the Inspector. The Max Size is the resolution that Unity scales the image to, your image can be 4k but can scale it down to a 1k.
    https://docs.unity3d.com/Documentation/Manual/Textures.html

    Nathaniel
     
  36. dbrian

    dbrian

    Joined:
    Jun 1, 2013
    Posts:
    32
    I see. Thanks!
     
  37. TheCheese

    TheCheese

    Joined:
    Nov 25, 2009
    Posts:
    82
    Hi again,

    I've tried both methods you've suggested with these results:
    - I tried recreating the terrains in WorldCompser with a scale of 1000. This resulted in a very flat looking terrian. While there is some very slight height happening, I'm working with a very hilly terrain and this look isn't acceptable.
    - I tried the TerrainComposer approach of changing the scale and hitting the <Fit All> button, but got an error saying "Terrain List length needs to be 1, 4, 9, 16... You need to add 14 terrain or delete 1". So I tested this method with just 1 terrain and the result was the same as above - very flat looking.

    So instead of converting the current terrain scale to fit Unity's y scale, instead I'd like to convert my real-world altitude readings to the default WorldComposer scale. I've tried multiplying my altitude readings by 9, but that doesn't seem to work. Could you please provide me with a formula for that? It would be much appreciated!
     
  38. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,705
    How do you import that map with the height readings? As a 16 bit raw greyscale? As a raw image can have a maximum height value of 1, which then would be 9000 meter in WorldComposer default scale. So what you need to do is not multiple your altitude readings by 9, but divide them by 9000. Then it should work with the default WC scale.

    Nathaniel
     
  39. TheCheese

    TheCheese

    Joined:
    Nov 25, 2009
    Posts:
    82
    Hi,

    Sorry - I don't understand your question about the heightmap format. I'm using the default WorldComposer settings...

    I'm afraid dividing the altitude reading by 9000 won't work.
    For example, I have a reading of 335.5 meters at position 49.312496 -119.547211383 - which is ~ 4 meters above ground level.

    At this point in the Unity scene the ground level is at approx 421 m. So the formula I use should give me a value slightly larger than 421...obviously dividing 335 by 9000 won't give me that value.

    Sorry if I'm misunderstanding your instructions...
     
  40. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,705
    I thought you had your own custom heightmap from somewhere else?. If you are using a WorldComposer extracted heightmap, the height scale on 9000 and terrain scale on 1 will be by default the real world scale. Then if there's a difference you need to transform the terrain GameObjects on the y-axis with the difference, so in your case 421-335.5 = 85.5 m down.

    Nathaniel
     
  41. Drum

    Drum

    Joined:
    Dec 8, 2010
    Posts:
    29
    Hi, Sorry if this has been asked before, but, I'm modelling some coastal terrain and have used PNG format for the image export. I then tried editing the PNGs in Photoshop to give me a nice smooth transition between land and water, but the transparency doesn't effect the built terrain at all, there are still hard edges and white filler tiles. How can I make use of transparency in my ima
     
  42. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,705
    Hello,

    Unity terrain doesn't support transparency, so this is not possible. I recommend using JPG format as it takes less memory. Can you show a screenshot? Then I can give better advice what to do...

    Nathaniel
     
  43. Drum

    Drum

    Joined:
    Dec 8, 2010
    Posts:
    29
    Hi Nathaniel,

    I'm trying to model various bits of the Cornish coastline, which inevitably leads to lots of blank times where the sea is. Ideally I'd like to lose these completely blank tiles and also to smooth the edge cutoffs on the others around the coast.

    Here is the whole m\p in the scene view:

    $lizard.png


    And here s a close up of one of the edge tiles showing the too sharp cutoff.

    $2.png

    Thanks,

    Chris
     
  44. Drum

    Drum

    Joined:
    Dec 8, 2010
    Posts:
    29
    Hmm, second image didn't show up for some reason. Trying again here.


    $2.png
     
  45. Drum

    Drum

    Joined:
    Dec 8, 2010
    Posts:
    29
    I have another question. Is it possible to relatively scale the Y axis upwards leaving X and Z unchanged? I am modelling some islands and they are pretty flat. It would, ironically, make them look more realistic if I can tweak the Y scale somewhat.

    Thanks
     
  46. Djiel

    Djiel

    Joined:
    Jun 25, 2012
    Posts:
    108
    Finally picked this up, can't wait to put it to use :D
    Hopefully I won't have too much trouble using it hehe.
     
  47. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,705
    Hello Drum,

    As for the white image with the no sign camera, this means Bing hasn't got the image zoom level for that area. You will need to zoom out to get it. Before you export the images you can check inside the WC map interface if the zoom level is supported by zooming to that level.

    Yes you can create a higher heightmap with WC. What you need to do is export with terrain height on 9000, then after exporting you can higher the number, for example 18000 will give a 2x higher heightmap.

    $HigherHeightmap.jpg

    Nathaniel
     
  48. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,705
    Thanks for picking it up :). If you run into something, just post or send an email ;).

    Nathaniel
     
  49. Djiel

    Djiel

    Joined:
    Jun 25, 2012
    Posts:
    108
    After messing about, I must say all the values are quite overwhelming haha. Cool stuff though.
    I did run into the following problem, and I hope it is simply because I messed up somewhere..

    I took a small piece of US land, near Old Topanga, see the screenshot here;
    https://www.dropbox.com/s/drvtut8q4m5pdmx/Terrain.png

    The top screen is from Google Earth, it has a clear heightmap going on at this spot, where the road is directly next to a mountain.
    However, as visible on the bottom screenshot, the terrain I created looks quite unlike it.

    With 8 m/p, I hoped for quite fancy results. So, what am I messing up?
     
  50. Drum

    Drum

    Joined:
    Dec 8, 2010
    Posts:
    29
    Thanks for the answers Nathaniel, they were a great help.

    I have come across something of an anomaly. I was trying to model Mt Everest, and something peculiar is happening with the highest part of the peak, where it seems to get inverted. I'm sure it's something I am doing wrong, but could you guide me in the right direction please?


    $ev1.png

    $ev2.png