Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by PsychoDuckArcade · Nov 19, 2014 at 11:58 PM · guiimagemodelrendericon

How should I generate an image of a model?

I'm making a loot-hunting rpg. I have models for every item in the game. In the GUI, I want icons to show images of those item models. I'd like to generate images of the models at runtime for this (item appearances are modifiable in-game).

I could just instantiate the actual 3D models and position them on their icons, but while that may have better aesthetic potential, it'd be quite an unnecessary performance hit, so I'd prefer to actually render them to an image asset instead.

I googled but didn't find much. Any ideas? I have absolutely no clue how to go about doing this..

Comment
Add comment · Show 8
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image meat5000 ♦ · Nov 20, 2014 at 12:21 AM 0
Share

I guess its similar to taking a screenshot.

avatar image PsychoDuckArcade · Nov 20, 2014 at 12:28 AM 0
Share

Yeah, basically taking a screenshot of just a model, nothing else, and saving it as an image asset.

avatar image meat5000 ♦ · Nov 20, 2014 at 12:35 AM 0
Share

Here's the screener page. $$anonymous$$aybe you can do something with that, using a <1 supersize factor. Really though you are probably going to want to learn how to generate a procedural texture and save it.

$$anonymous$$aybe a second camera could line up with the model's bounding box and take the screener, cropping at a certain radius/distance (Basically combine the screener with a mask and save it off on to a fresh canvas).

avatar image MrSoad · Nov 20, 2014 at 12:35 AM 0
Share

What is the rough poly count on your models that you wish to display?

avatar image PsychoDuckArcade · Nov 20, 2014 at 12:51 AM 0
Share

I'll look further into that capturescreenshot function, but that doesnt look like something I can use.

Poly count is currently undecided, there's no final assets in the game yet so we can still decide on lower poly counts before our modellers make anything, but I figure, in general, if I can replace model rendering with image rendering, it'd allow for higher polycounts elsewhere. It's just an unnecessary performance hit regardless of polycount. I mean these aren't gonna be N64 looking models or anything, definitely higher than that, it should look fairly modern.

All I know is that the gui alone could have up to ~48 item icons rendering on screen at a time.

Show more comments

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by Kittymonkey · Jan 14, 2016 at 10:36 AM

1: create a render texture 2: insert the model and a cam to the scene, and apply the render textures to the cam 3: repeat this over and over again until you have all the needed render textures and use them.

hint: using this way, it is possible to apply scripts to the models to make them rotate or such.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

29 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Change slection grid content texture size/scale 0 Answers

What GUI method renders 3D object thumbnail previews in the editor? 1 Answer

Image appear when i click on a model 1 Answer

How can I add a distance cap to this script? 3 Answers

Inventory SlotID vs. RectPosition 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges