• 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 /
This post has been wikified, any user with enough reputation can edit it.
avatar image
Question by 5outh · Jun 13, 2012 at 11:05 PM · meshlinewireframevisualize

Is direct MeshRenderer vertex mutation (or dynamic Mesh building) possible?

Hi,

I'm building a visualizer in Unity and I've hit a little bit of an issue.

My idea is to draw a line that corresponds to the spectrum, and keep a history of the lines to draw into a sort of "grid" behind it, building a mesh out of the lines that I have previously made. Something like this (I know it's not a music visualizer, but it illustrates my point well):

alt text

Just like this, I'd like to be able to have an array of "lines" and build them into a connected sequence.

I'm able to get a single line on-screen by using the LineRenderer on my main camera, but I'm not entirely sure how to go about either a) Making multiple LineRenderers without making a huge mess out of the project b) Using MeshRenderer to create a Mesh on the fly.

Any more information on choice b would be the best, I would imagine. Is it possible to dynamically create meshes in this fashion (building from a list of vertices)?

Thanks!

Comment
aldonaletto

People who like this

1 Show 2
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 porglezomp · Dec 14, 2015 at 02:23 AM 1
Share

You might want to fix your image link, it's pointing to .pn instead of .png.

avatar image Bunny83 porglezomp · Dec 14, 2015 at 07:21 AM 0
Share

That seems to be a recent issue on UnityAnswers. The actual link does read .png at the end. I just edited the question and just resaved it without modification and now it seems to be fixed ^^.

Anyways, thanks for the hint :)

2 Replies

  • Sort: 
avatar image
Best Answer

Answer by aldonaletto · Jun 13, 2012 at 11:15 PM

You can generate or modify meshes at runtime - take a look at this topic in the docs. There are also some examples in this project from Unity.
NOTE: You can get sound samples or the audio spectrum from any AudioSource or the AudioListener with GetOutputData or GetSpectrumData - take a look at this question.

[3]: http://unity3d.com/support/resources/example-projects/procedural-examples.html

[5]: http://unity3d.com/support/resources/example-projects/procedural-examples.html

Comment
5outh

People who like this

1 Show 0 · 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
avatar image

Answer by Bunny83 · Jun 13, 2012 at 11:09 PM

Have you tried looking into the documentation to find a class that might be useful?

The Mesh class is propably what you're after. It has many examples how to use it. Note that there are additional examples on the different properties. For example if you want to create a skinned mesh, look at the bindposes.

Comment
5outh
Jessy

People who like this

2 Show 0 · 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

Unity Answers is in Read-Only mode

Unity Answers content will be migrated to a new Community platform and we are aiming to launch a public beta on June 13. Please note, Unity Answers is now in read-only so we can prepare for the final data migration.

For more information and updates, please read our full announcement thread in the Unity Forum.

Follow this Question

Answers Answers and Comments

6 People are following this question.

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

Related Questions

how can i build a spherical wireframe grid in unity? 1 Answer

Missing shaded wireframe option in unity 2019.1.3f,shaded wireframe not showing(LWRP) unity 2019.1.3f 1 Answer

How to modify the thickness of MeshToPology.Lines? 1 Answer

How to see mesh in game mode ? 3 Answers

Create a Wireframe Shader with Shader Forge 1 Answer


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