|
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
(comments are locked)
|
|
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. 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 Much !
Jun 15 '12 at 10:01 PM
Nano
"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 Mesh 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/Mesh.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?
Jun 16 '12 at 04:33 AM
Fattie
Thanks for Your Answer Very Much ! Can you tell me please what way was done that game example ? http://www.youtube.com/watch?v=5WzGQQOIcp8
Jun 16 '12 at 08:04 AM
Nano
(comments are locked)
|
|
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 !!! 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
Jun 16 '12 at 12:23 PM
Fattie
Very NICE and AWESOME !!! Great Thanks !!!
Jun 16 '12 at 01:45 PM
Nano
(comments are locked)
|
|
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 !
(comments are locked)
|
|
I'm trying to do this in 2D space and I was speaking about 2D polygon (gish or blob). 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"
Jun 16 '12 at 04:28 AM
Fattie
Thanks Very Much 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)
Jun 16 '12 at 07:07 AM
Nano
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 Mesh 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/Mesh.html " Please note that this has no connection to the effect you are seeing in the youtube movie.
Jun 16 '12 at 07:31 AM
Fattie
Thank You VERY VERY MUCH !!!!!
Jun 16 '12 at 08:12 AM
Nano
not at all, ask anything any time. I love the blobby sample you brought to the site, thanks for that
Jun 17 '12 at 08:08 AM
Fattie
(comments are locked)
|
