3D Tiles how to increase brightness

Hello,

1. A concise explanation of the problem you’re experiencing.

We have generated a city landscape in 3DTile using FME2017, and have placed it in the correct location. However, the tile shows up grey (see the attached image). It doesn’t seem to be caused by any settings in the code, as when using the same style for the New York city model (provided in the Cesium Workshop tutorial) the buildings are all in bright white (see the other attached image).

2. A minimal code example. If you’ve found a bug, this helps us reproduce and repair it.

var defaultStyle = new Cesium.Cesium3DTileStyle({
color : “color(‘#FFFFFF’, 1.0)”, //all white, opaque
show : true
});

``

3. Context. Why do you need to do this? We might know a better way to accomplish your goal.

What we intend to do is we generate 3DTiles from the building models using Rhino 5 (to reduce the number of vertices and fix irregularities) and FME2017 (to put things into 3DTile format). We want to be able to have better control on how the buildings are rendered (now with a generic white colour, and later textured with the actual look for some of them).

One idea is to have ambient occlusion included (before, or during the 3DTile generation process). But we are not quite sure how this can be achieved.

4. The Cesium version you’re using, your operating system and browser.

Cesium-1.45

Windows 10

Google Chrome v66.0.3359.181

Hi there,

The building appearance is a product of your 3D Tiles conversion tool, as it most likely applying a darker material to the buildings. I’m not sure what the relevant settings are using FME, but you can contact us to use our conversion tools for 3D Tiles which we used to generate the NYC data set.

Thanks,

Gabby

Thanks Gabby.

Upon opening the .b3dm files generated by FME, I found a piece that determines the color used in the mode:

“diffuse”:[0.8,0.8,0.8,1]

``

After some digging it’s referring to gltf’s material properties, and we can in fact change it. Interestingly 1.0 is not the maximum value, and when we use values like 2.5 ([2.5, 2.5, 2.5, 1]) we get something bright. With some experiments this is the only thing we can change. FME does not seem to allow us to change it from within the software, so right now we use another application (Notepad++) to do a batch find&replace.

The next thing I did was to compare what’s inside the NYC .b3dm files. Here is what I found (along with more questions):

  1. it also has a few “diffuse” values, but also some “technique0”… is it something that works like a look up value? If so, where is that value defined?

  2. at the very end of the file there is a “main(void)” function. This reminds me of something I saw in a .glb file that has its own control of how the model is rendered (e.g., vec4 ambient). How is it related to the overall rendering of 3D Tiles?

Pardon me for my questions regarding this as I’m not familiar with materials and rendering. If there is any resource that can help me understand feel free to let me know.

I’ve also sent Tim an email regarding access to the conversion tool. Thanks for the link to the contact page.

-victor

Hi Victor,

Cool, glad your getting some results! To answer your questions:

  1. b3dm tiles embed glTF assets. If you’re interested in playing with how things are rendered, take a look at the Materials and Shading part of the glTF spec. It will describe what techniques and the other properties do and the other properties they reference.

  2. That “main(void)” function you see is GLSL, or shader code, which tells the GPU how to render a model. You probably won’t need to modify it, but if you want to, it will give you a lot of control over how your buildings look.

There are also a lot of good web resources on materials and shaders out there if you want to google!

Hope that helps,

Gabby