How to create previews of materials dynamically?
I'm making an architectural app (blueprints) where it is possible to visit a house or an apartment and change objects materials. To do that there is an UI that shows buttons with the materials preview or thumbnails so user can click the one he wants. But for now i'm using textures i made with Photoshop, and what i want is to be able to make dynamic thumbnails (texture) or materials, because i have hundreds of them now, and i need it to be automatic.
So my question : is it possible to have a camera somewhere in the scene with a sphere or a cube in front of it, and each time i want a preview , i can just apply the material to that mesh and take a '"picture" of it so i can use it as a texture ? or is there any other way to do that ?
You can use a Static Camera and pilot it to view your scene and object from its position. You can then take a High Res screen shot from your viewport by clicking on the arrow on the top left corner of your Viewport and selecting High Resolution Screenshot. You can read about using static camera in here. Alternatively you can use a scene capture component. There's a usage example of it in ContentExamples. You should also be able to find tutorials on how to use a scene capture component online (Especially in minimaps tutorials).
Hope this answered your question.
Follow this question
Once you sign in you will be able to subscribe for any updates here