How to make a picture of prefab?
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?
Answer by jgodfrey · Feb 24, 2016 at 05:00 PM
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...
Yeah I remembered that after I posted a question. :D But still thanks for the answer
Answer by maxizrin · Oct 15, 2017 at 08:41 PM
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.
Answer by florinel2102 · Apr 30, 2020 at 08:21 PM
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)
Your answer
Follow this Question
Related Questions
Score won't work 1 Answer
Preview of Prefabs broken since 5.6 0 Answers
Editor script can't find a class outside of Editor folder 0 Answers
dynamic object constructions 0 Answers
Does anyone have free time to design 3D models for FREE? 0 Answers