Welcome to Golden Software Support

Shadows SurfaceMap ShadedRelief

Comments

9 comments

  • Avatar
    Drew Dudley

    Hi Kare,

    Thanks for posting your question. I would recommend trying this workflow with the Shaded Relief map in the Surfer. There are controls for the horizontal and vertical light angles in degrees and the Z scale factor; which may give you enough control over the lighting.

    Would creating an aspect grid of your file be helpful? If so, you can highlight specific ranges (in degrees) of the faces the point in a particular azimuthal direction by creating a contour map and then filling only the levels of the aspect of the terrain faces you want to highlight. 

    If you are not getting anywhere with either of these options, please send me a copy of your GRD and SRF file so I can take a closer look. If you are interested, please upload your files here

    I hope this helps!

    Drew

     

    0
    Comment actions Permalink
  • Avatar
    Kåre Øst

    Hi Drew

    Thanks for the answer.

    The horizontal and vertical light i have played with. The z-factor a little (i've put it to one which sounds intuitive corrert, but i got closer to reality at a bit lower than one), but i do not get the exact shadow that i can tell would be right. By playing with the color bar i get closer, but it is nevertheless just meddling for a result that do not get precise. And precise light/shadow is what i want, with no ambient light or reflection or such :) I don't even know what the value that corresponds to the color gradient is for real. 

    I understand the aspect grid, but that would not tell me anything about what might be shadowing the sun in the particular areas, only where they are facing. But nevertheless, i will try and see what it looks like, because part of my project is modelling sun radiation on various snowy surfaces. And that corresponds to both Aspect and Slope (and of course the position of the sun. 

    Here is an example of the aspect as a contourmap. Black is 0-180 and white 180-360 degrees.



    0
    Comment actions Permalink
  • Avatar
    Kåre Øst

    0
    Comment actions Permalink
  • Avatar
    Kåre Øst

    Heres a new pic :) showing a coarse area that i think should be in shadow with the sun Azimuth at west end sun Altitude at 0 degrees.
    I chose chroma as the color in order to get a better view of how surfer thinks light and shadow should be done..

     




    So the question i would like surfer (or any other application, but i prefer Surfer) to ask is this:
    for every point and a given sun position; ask the question:

    can i see the sun from here?

    I think that shaded relief and lightning is mainly for giving the viewer a 3d feeling.

    0
    Comment actions Permalink
  • Avatar
    Drew Dudley

    Hi Kare,

    Thanks for posting your follow-up comments. Surfer does not have a feature that is designed to do exactly what you are looking for; I will add a vote to our suggestion file upon your behalf for this type of functionality in future versions. 

    One thing that you can take a look at, however, is the Viewshed layer in Surfer. This layer will give you all of the visible locations from the transmitter location. My thought here would be to increase the Transmitter height to a large number so that it emulates a sun location at some point in time. Please see these pages for more information about the Viewshed layer:

    The only other idea that I have is to use our Voxler application for this purpose. Voxler will allow you to import a Surfer grid file, create a 3D Surface, and then add a Light that can be positioned anywhere in the scene. For example, here is a 3D surface (HeightField) in Voxler with standard lighting:

    When I add a Light module to the scene, I can position it anywhere that I want, which can create shadowing on different parts of the surface, Here are a few examples (light color is red):

    Perhaps you could use the light module to emulate the sun position in Voxler? You can download a trial version of Voxler here and the example project here.

    Please let me know if you have any questions.

    Thanks!

    Drew

    0
    Comment actions Permalink
  • Avatar
    Kåre Øst

    i got carried away by christmas and skiing. Thanks again Drew for your help. I look forward to have a look at the viewshed functionality. Seems like very useful for my purpose. Voxler maybe, but you know, money is not abundant;) And i have played a lot with lightsources in terragen...

    kind regards, Kåre

    0
    Comment actions Permalink
  • Avatar
    Kåre Øst

    Worked some with the viewshed layer. Probably need to upgrade from surfer 12 to 13 :)

    have to work with huge grid to get the "sun" away far enough - will post screendumps after some sleep. 

    But is there a way to keep surfer from calculating the viewshed before i have entered the parameters i want. ie. start angle and sweep? (i need the sweep to be 1 degree. to cover an rea of 10x10 km i need a grid that is 1200x1200 km wher all Z data is 0 except for the center 10x10 km. with resolution of 50 mtr i will have grid that is 24k x 24k, which is huge. If it can be worked with at all, i dont want the viewshed to scan 360 degrees before i can even change the parameters for the viewshed ;)

    how easy it would have been if the transmitter could be placed outside the map layer...

    0
    Comment actions Permalink
  • Avatar
    Kåre Øst

    started computing a viewshed on a 27k x 30kresolution grid before i went to sleep. 


     


    if i could set it to sweep 1 degree initially i would cut the computing time down from 55 hrs to 15 min.

    Eventually i will script this (when i have learned scripter) to get a viewshed for sun positions for a whole day with 1 degree sun azimuth increments. I guess in scripter i set all the parameters (position, sweep) before the viewshed is computed? After doing that i would also have to export the viewshed as a blanking file to use in further calculations on sun radiation on snowy surfaces. Hope that will work out, but to test that myself i would need the full Surfer 13 as i cannot use the export features in the demo version...


     


    here is a screendump (UTM Z33N) with the sun way to close. The sweep is 39 degrees - that would translate to a time difference in sun azimuth from north east corner to south west corner at 39*4=2 hrs 36  min. This shows why i need a much bigger grid to get the sun much further away from the area of interest



    0
    Comment actions Permalink
  • Avatar
    Drew Dudley

    Hi Kare,

    Thanks for posting your comments. There is no way currently to set the properties for the Viewshed before it's created. The first iteration is done with default settings and you can adjust for the next iterations. I have added a vote to our suggestion file to allow users to set the properties before the viewshed is calculated. 

    The viewshed creation can be scripted. It looks like using the automation route works the same way as it does from the user interface; the first iteration creates the viewshed and the properties can be changed afterward. 

    Here is an example snippet:

    Sub Main
    	Dim SurferApp As Object
    	Set SurferApp = CreateObject("Surfer.Application")
    	SurferApp.Visible = True
    	Dim Plot As Object
    	Set Plot = SurferApp.Documents.Add
    
    'Creates a contour map and assigns the map frame to the variable "MapFrame"
    	Set MapFrame = Plot.Shapes.AddContourMap(SurferApp.Path+"\samples\conifer.grd")
    	Set ContourLayer = MapFrame.Overlays(1)
    
     'Add a viewshed layer based on the contours layer at the point (474933, 4378186)
    	Set ViewshedLayer = Plot.Shapes.AddViewshedLayer(MapLayer:=ContourLayer, PointX:=474933, PointY:=4378186)
    
    'Change the sampling distance for the viewshed to .05
    	ViewshedLayer.SamplingDistance = 1
    
    'Show visible or invisible areas
    	ViewshedLayer.ShowRegions(Show:=srfViewshedShowRegionVisible)
    
    'Change the viewshed line color to red. Use the properties for the LineFormat object.
    	ViewshedLayer.Line.ForeColorRGBA.Color = srfColorRed
    	ViewshedLayer.Line.Width = 0.02
    
    'Change the viewshed fill pattern to forward slash. Use the properties of the FillFormat object.
    	ViewshedLayer.Fill.Pattern = "Forward Slash"
    	ViewshedLayer.Fill.ForeColorRGBA.Color = srfColorBlue
    	ViewshedLayer.Fill.BackColorRGBA.Color= srfColorPink
    	ViewshedLayer.Fill.BackColorRGBA.Opacity = 20
    
    'Change the transmitter symbol. Use the properties of the MarkerFormat object.
    	ViewshedLayer.TransmitterSymbol.Index = 33
    	ViewshedLayer.TransmitterSymbol.Size = 0.25
    	ViewshedLayer.TransmitterSymbol.FillColorRGBA.Color = srfColorOrange
    	ViewshedLayer.TransmitterSymbol.LineColorRGBA.Color = srfColorBlack
    
    'Change the X position of the transmitter point
    	ViewshedLayer.TransmitterX = 469740
    
    'Change the Y position of the transmitter point
    	ViewshedLayer.TransmitterY = 4374837
    
    'Change the view radius in grid units
    	ViewshedLayer.ViewRadius = 10000
    
    'Change the starting angle in degrees. 0° is pointing due East.
    	ViewshedLayer.ViewStartAngle = 45
    
    'Change the sweep angle in degrees, starting from the StartAngle value and going counterclockwise.
    	ViewshedLayer.ViewSweepAngle = 90
    
    'Change the transmitter height above the surface In Z units
    	ViewshedLayer.TransmitterHeight = 50
    
    'Change the height of the reciever height above the surface in Z units
    	ViewshedLayer.ReceiverHeight = 10
    
    'Change the height of the obstructions above the surface in Z units
    	ViewshedLayer.ObstructionsHeight = 5
    
    	ViewshedLayer.Opacity = 40
    
    End Sub

    I hope this helps!
    Drew

     

    0
    Comment actions Permalink

Please sign in to leave a comment.