Modifying Map scale in Unreal

I’ve just started playing around with the examples, and reading through the tutorials, but it looks like the display is designed as a 1-1 ratio, one CM in the world maps to 1 CM in Unreal. Is there a way to change the scale to match a map. My primary use case is in VR, and I wanted to take advantage of VRs scaling options, have a room with a ‘map table’ which displays a scale model of a section of the world and have the option to have the user transition to a 1-1 scale version, either ground level or floating like Google Earth VR at some other point.

Is this something supported by the engine, I looked through the public properties on the tileset and didn’t see anything other than Unreal’s scaling tool. However when I attempted to use that to scale things down, I’m pretty sure I ran into floating point problems at the low end.

Hello and thank you for your interest in Cesium for Unreal!

We’ve created an issue on the github repository for this - you would indeed likely be running into floating point precision errors at that scale. It would be helpful to be able to adjust this, and we may add this in a future release.

In the meantime, I’d like to confirm that the precision is the problem in this situation and it isn’t being caused by some other issue. Were you scaling the Cesium World Terrain? If so, at what scale did you begin to run into issues?

I was scaling the world terrain. The world worked at 0.000002, the world disappeared at 0.000001. Thank you for creating the issue. The use cases that I see using are:

  1. One to one real world scale – The user is in the world looking at it as if they are a human in the real world. This is obviously a supported use case.
  2. Floating giant (google earth VR flying around). The user is a giant in the world looking at items in the world. This should be a supported use case.
  3. Table view – The user is looking at a table containing a section of terrain which they can manipulate, change scales, and look at a wide section of the earth or a small section. This would be as if the view into cesium from the viewport was put into VR on a table, with 3d height maps (probably enhanced). This might be supported but I suspect might run into scaling problems.
  4. Small globe – This is what I attempted. If you use Google Earth VR, one of the items that they have is a small globe (around 1-2 feet) which can be used to select a location.

The Unreal integration is amazing, it seems very performant and I’m working through the tutorials to get a better understanding of the basic usage.

Hey @jlundy ,

We will look more at the issue Alex started based on this post, but in the meanwhile I had some suggestions you might want to try out if you have not already! I haven’t done direct testing with VR but I have tried Google Earth VR in the past.

  • For “floating giant” mode, have you tried using the “Set World To Meters Scale” blueprint node?
    The default is 100, but increasing it should make everything in Unreal appear smaller by making the virtual eye-spacing larger.
  • You can probably decrease the virtual eye-spacing by altitude so that you feel smaller the closer you get to the ground. I would imagine it wouldn’t be fun to be a giant with super spaced-out eyes when close to the ground.
  • The same approach can probably be used to scale down the terrain for rendering on top of a table, although you will have to find a way to make the parts extending off the table invisible.
  • For the “small globe” although the scaling would work, I think you’re looking for two separate globes, one main one and a smaller one to conveniently use as a location-selector. In this case, it may be slightly tough to size the two globes differently. Instead you may want to manually create a mock globe mesh with a simple globe texture. You may be able to calculate a rough longitude-latitude from simply pointing to it, even if it’s a simple sphere.

Again, disclaimer that I haven’t tried any of this out myself, but we look forward to seeing what you will be able to create. Feel free to post any cool progress pictures or videos on the forum, thanks again for using Cesium for Unreal!

Thank you for the ideas. I haven’t had a chance to do a lot more with my particular tasks in the last week, just working through some of your tutorials in the time I had, but I play around the set world tom meters scale. If I can’t have the world shrunk down to table size I can try increasing the table to world size :). Perhaps a material that sets alpha to zero when the world isn’t directly over the table.

Thanks it is an impressive product.

1 Like

Your suggestions for the table sized version worked. I scaled the globe down and then scaled myself up with the World to Meters scale. I cloned your material and added a cube filter to it. This enabled me to create a ‘table’ that I could look at in VR. The VR performance isn’t quite there yet. I think it was regenerating a lot of meshes, which I was filtering out. It might be best for my use case to capture a mesh from the tile download and use that statically until the user selects a new location. The cesium log was regenerating terrain with a 93 second delay, it was obviously in a background thead, but the overall performance wasn’t quite up to VR.

Another issue is that I think the clipping plane from my camera was causing the world to clip out when I moved my head close, I’ll have to play around with that. I also noticed that when I scaled the world down, and clipped out most of it of the world the lighting from the Cesium sky was a little too harsh on the world. I ended up removing it and adding a (big) point light. No cool pictures yet, I need to get something a little better.

Related question: if you’re scaling down root component, I assume that would also scale down the height data as well?

Is it possible to specify ellipsoid scale without affecting the height scale? Or (not preferrably) scale back up the terrain with exaggeration?