How to make a thumbnail of a 3D mesh?

Hi people!

In my game I have a menu that shows items available to player (a kind of inventory). I want to display 3D items in that menu, so I want to render them from a particular angle, save the result to a texture and then display this texture in the menu. What is the best approach here? How do I render only one mesh? How would you do it? :slight_smile:

Thanks!

Why not simply render an image of the mesh in your 3d modeling program of your choice then use that image in game? By using the game engine to render this in real time, you use unnecessary computing resources. Rendering an image to the appropriate size will only take a few kb per image.

The items are randomly generated at runtime: they have varying tints and other parameters, so it is impossible to prerender them.

The idea was to render each item only once when it’s first time needed. Subsequent calls will simply return previously rendered image.

That’s about it for your options. Outside of cracking open a thick book of graphics programming and making an UE4 Engine Plugin, there’s no way to only take a one frame render of a scene/object. There are only two components available for this kind of thing provided by the engine: the Scene Capture 2D component and Scene Capture Cube. Both of these options will render every frame and are very expensive (Scene Capture Cube being 6 times more expensive than Scene Capture 2D).

My suggestion, if you have the experience, would to be make the plugin and make it available to the community (everyone would eat this up!). Otherwise if a rendered icon is necessary, You could use the Scene Capture 2D component. But when ever you display this icon on your screen, I would design your UI so that you only have a very limited number of these rendering objects displayed at one time, destroying them/disabling them whenever they are not in view through an interest management system. Do this while keeping in mind your target platform and its specs as well as using the profiler to see how expensive this is going to be.

Thanks for the suggestion! I will consider this option.

You can just use a scene capture, and deactivate it after one frame. This would effectively render one frame. Just set different render target textures each time.

But if you only have a couple of these on screen and nothing else intensive is going on, might as well not do a still frame, but actually have them actively render and rotate the objects or something to make it look more alive.

I’m not sure how it works but at the HALArchviz that you can buy at the marketplace there is a bp to do that, they also use Dynamic render BP, that comes from “canvas render Target 2d”

and that bp is connected to the editable objects BP.

you can see it here: https://youtu.be/NZYTZEVj4VI?t=3m10s