• Skip to primary navigation
  • Skip to main content
  • Skip to footer

Cisco Umbrella

Enterprise network security

  • Contact Sales
  • Login
    • Umbrella Login
    • Cloudlock Login
  • Why Us
    • Why Cisco Umbrella
      • Why Try Umbrella
      • Why DNS Security
      • Why Umbrella SASE
      • Our Customers
      • Customer Stories
      • Why Cisco Secure
    • Fast Reliable Cloud
      • Global Cloud Architecture
      • Cloud Network Status
      • Global Cloud Network Activity
    • Unmatched Intelligence
      • A New Approach to Cybersecurity
      • Interactive Intelligence
      • Cyber Attack Prevention
      • Umbrella and Cisco Talos Threat Intelligence
    • Extensive Integrations
      • IT Security Integrations
      • Hardware Integrations
      • Meraki Integration
      • Cisco Umbrella and SecureX
  • Products
    • Cisco Umbrella Products
      • Cisco Umbrella Cloud Security Service
      • Recursive DNS Services
      • Cisco Umbrella SIG
      • Umbrella Investigate
      • What’s New
    • Product Packages
      • Cisco Umbrella Package Comparison
      • – DNS Security Essentials Package
      • – DNS Security Advantage Package
      • – SIG Essentials Package
      • – SIG Advantage Package
      • Umbrella Support Packages
    • Functionality
      • DNS-Layer Security
      • Secure Web Gateway
      • Cloud Access Security Broker (CASB)
      • Cloud Data Loss Prevention (DLP)
      • Cloud-Delivered Firewall
      • Cloud Malware Protection
      • Remote Browser Isolation (RBI)
    • Man on a laptop with headphones on. He is attending a Cisco Umbrella Live Demo
  • Solutions
    • SASE & SSE Solutions
      • Cisco Umbrella SASE
      • Secure Access Service Edge (SASE)
      • What is SASE
      • What is Security Service Edge (SSE)
    • Functionality Solutions
      • Web Content Filtering
      • Secure Direct Internet Access
      • Shadow IT Discovery & App Blocking
      • Fast Incident Response
      • Unified Threat Management
      • Protect Mobile Users
      • Securing Remote and Roaming Users
    • Network Solutions
      • Guest Wi-Fi Security
      • SD-WAN Security
      • Off-Network Endpoint Security
    • Industry Solutions
      • Government and Public Sector Cybersecurity
      • Financial Services Security
      • Cybersecurity for Manufacturing
      • Higher Education Security
      • K-12 Schools Security
      • Healthcare, Retail and Hospitality Security
      • Enterprise Cloud Security
      • Small Business Cybersecurity
  • Resources
    • Content Library
      • Top Resources
      • Cybersecurity Webinars
      • Events
      • Research Reports
      • Case Studies
      • Videos
      • Datasheets
      • eBooks
      • Solution Briefs
    • International Documents
      • Deutsch/German
      • Español/Spanish
      • Français/French
      • Italiano/Italian
      • 日本語/Japanese
    • Security Definitions
      • What is Secure Access Service Edge (SASE)
      • What is Security Service Edge (SSE)
      • What is a Cloud Access Security Broker (CASB)
      • Cyber Threat Categories and Definitions
    • For Customers
      • Support
      • Customer Success Webinars
      • Cisco Umbrella Studio
  • Trends & Threats
    • Market Trends
      • Hybrid Workforce
      • Rise of Remote Workers
      • Secure Internet Gateway (SIG)
    • Security Threats
      • How to Stop Phishing Attacks
      • Malware Detection and Protection
      • Ransomware is on the Rise
      • Cryptomining Malware Protection
      • Cybersecurity Threat Landscape
      • Global Cyber Threat Intelligence
    •  
    • Woman connecting confidently to any device anywhere
  • Partners
    • Channel Partners
      • Partner Program
      • Become a Partner
    • Service Providers
      • Secure Connectivity
      • Managed Security for MSSPs
      • Managed IT for MSPs
    •  
    • Person looking down at laptop. They are connecting and working securely
  • Blog
    • News & Product Posts
      • Latest Posts
      • Products & Services
      • Customer Focus
      • Feature Spotlight
    • Cybersecurity Posts
      • Security
      • Threats
      • Cybersecurity Threat Spotlight
      • Research
    •  
    • Register for a webinar - with illustration of connecting securely to the cloud
  • Contact Us
  • Umbrella Login
  • Cloudlock Login
  • Free Trial
Research

Realistic Network Rendering with PovRay

Author avatar of Thibault ReuilleThibault Reuille
Updated — March 27, 2020 • 4 minute read
View blog >

Leveraging Raytracers for Fun and Profit.

cryptolocker

We’ve exposed a couple of methods to explore graphs in 3 dimensions in earlier blog posts. We were interested in realtime rendering in order to navigate inside our security data interactively. We’ve provided videos and online demos of our 3D engine but also details about the force-directed clustering algorithms. These technical details progressively give an overview of the visualization framework we are building here at OpenDNS.

Today, we will explain a fun way to take advantage of legendary raytracers to produce realistic pictures of our data. We will also share some useful pieces of code and scripts to enable the reader to do the same on his own.

A quick word on raytracers and PovRay

In the 3D graphics world, there are several types of image rendering. The 2 main techniques are called Rastering and Raytracing. We could go for hours about all the details but it is important to understand the key differences :

Rasterization works by drawing a very large number of triangles on the screen which are then shaded through a GPU pipeline simulating various light models. The resulting image is computed by projecting all the triangles on the screen. The process is extremely fast and is widely used in applications utilizing realtime graphics, requiring a very low latency. (Games, Simulators, Interactive interfaces, etc.)

Raytracing works differently. It generates an image by tracing the path of light through pixels in an image plane. The light rays traverse the scene according to optics laws (Reflection, Refraction, Diffraction, Absorption, etc.). The process aims to give a high level of realism and comes with a great computational cost. Raytracing is widely used in 3D movies and a single image can often take several hours to be generated.

PovRay (“Persistence of Vision Raytracer”) belongs to the second category. The interesting thing about PovRay is that it can be scripted and scenes can be described using a simple language. We’re going to take advantage of this to generate our 3D scene from the graph datasets!

First step : Create a PovRay template

The first thing we need is a PovRay template. We need to define a standard scene and a way to draw nodes and edges.

Very simple indeed, we’ll start by defining some constants, placing a couple of lights and a camera.

#include "colors.inc"
global_settings {
	assumed_gamma 1.0
	ambient_light Gray
}
background {
	color Black
}
light_source { <10000, 0, 0> color White }
light_source { <0, 10000, 0> color White }
light_source { <0, 0, 100000> color White }
camera {
  sky <0, 1, 0>
  right <4/3, 0, 0>
  look_at <0, 0, 0>
  location <5.0, 5.0, 5.0>
}

More documentation on lights and camera can be found here :

  • http://www.povray.org/documentation/view/3.7.0/308/
  • http://www.povray.org/documentation/view/3.7.0/246/

And we’ll just use spheres for the nodes and cylinders for the edges.

As an example, we’ll just define two spheres and one cylinder connecting them.

// First node
sphere {
    <-2.0, 0.0, 0.0>, 1.0 // Position : (-2, 0, 0), Radius : 1.0
    texture { pigment { color rgb<1.0, 0.0, 0.0> }} // Color : Red
    finish {
        ambient .2
        diffuse .6
        specular .75
        roughness .001
        reflection { 0.2 }
    }
}
// Second node
sphere {
    <2.0, 0.0, 0.0>, 1.0 // Position : (2, 0, 0), Radius : 1.0
    texture { pigment { color rgb<0.0, 0.0, 1.0> }} // Color : Blue
    finish {
        ambient .2
        diffuse .6
        specular .75
        roughness .001
        reflection { 0.2 }
    }
}
cylinder {
    <-2.0, 0.0, 0.0>, <2.0, 0.0, 0.0>, 0.5 // Radius : 0.5, from node 1 to 2
    texture { pigment { color rgb<0.5, 0.5, 0.5> }}
    finish {
        ambient .2
        diffuse .6
        specular .75
        roughness .001
        reflection { 0.5 }
    }
}

In the “finish” scope, we define the shading of the objects. Essentially it tells PovRay how the spheres/cylinders are going to react to light. In our case, we’ve defined a nice shiny material with some reflections.

Now if you render this template with PovRay, you should get something like this :

template

Second step : Convert a 3D graph to a PovRay scene

Now that we have our template, the concept is very simple. We take our graph, create a sphere for each node and then for each edge, create a cylinder connecting the two nodes. And voilà!

The pseudo-code to do it would look like this:

sphere_radius = 1.0
cylinder_radius = 0.5
foreach node in graph.nodes do
    generate_sphere(node.position, sphere_radius, node.color)
foreach edge in graph.edges do
    generate_cylinder(edge.src.position, edge.dst.position, cylinder_radius, edge.color)

Of course, you can adapt it to map the color/radius to anything else (Node weight, Node degree, Edge type …). It’s up to you!

It also means you will need to have the node position already pre-computed using any layout algorithm. You can implement your own or export it from any graph rendering software.

Results

Here is a small gallery of datasets obtained using the OpenDNS visualization tool and some some datasets built using our mighty Security Graph:

cansecwest
Degree view of CanSecWest.com (White nodes have the most connections, Black nodes have the least connections)
cryptolocker
Co-occurrence graph around a Cryptolocker domain (Red : Malicious, Green : Benign, White : Unknown)
cryptolocker-artsy
Same as above from a different view point and a different color code (Brown : Malicious, Blue : Benign, Yellow : Unknown)
www.reddit.com
Breadth First traversal from Reddit.com, nodes are colored according to their types (Blue : Domain, Yellow : IP, Pink : Whois info)

Tips:

  • Depending on the graph you’re dealing with, you will probably need to adjust the camera position to choose a good view point.
  • When rendering scenes with raytracers, the image calculation can take a while especially with very large graphs. It is often a good idea to compute the image with a small resolution and a low level of details. This way you will be able to quickly see if your parameters are correct before spending precious minutes/hours rendering a erroneous image. Once you are sure the basic parameters are correct, you can launch the real rendering process with full quality.
  • To achieve the nice “blobby” effect you can see on some of the images, you will need to define a blob scope and a couple of iso-values / thresholds. More documentation here : http://www.povray.org/documentation/view/3.7.0/275/

Conclusion

We’ve presented a fun way to take advantage of PovRay to generate realistic pictures of our datasets created with the Security Graph and its API. We hope you found this article interesting and that it hopefully triggered some new ideas. We’ve only used a very tiny part of PovRay’s features but you can definitely go much deeper in refining your template to achieve mind-blowing results. Feel free to send and share your best work!

Suggested Blogs

  • Cloud Application Security – Risks, Questions, Insights, and Solutions July 1, 2021 3 minute read
  • Cisco Umbrella discovers evolving, complex cyberthreats in first half of 2020 August 18, 2020 6 minute read
  • New research shows consumers want cybersecurity from service providers July 7, 2020 4 minute read

Share this blog

FacebookTweetLinkedIn

Follow Us

  • Twitter
  • Facebook
  • LinkedIn
  • YouTube

Footer Sections

What we make

  • Cloud Security Service
  • DNS-Layer Network Security
  • Secure Web Gateway
  • Security Packages

Who we are

  • Global Cloud Architecture
  • Cloud Network Status
  • Cloud Network Activity
  • OpenDNS is now Umbrella
  • Cisco Umbrella Blog

Learn more

  • Webinars
  • Careers
  • Support
  • Cisco Umbrella Live Demo
  • Contact Sales
Umbrella by Cisco
208.67.222.222+208.67.220.220
2620:119:35::35+2620:119:53::53
Sign up for a Free Trial
  • Cisco Online Privacy Statement
  • Terms of Service
  • Sitemap

© 2023 Cisco Umbrella