Jump to content

How to take a snapshot of an entity


Roland
 Share

Recommended Posts

In what I'm working I have an inventory showing items collected along the way. Those items are collected by picking them (using a raycast for that). Now that works great. Currently I have made an icon image for each item that can be picked and added to the inventory. The inventory then show a list of those icons.

 

Even if that works I would really prefer to have some automation here.

 

What I would like to do is to render the item picked to an icon image (32x32) and then use that image as icon. This way I wouldn't have to go through the trouble of making icons for every object that can be picked and added to the inventory.

 

The render would also have to zoom in so the entity fills the image. Anyone have done such a thing or at least have some hints on how to do that?

Roland Strålberg
Website: https://rstralberg.com

Link to comment
Share on other sites

I would go making the icon yourself but if you really wanted to do this I would think you'd be able to move the camera and model to some place where you know nothing else will be, and I think you'd be able to save what the camera sees at that instant to texture and then use that texture. If this is all done in 1 frame and you move the camera/object back to its original place nobody would know. Now, I don't know exactly how much processing it takes to make that texture so if it's too slow to be done in real-time you can do this in the loading process by looping over your objects you want icons for. You're basically trading processing/loading time for disk space by doing this so not sure it's worth it as everyone hates waiting if done during loading, and processor cycles are always limited turn run-time and disk space is cheap.

  • Upvote 2
Link to comment
Share on other sites

Here's an idea. You could have each 'pick up' - item already in your scene, somewhere outside the play area,...and have one cam nearby those items...and once an item gets picked up by the player, you run a script that uses some kind of ID of that item, and have the nearby cam take a snapshot of the current picked up item.

 

Or, use premade icons smile.png .

 

ZBrush 4R7 64-bit - 3DCoat 4.5 BETA 12 - Fl Studio 12 64Bit - LE 3.2 Indie version - Truespace 7 - Blender 2.71 - iClone 5.51 Pro - iClone 3DXChange 5.51 pipeline - Kontakt 5 - Bryce 7 - UU3D Pro - Substance Designer/Painter - Shadermap 3 - PaintShop Photo Pro X7 - Hexagon - Audacity - Gimp 2.8 - Vue 2015 - Reaktor 5 - Guitar Rig 5 - Bitmap2Material 3

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...