I am working on a map viewer that loads tiles from the web, saves on disk and adds them to meshes. But this ads tons of materials to the document.
Is it possible to quickly make a pbr material that won’t show in the material panel?
And what is the fastest way to make a material and assign to an ojbect?
All I need is that it shows the texture png with alpha and that it is not tiled. (If tiling is on the map will show strange artifacts on the edges of each tile)
I don’t think that is possible. When you have an object and assign a material to it (assuming old-style materials) it’ll show up in the materials panel.
I suppose you’re looking to do a DisplayMaterial instead?
I think for that you could create a RenderMaterial (just don’t add it to the doc), then convert it to Material and use that to create a DisplayMaterial.
I am not very familiar with the DisplayConduit stuff, I have done only the most basic of basic usage there.
But I suppose you’d add a DisplayConduit, implement the channel that’s best for your usage where you then draw a shaded mesh using DisplayPipeline.DrawMeshShaded Method (Mesh, DisplayMaterial) . That you can give a Mesh and a DisplayMaterial that aren’t part of the document.
I would set the mesh up such that you have a simple 4-vertex plane, and the texture coordinates (UVs) set up such that the render texture you create for the temporary PBR will just automatically fit (use mapping channel 1, which I believe is the default).