Discussion in ' 2D ' started by RyanNielsonApr 5, Search Unity. Log in Create a Unity ID. Unity Forum. Forums Quick Links. Asset Store Spring Sale starts soon! Joined: May 23, Posts: When importing a sprite or a sprite sheet there's an "Extrude Edges" option that says "How much area to leave around the sprite in the generated mesh" when I hover over it with my cursor. The thing is, not matter what the value the meshes of my sprites don't seem to change when I place them in the scene. The wording of the tooltips makes it seem like setting that value to 1 would add some padding to the sprite's mesh, which would be useful for writing outline shaders and the like.
Am I just misunderstanding this option, or is it not working as expected? RyanNielsonApr 5, Maloke likes this. Just bumping this post. Does no one know why this seems to be behaving improperly to me?
RyanNielsonApr 10, Joined: Feb 8, Posts: 1. InvisiblePhilJul 4, RyanNielsonJul 6, You must log in or sign up to reply here. Show Ignored Content.
Trying extrude a 2d polygon to create a mesh
The dark mode beta is finally here. Change your preferences any time. Stack Overflow for Teams is a private, secure spot for you and your coworkers to find and share information.
For some reason, I can't get these tilemaps to come out like they were created in Unity The pixel art is imported to Unity from Tiled. The pixel art in Tiled:. The same pixel art imported to Unity:.
As requested, the sprite import settings:. Considering you already changed the filtering from Bilinear to Point no filterthe issue may be that Unity compresses your texture by default. This is likely if it is a POT texture Power of two resolution.
You can override this for individual platforms at the bottom of the texture's import settings. And don't forget hitting that Apply-button! Also, what data type is your image? As far as I understand, the image used is a Spritesheet in form of a tilemap. Therefore the SpriteMode should be set to Multiple. You can then click on the Sprite Editor button and cut the sheet into individual sprites using the Slice function now separate, as of Unity 5. You probably want to use the Grid - By Cell Size method, which is basically how this is handled inside Tiled.
You also want to adjust your Pixels Per Unit setting to match the resolution of your tiles for pixel-perfect results. As I suggested, one way to get rid of blurring is to set the "Filter Mode" of the sprite to "Point no filter " instead of "Bilinear" or "Trilinear". Here you can see the difference between bilinear and point filtering. If that doesn't help, try messing with the quality settings in the Sprite Import. Increase the "Max Size" and maybe disable "Compression" or increase the quality of the compression.
Here you can see differences between the different compression qualities, ranging from "Low" over "High" to "None".
You can also try to increase the "Max Size" value for higher quality sprites. It scales the dimensions of your sprite to not exceed the specified value. If your sprite sheet is already smaller than the "Max Value", increasing it will have no effect though.
The next picture shows the differences between Sizes, and 64 for a Sprite with dimensions x You can see that sizes above the dimensions won't have any effect, whereas smaller values will scale the sprite down, decreasing its visual quality. Usually fiddling around with those values should help making your sprites look sharp and not blurred anymore. The matrix on top gives you a selection of all current quality levels for the Editor itself as well as all build target platforms.
The green tick shows what currently is selected as the default quality. You can also set the "Texture Quality" which defines the overall texture resolution in your project. You should choose "Full Res" for your current default settings. There is still some minor blurring if I zoom in but at least it isn't as bad as I demoed in my question. I have tried everyone's answers here to no avail, I am left with the conclusion that it must be a Tiled2Unity problem despite it never doing this before.
Learn more. Unity 2D art is blurry Ask Question.Now part of Unity, ProBuilder is a unique hybrid of 3D modeling and level design tools, optimized for building simple geometry but capable of detailed editing and UV unwrapping too. Use ProBuilder to quickly prototype structures, complex terrain features, vehicles and weapons, or to make custom collision geometry, trigger zones or nav meshes.
You can flip the normals of all faces on the selected object swhich is especially useful for converting an exterior modeled shape into an interior space. You can use the Mirror action to create identical copies of objects and make symmetrical items: Build one half, mirror it, then weld the two together for a perfectly symmetrical result.
In the Scene view, simply click to add control points. These will form the outer bounds of your mesh. Once you finish placing points, press Return to finalize the shape. Even after the initial creation steps, you can still modify a Poly Shape. Modify default settings, shortcut keys, resize the Toolbar, and switch between text and icon modes. ProBuilder will reorder the icon or text content to best fit the window size.
Most ProBuilder windows can be changed from docking to floating or vice-versa through their context menu. ProBuilder provides both automatic and manual texturing methods:. Auto UVs: Use this for simple texturing work, especially architectural or hard-surface items.
Subscribe to RSS
Tiling, offset, rotation, and other controls are available, while ProBuilder automatically handles projection and updates as you work. You can use a mix of auto and manual UVs, even on the same object.
This is especially useful when some parts of a model need tiling textures, while others are unwrapped. For example, the Stairs shape lets you choose items like step height, arc, and the parts of the stairway to build. Choose a shape to start with, then set unique parameters, such as height, width, depth, and number of cuts. You can do more with vertices in ProBuilder; for example, collapse all selected vertices to a single point regardless of distance, merge them within a set distance of one another, create a new edge connecting the selected vertices, or split a vertex into its individual vertices so that they can be moved independently.
ProGrids gives you both a visual and functional grid, which snaps on all three axes. ProGrids enables speed and quality, making level construction incredibly fast, easy and precise.TILEMAPS in Unity
It is especially handy for modular or tile-based environments, but it also significantly speeds up workflow and increases quality for all types of work. ProBuilder comes with Unity Follow this link for instructions to activate it. For Unity Refer to the documentationand check out the tutorials. Be sure to check out Polybrush. Search Unity.
Log in Create a Unity ID.Discussion in ' Scripting ' started by marktAug 30, Search Unity. Log in Create a Unity ID. Unity Forum. Forums Quick Links. Asset Store Spring Sale starts soon! Trying extrude a 2d polygon to create a mesh Discussion in ' Scripting ' started by marktAug 30, Joined: Aug 30, Posts: I am trying to figure out how to go from a 2d polygon stored as an array of Vector2 to an extruded mesh, but I am not sure if I am doing things correctly, because I do not see my object in the scene editor when I attempt to add it using test methods.
I am unsure if the problem is how I am creating the mesh, or if it is related to my creating the corresponding gameobject. I am, at the moment, only interested in seeing a wireframe of the mesh in the editor I am using csharp for scripting The source code for the Triangulator class that I am using can be found here.
Thanks in advance. Code csharp :. Triangulate. Length ]. Length. RecalculateNormals. RecalculateBounds. Optimize.
AddComponent typeof MeshRenderer .Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.
For some reason your suggested change could not be submitted. And thank you for taking the time to help us improve the quality of Unity Documentation. Create creates a new Sprite which can be used in game applications. A texture needs to be loaded and assigned to Create in order to control how the new Sprite will look. In the script example below a new Sprite is displayed when the button is pressed. The new sprite is created in Start.
The second argument rect defines the sub-texture used. The rect argument is defined in pixels of the texture. A Rect The bottom to top range would be The third argument pivot determines what becomes the center of the Sprite.
This is a Vector2 relative to the rect where Vector2 0. The pixelsPerUnit value controls the size of the sprite. Reducing this below pixels per world increases the size of the sprite. The extrude value defines the number of pixels which surround the Sprite.
This is useful if the Sprite is included in an atlas. Finally border determines the rectangle size of the Sprite. The Sprite can be provided spaces around it. See Also: SpriteRenderer class. Is something described here not working as you expect it to? It might be a Known Issue. Please check with the Issue Tracker at issuetracker.
Version: Language English. Scripting API.
Fixing Gaps Between Sprites - Better 2D in Unity Part 2
Suggest a change.Long time no post, recently I have been working on some other projects or nothing at all but came by this fix online and thought I should share it. If you work with Unity at all and I am guessing you do or you would not have found yourself at this page you know how frustrating it is dealing with the way Unity handles 2D sprites and tiles. The only way to get rid of the little lines that sometimes show on the top or bottom of a given sprite is to extrude the tiles but keep the settings in Unity the same.
I am guessing that is a really nice tool but I decided the problem wasnt worth money and worst case I could manually do it too much time or make a little program to do it for me also a lot of time. If you follow the link above there is a nice little editor package, if you use it, it will auto extrude a tileset or spritesheet within unity for you.
Here is an example, on the left you have the original 32 by 32 pixel tile. Note the borders on the top, right, and bottom. I have been considering posting more Unity tutorials and logging some sort of Journal on the game I am working on…so maybe soon the site will see some more activity. Pokemon Flora Sky [Walkthrough]. Alien: Isolation [Preview]. Dragon Age: Inquisition Multiplayer [Guide]. Pokemon, 5 Life Lessons Learned.
Select a Page:. Guides Unity. November 6, Adam McKeown. November 13, Steven. February 20, Steven. Popular Recent.Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable. For some reason your suggested change could not be submitted. And thank you for taking the time to help us improve the quality of Unity Documentation.
Create creates a new Sprite which can be used in game applications. A texture needs to be loaded and assigned to Create in order to control how the new Sprite will look. In the script example below a new Sprite is displayed when the button is pressed. The new sprite is created in Start. The second argument rect defines the sub-texture used.
The rect argument is defined in pixels of the texture. A Rect The bottom to top range would be The third argument pivot determines what becomes the center of the Sprite. This is a Vector2 relative to the rect where Vector2 0. The pixelsPerUnit value controls the size of the sprite. Reducing this below pixels per world increases the size of the sprite. The extrude value defines the number of pixels which surround the Sprite. This is useful if the Sprite is included in an atlas.
Finally border determines the rectangle size of the Sprite. The Sprite can be provided spaces around it. See Also: SpriteRenderer class.
Did you find this page useful? Please give it a rating:. What kind of problem would you like to report? It might be a Known Issue. Please check with the Issue Tracker at. Thanks for letting us know!