• 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
1
Question by Nano · Jun 15, 2012 at 03:55 PM · texturepoly

How to render 2D texture like a blob in real-time programmatically

Hello everybody ! Sorry for my bad english ;-) I have vertexes from polygon (i'm creating a polygon in real-time) and have an image (.png) 2D texture. How Can I Render this 2D image in this polygon ? Can anybody help me ? I want render 2D texture image for polygon like in this video http://www.youtube.com/watch?v=5WzGQQOIcp8

Comment
Add comment
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

5 Replies

· Add your reply
  • Sort: 
avatar image
1
Best Answer

Answer by Fattie · Jun 15, 2012 at 09:29 PM

nice question ...

attention skinned mesh gurus, in fact could it just be done w/ a skinned mesh object ... something with a coupe of bones and a simple skin ???

To directly answer your question, you just have to learn how to build mesh on the fly, if that's really what you want to do. Start reading the Mesh doco in Unity.

Comment
Add comment · Show 3 · 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 Nano · Jun 15, 2012 at 10:01 PM 0
Share

Thanks for your answer ! Can anybody give me some examples where I can with polygon points brush it with an image.png ? Do I need some algorithms like quad splitting for texture UV coordinates or smth. like that ? Please help me with this question, I dont know how to this, is there some scripts for this or smth. other resources ? I'm trying to do this with mesh, but I've mesh like a star but not a gish. I don't know how to do this with mesh. I've already read docs, tutorials, and many other articles. Thank You Very $$anonymous$$uch !

avatar image Fattie · Jun 16, 2012 at 04:33 AM 0
Share

"To directly answer your question, you just have to learn how to build mesh on the fly, if that's really what you want to do."

Unfortunately there is no easy way to do this.

To begin building mesh on the fly, create a cube in Unity. Attach a script to it. Learn how to get at the $$anonymous$$esh components, and then learn how to create new mesh arrays, then, figure out how to make the mesh from your new arrays.

All the info is here in basic form:

http://unity3d.com/support/documentation/ScriptReference/$$anonymous$$esh.html

BTW I doubt you could actually render in changing mesh that quickly, game engines don't like changing mesh shapes.

The game example you gave is NOT done in that way. You know?

avatar image Nano · Jun 16, 2012 at 08:04 AM 0
Share

Thanks for Your Answer Very $$anonymous$$uch ! Can you tell me please what way was done that game example ? http://www.youtube.com/watch?v=5WzGQQOIcp8

avatar image
1

Answer by Nano · Jun 16, 2012 at 12:03 PM

My some experiments on a cube are here TestMesh

I will research this domain till Master Level )))))))))

THANKS EVERYBODY for YOUR VERY NICE AND CONCRETE ANSWERS !!!


TestMesh.cs.zip (511 B)
Comment
Add comment · Show 2 · 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 Fattie · Jun 16, 2012 at 12:23 PM 0
Share

great work !!!!!!!!!!!

also note my answer here, ("great tip")

http://answers.unity3d.com/questions/267880/creating-a-pentahedron-a-5-sided-shape-mesh-proced.html

avatar image Nano · Jun 16, 2012 at 01:45 PM 0
Share

Very NICE and AWESO$$anonymous$$E !!! Great Thanks !!!

avatar image
0

Answer by Nano · Jun 15, 2012 at 10:04 PM

I'm trying to do this in 2D space and I was speaking about 2D polygon (gish or blob).

Comment
Add comment · Show 5 · 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 Fattie · Jun 16, 2012 at 04:28 AM 0
Share

Just edit your original question if you like!

Just FYI that game is not "2D" ... it's a 3D game with 3D game physics, but you just happen to see only an orthogonal view so it looks 2D. So it is "2.5D"

avatar image Nano · Jun 16, 2012 at 07:07 AM 0
Share

Thanks Very $$anonymous$$uch for Your answer ! You're absolutely right about 2.5D game. I'm newbie in Unity3D. Can anybody help me ? http://www.gamedev.net/topic/624248-stretch-a-texture-on-a-2d-polygon/ (I just want something like this to make in Unity)

avatar image Fattie Nano · Jun 16, 2012 at 07:31 AM 0
Share

simply move the vertices inside the object. exactly as it says on that web page!

You are going to have to learn everything about real time mesh manipulation. I have explained how to get started with that, in the comment below. I will paste it in again.

"To begin building mesh on the fly, create a cube in Unity. Attach a script to it. Learn how to get at the $$anonymous$$esh components, and then learn how to create new mesh arrays, then, figure out how to make the mesh from your new arrays.

All the info is here in basic form:

http://unity3d.com/support/documentation/ScriptReference/$$anonymous$$esh.html "

Please note that this has no connection to the effect you are seeing in the youtube movie.

avatar image Nano · Jun 16, 2012 at 08:12 AM 0
Share

Thank You VERY VERY $$anonymous$$UCH !!!!!

avatar image Fattie · Jun 17, 2012 at 08:08 AM 0
Share

not at all, ask anything any time. I love the blobby sample you brought to the site, thanks for that

avatar image
0

Answer by Nano · Jun 17, 2012 at 06:47 AM

My some NEW experiments TestMesh.cs

From this sources I've been understood that UV coordinates conform to each Mesh's Vertex and triangles are regions which will be painted out by texture, thus triangles are used in Mesh's Set of Vertexes and in TEXTURE's UV Set of Coordinates ;-)

Thanks !


TestMesh.cs.zip (628 B)
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
avatar image
0

Answer by Nano · Jun 17, 2012 at 06:57 AM

Test Mesh Texture's Triangles download Source example: TestMesh.cs


TestMesh.cs.zip (639 B)
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.

Welcome to Unity Answers

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

Follow this Question

Answers Answers and Comments

4 People are following this question.

avatar image avatar image avatar image avatar image

Related Questions

A node in a childnode? 1 Answer

how to make a material to chrahter (After making texture)??? 1 Answer

How to Make a Character Flicker? 1 Answer

need help in texturing a city.. 2 Answers

Texture in Unity looks ugly but in Blender it's look Good 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