I have some 3D Models and a store in my game. I want to take picture of those 3D models and add a preview in image format in store canvas. But I don’t know how to take a picture of 3D model Prefab. Any Ideas how to do it?
It sounds like you simply want a static image of your models to be included as an Asset in the game - for display in the store canvas. If that’s the case, why not simply display your models however you want, and then use a screen capture application (or Windows screen capture itself) to grab an image from the screen? Then, just edit the images as needed and add them to the project as standard image assets.
There are any number of freely available screen capture applications, or just the good-old “PrntScrn” button…
You can Instantiate the prefab in a different layer that your regular camera can’t see (remove all the components from it that are not the mesh filter, or mesh renderer, as you instantiate it).
Have another Camera render only that layer, pointed at the point you instantiate your prefab, unto a render texture (create a new one in you assets).
You can now assign this texture, whatever the camera is showing, as a texture to a “Raw Image” UI element.
I recommend also making a separate directional light for the this new “showcase” layer, to prevent any world lights from affecting the object.
Install saad khawaja (instant high shot) , then fix your prefab , fix your camera , set clear flags → solid color and then take a screenshot with transparent background (from saad khawaja package)