Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add material for procedural windows on OSM buildings #37

Merged
merged 7 commits into from
Jan 24, 2023

Conversation

argallegos
Copy link
Contributor

@argallegos argallegos commented Dec 14, 2022

This PR adds two materials for procedural windows on OSM buildings. For an overview of these materials and discussion, see #36.

image

In this PR:

  • MI_ProceduralWindowsMetadata, a material instance that adds windows and randomizes building color based on metadata.
  • MI_ProceduralWindowsSimple, a material instance that adds windows.
  • An example scene for each version of the material
  • MF_TriplanarWindows, the material function that applies the window texture.
  • Two Material Layers, one for each material instance
  • A Material Layer Blend
  • A tiling window texture

If we decide to add this to the Samples, prior to merging we should determine whether to create a full sample scene in CesiumSamples/Maps, or leave the sample scenes as they are in CesiumSamples/Materials/ProceduralWindows. I think it's important to include at least the Metadata scene, because in order for the material to work correctly, the Tileset actor must be set up properly with the CesiumEncodedMetadata component.

@kring
Copy link
Member

kring commented Dec 15, 2022

This looks awesome @argallegos! I'm all for turning this into a proper sample map.

@argallegos argallegos marked this pull request as ready for review January 23, 2023 20:21
@argallegos
Copy link
Contributor Author

argallegos commented Jan 23, 2023

This is now ready for review. I created a proper sample scene (10_CesiumOSMWindows_Metadata) with a Getting Started note. I deleted the example scene for the simple version of the material - I didn't feel it was necessary.
image

Also, I noticed an issue in the 09 sample scene - the "Exclude Tiles Inside" settings weren't configured properly on Cesium World Terrain, so the custom watermask tiles were getting culled out. This PR includes that minor fix.

@kring
Copy link
Member

kring commented Jan 24, 2023

This is really cool @argallegos, nice job!

Only small thing I noticed is that when using MI_ProceduralWindowsMetadata, adding a raster overlay doesn't do anything. This isn't a problem, really, but I thought I'd mention it because there's a layer for raster overlays in the material instance. Might as well remove that and make the material simpler. MI_ProceduralWindowsSimple does work with a raster overlay, though. In any case, any changes here can be a separate PR.

We should definitely mention and screenshot this new sample in the release roundup this month @slchow!

@kring kring merged commit 0e95839 into main Jan 24, 2023
@kring kring deleted the procedural-osm-material branch January 24, 2023 05:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants