Unity Community


Page 4 of 126 FirstFirst ... 234561454104 ... LastLast
Results 61 to 80 of 2519

  1. Location
    Newcastle upon Tyne, UK
    Posts
    1,179
    Quote Originally Posted by bryanleister View Post
    Hi,

    I'd like to use the Static Sprite Batcher to create 2D levels in a platform type of game. The levels are irregular in shape, so a box collider attached to the Sprite Batcher doesn't work. If I add a Box collider to each child of the Static Sprite Batcher, they get deleted when I commit to the static Sprite.

    I can sort of use a Mesh Collider on the Static Batcher, it actually works but I get this error:

    Actor::updateMassFromShapes: Compute mesh inertia tensor failed for one of the actor's mesh shapes! Please change mesh geometry or supply a tensor manually!

    I know that this is because the Sprite mesh that is created is flat. I can use 'Convex' and don't get the error, but the shape is nowhere as accurate as I would like.

    My other options are:

    1. Do not use the Static Batcher, just use individual sprites
    2. Create child game objects with various box colliders where I need then

    What is your recommended workflow? It seems like this would come up often enough. For example, your demo of the Sprite Batcher, where and how did you end up adding colliders to make that irregular shape into a platform?
    Currently we simply create large box colliders where needed. Slightly inconvenient, but that was the best option to maintain good performance. We create tiled backgrounds constructed out of tiles and there may be objects where collisions aren't required (eg. trees, background decorations, etc) which makes automatically creating a collision mesh impractical and not particularly efficient.

    We did prototype a collision mesh creation tool where you place points in 2d space to create a collision mesh, but the time spent on it didn't justify the results; it was still quicker to create box meshes, which ended up being more efficient anyway for the kind of tiled backgrounds we were creating.

    We are waiting for Unity 3.4 to see how efficient the collider tweaking becomes, before proceeding to spend more time on the tool. (http://blogs.unity3d.com/2011/06/16/unity-roadmap-2011/).

    We are definitely interested in feedback, if enough people think the mesh drawing thing is useful, we could justify spending time on it.

    unikron
    Last edited by unikron; 07-08-2011 at 03:58 PM.


  2. Posts
    160
    Hi!

    It would be great if the engine supports some function to load specific image.
    Not only for the 3gs - iphone 4 (midmap solution consumes so much memory to be an acceptable solution for some aplications), but also if we need load better graphics.

    For example, ipad 1 vs ipad 2 the memory is really different, some times I will need to load the images compressed for ipad 1, but I want to use them with full quality on ipad 2.

    Obviously it can be done loading different sprites depending of the hardware, but if we can easily do this with the same sprite, it can be great.


  3. Location
    Newcastle upon Tyne, UK
    Posts
    1,179
    Hi all,

    Version 1.03 has just been submitted to the asset store.
    Changes in this version are:
    - More error messages & warnings instead of error messages in the console
    - Reminder when texture is being cropped by Unity, due to max texture size
    - Autocrop textures by default. Any empty space (zero alpha) in your texture is automatically cropped to save texture space and fillrate.
    - Multiline support in textmesh

    unikron

  4. MvD MvD is offline

    Posts
    9
    Hi, I bought the 2D Toolkit yesterday, and it's very nice to use. However, I ran into a problem. The sprites are not perfectly pixel-perfect. This happens only with bigger sprites. See the image at http://www.flickr.com/photos/5567004...in/photostream. On the left is the original asset, on the right the pixel-perfect sprite. They differ quite a lot. I am using the sprites for my UI, but the buttons don't look as crisp as the original source images. Is this fixable?
    Last edited by MvD; 07-12-2011 at 03:40 AM.


  5. Location
    Newcastle upon Tyne, UK
    Posts
    1,179
    Quote Originally Posted by MvD View Post
    Hi, I bought the 2D Toolkit yesterday, and it's very nice to use. However, I ran into a problem. The sprites are not perfectly pixel-perfect. This happens only with bigger sprites. See the image at http://www.flickr.com/photos/5567004...in/photostream. On the left is the original asset, on the right the pixel-perfect sprite. They differ quite a lot. I am using the sprites for my UI, but the buttons don't look as crisp as the original source images. Is this fixable?
    Hi, can you check that the atlas texture isn't limited by unity, and also that it isn't compressed as well?

    unikron

  6. MvD MvD is offline

    Posts
    9
    Hi Unikron,

    Thanks for the quick reply! Sorry, I should have told you: I tried this with your scene 3 (staticspritebatcher), by importing the 2D toolkit package into an empty Unity project, so you can try it for yourself. The atlas seems to be fine, by the way: the black lines on the chest are perfectly sharp in the atlas, and the chest sprite has the same dimensions as the source sprite. The atlas is pixel-perfect

    Cheers,
    Matt


  7. Location
    Newcastle upon Tyne, UK
    Posts
    1,179
    Hi Matt,

    I have done a test with that chest and I am confident that we get 1:1 pixel mapping in this case. You can verify this yourself by:

    - set the resolution on the unity game panel to 960x640 (which is the target res set up for the demo, and the default for 2d toolkit.)
    - resize your Game viewport so unity isn't scaling it down
    - get a screengrab and paste this into photoshop and overlay the source png on top of the scene
    - the size of the sprite should be exactly the same as the source, but the actual texture will not match 100% for the reasons explained below.

    There seems to be two separate issues (not necessarily problems) in that scene.

    1. The first is that the atlas texture is set up with Bilinear filtering turned on. It is probably a good idea to turn that off if you are after 100% pixel perfect sprites, which leads to the second point.

    2. The sprite isn't positioned at a pixel boundary. This means that with filtering turned on, it will be displaying a filtered value halfway in-between the texels.

    If you retry the experiment with Filter Mode set to Point on the atlas texture, you will find that the textures match, and that the black lines will be solid as in the source.


    If you have any further problems, please drop us a PM and we will take this further.

    Regards,
    unikron


  8. Posts
    92
    Hello, it's me again . I'm thinking of using lights in my scenes with sprites. Right now, the system does not allow for dynamic lighting, everything is self-lit. This can be easily remedied by sprinkling mesh.RecalculateNormals(); in the few places the vertices are modified in tk2dSprite (or calculating the normal yourself as Vector3.back), then supplying a new shader that supports lighting. The only down side to doing this is that you cannot use the Color feature of the sprites, as the Vertex Colors are now lighting dependent you cannot color the vertices (you would need to modify the material's color at runtime, thereby cloning the material... but I don't use the Color feature so it doesn't bug me).

    The reason I'm writing is to consider this for inclusion into the library. I'm sure some 2d games would look cool with dynamic lighting, like a dungeon crawler. If anyone else wants dynamic lights, the above method works in the meantime.

    Cheers.


  9. Location
    Newcastle upon Tyne, UK
    Posts
    1,179
    Hi,


    Thanks Jodon for those notes. I'm sure it will come in handy for anyone else who is trying to implement something similar.


    I think including normals is probably the best option for now. Vector3.back would be sufficient as the sprites are created in only one orientation. i.e. the only place which really needs to be modified is tk2dSprite and maybe tk2dBaseSprite.

    You could still use Color with the materials, only it would be tinting the texture prior to any lighting operations. Whilst adding normals, tangents too could be a useful addition, as then (in theory, but in practice would be a bit more complicated to set up) you could have a tangent space normal map for bump mapping which could be really useful for some types of 2d games.

    I'm not sure of the usefulness of something like this being included by default in the package, as there will be a fairly hefty size increase per vertex. Not supporting dynamic lighting was a concious decision to get the best shader performance and memory consumption

    If there is enough interest we could justify creating a (probably paid) addon pack for that does this (will have to be a new set of classes to support dual atlas generation for normal maps, so it won't be trivial). Our immediate priority is to set up some sort of dynamic texture loading as it has been requested a few times.

    unikron


  10. Posts
    165
    Quote Originally Posted by unikron View Post
    Hi all,

    Version 1.03 has just been submitted to the asset store.
    Changes in this version are:
    - More error messages & warnings instead of error messages in the console
    - Reminder when texture is being cropped by Unity, due to max texture size
    - Autocrop textures by default. Any empty space (zero alpha) in your texture is automatically cropped to save texture space and fillrate.
    - Multiline support in textmesh

    unikron

    I tried to update from 1.02 to 1.03 on the Asset Store and the only thing new is the pdf manual? (that's what Unity allow my to import as new files).
    Are you sure that you uploaded the new files?
    Last edited by spartan; 07-12-2011 at 10:03 PM.


  11. Location
    Newcastle upon Tyne, UK
    Posts
    1,179
    All the files were up to date when I uploaded them. I'll check if I can get the .unitypackage from the unity guys to check.

    Unikron


  12. Posts
    160
    To achieve the light effect, the normals of the quad will no be sufficient, it will look really really simple.
    If you want to achieve this effect on 2d, you need to use a normal map. Is a little more complex, but it looks like 1 million times better.


  13. Posts
    16
    Hi,

    I am already bought this toolkit. I found some issues :
    - texture atlas created with not optimal algorithm as result i have biggest texture. How to fix it?
    - is it possible to create sprite collection depends on already created sprite sheet ?
    - how to create reverse sprite animation without creation of new clip?


  14. Location
    Newcastle upon Tyne, UK
    Posts
    1,179
    Quote Originally Posted by ArtX View Post
    Hi,

    I am already bought this toolkit. I found some issues :
    - texture atlas created with not optimal algorithm as result i have biggest texture. How to fix it?
    - is it possible to create sprite collection depends on already created sprite sheet ?
    - how to create reverse sprite animation without creation of new clip?
    1. About large textures, you can turn on dicing which will chop and trim them up. Check the first demo which demonstrates it.
    2. No. Perhaps you could run a batch process in photoshop to do it the once?
    3. No, not right now. We could add a duplicate clip and reverse button if thatll be useful?

    Regards,
    Unikron

  15. MvD MvD is offline

    Posts
    9
    Hi Unikron,

    Yes you are totally right:at the correct resolution, and with point filtering, the sprites are indeed pixel-perfect.

    Thanks,
    Matt


  16. Posts
    165
    Unikron,

    Have you reviewed why the update 1.03 does not download all new files?

    Thanks


  17. Location
    Newcastle upon Tyne, UK
    Posts
    1,179
    Hi Spartan,

    Unfortunately that hasn't been resolved yet. We will be submitting a new update this Friday, so hopefully your issue will be resolved then.

    Unikron


  18. Posts
    16
    Quote Originally Posted by unikron View Post
    1. About large textures, you can turn on dicing which will chop and trim them up. Check the first demo which demonstrates it.
    2. No. Perhaps you could run a batch process in photoshop to do it the once?
    3. No, not right now. We could add a duplicate clip and reverse button if thatll be useful?

    Regards,
    Unikron
    1. Thanks, the problem was when i added image 1024px in width
    2. My problem that i already have sprite sheets but do not have сut sprites)
    3. Yes, it will be helpful and save lot of time


  19. Posts
    165
    Unikron,

    I have an issue with the physics demo. I tried to put a background (640px height). The camera has an ortho size of 10 by default and when I test it on an iPhone 4, the background is pixelated. The crates are showing well.

    Thanks


  20. Location
    Newcastle upon Tyne, UK
    Posts
    1,179
    Hi Spartan,
    Can you check that the max texture size on the atlas texture is not limited to 1024 which I believe is the default. If that's the case we have added a warning in 1.03 but it looks like 1.03 didn't upload correctly.

    Unikron

Page 4 of 126 FirstFirst ... 234561454104 ... LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •