Shader World
  • Shader World
    • Introduction
    • Features
  • Fundamentals
    • Kick-start
      • Detail panel
      • Surface material
      • Creating a new world
      • Display Shader World Collisions
      • PCG : Procedural Content Generation Framework
      • Get Height anywhere
      • Blueprint Brush System - Landmass
      • Smartphone/Tablet (Android&iOS)
      • Heightmap Import (16 bits Raw/PNG)
      • Debug IDs of Runtime Layers
    • Global Performance Monitoring
    • Roadmap
    • Get Shader World
    • Download a Demo
Powered by GitBook
On this page
  1. Fundamentals
  2. Kick-start

Get Height anywhere

Shader World provide a simple callable blueprint function which allows you to request the height of the terrain anywhere

PreviousPCG : Procedural Content Generation FrameworkNextBlueprint Brush System - Landmass

Last updated 2 years ago

After selecting the Shader World you want to request, simply send a set of points with the X and Y coordinates you want to precisely know the height of, and assign a callback function that will be called upon processing.

You can request up to 25 points at a time right now, but this number could be exposed for futher customization. It means almost 25 points per frame in the best case scenario, which at 30/60fps respectively means a best case scenario of 750/1500 samples per seconds.

With 4 control points for a boat, updating at 30 FPS, it would means over a hundred boats at the same time.

If you intend to request points from multiple sources, you would have to centralize those sources before interacting with Shader World, as you can only have one callback assigned.

An alternative would be to replace this callback system by a set of variables, which would be a drastic change from the current system, merely adding a layer of book keeping of requests.

An example of height request can be found on the reference demo map, if you open the BP_read actor which is requesting height from the water surface over 30 times per second.

TOptional
Blueprint callable function to retrieve height anywhere
BP_read Actor from the reference demo map