Roland Posted September 12, 2016 Share Posted September 12, 2016 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? Quote Roland Strålberg Website: https://rstralberg.com Link to comment Share on other sites More sharing options...
Athos Posted September 12, 2016 Share Posted September 12, 2016 Create a new world and use the entity's bounding box to set an optimal zoom. Quote Link to comment Share on other sites More sharing options...
Roland Posted September 12, 2016 Author Share Posted September 12, 2016 Hmm... I want to a snapshot of the object I'm picking in the world I'm walking in. The snapshot should be taken in real-time when I pick it. Quote Roland Strålberg Website: https://rstralberg.com Link to comment Share on other sites More sharing options...
gamecreator Posted September 12, 2016 Share Posted September 12, 2016 I don't really have an answer but I'd look into that old code on the forums that renders a camera to a plane, like a security camera. Quote Link to comment Share on other sites More sharing options...
Genebris Posted September 12, 2016 Share Posted September 12, 2016 I think that kind of things shouldn't be rendered at runtime, I imagine a proper way would be to make a script for blender that will run through all your fbx files, render them and save a texture with the same name. Quote Link to comment Share on other sites More sharing options...
Roland Posted September 12, 2016 Author Share Posted September 12, 2016 I will see what can be done with this one... maybe ... http://www.leadwerks.com/werkspace/page/api-reference/_/camera/camerasetrendertarget-r901 Quote Roland Strålberg Website: https://rstralberg.com Link to comment Share on other sites More sharing options...
Rick Posted September 12, 2016 Share Posted September 12, 2016 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. 2 Quote Link to comment Share on other sites More sharing options...
Roland Posted September 13, 2016 Author Share Posted September 13, 2016 I'll take your advice guys and go with the premade icons. Diving into this will probably get me into a long and winding sidetrack. Thanks Quote Roland Strålberg Website: https://rstralberg.com Link to comment Share on other sites More sharing options...
ChrisV Posted September 13, 2016 Share Posted September 13, 2016 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 . Quote My Artwork. 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 More sharing options...
Recommended Posts
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.