Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411500 Posts in 69373 Topics- by 58429 Members - Latest Member: Alternalo

April 25, 2024, 12:51:43 PM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsDeveloperTechnical (Moderator: ThemsAllTook)Unity... what are good pixel perfect camera assets?
Pages: [1]
Print
Author Topic: Unity... what are good pixel perfect camera assets?  (Read 2380 times)
ralphyua
Level 0
**


View Profile WWW
« on: October 22, 2018, 03:35:30 PM »

Just wondering what people are using to get pixel perfect movement in their games. I tried a few assets on the Unity store, but most of them don't seem to work that well. The one I settled on is good for the most part. However, I still get some strange artifacts with my moving platforms and doors. I think the asset is called "Perfect Pixel Camera" by a developer called GGEZ, not to be confused with "Pixel Perfect Camera", which did not work that well for me.

I went to a game dev meetup, and even professionals in the industry couldn't tell me a good solution. If anybody could give me suggestions on how they achieved pixel perfection in their unity games, that would be great. Thanks.
Logged


Try it on Steam
Follow on Twitter
oahda
Level 10
*****



View Profile
« Reply #1 on: October 22, 2018, 10:47:32 PM »

It's at times like these I wish old school forums would have a tagging function like modern social media platforms…

Anyway, this devlog's game uses Unity and pixel graphics that seem to look pixel perfect. I couldn't find out what plugin they're using in the thread, but maybe you can shoot maruki a PM here or a message on Twitter to ask. c:
Logged

ralphyua
Level 0
**


View Profile WWW
« Reply #2 on: October 22, 2018, 11:23:09 PM »

I saw that game. It looks pretty cool. Didn't know if the devs here responded to direct development questions. I'll give it a try. Thanks.
Logged


Try it on Steam
Follow on Twitter
Chris MacAdam
Level 2
**



View Profile
« Reply #3 on: October 23, 2018, 09:27:34 AM »

Unity has a pixel perfect camera package that you can always try.

https://docs.unity3d.com/Packages/[email protected]/manual/index.html

It is in the package manager, I think it is still in development but it is worth seeing if it suits your needs. I have used it in some game jams and the game I am working on now also.

Edit: I realized you said this asset did not work well for you? What problems did you have? I have used it and got pretty good results as long as you remember to keep things in positions that work with your PPU.
Logged

ralphyua
Level 0
**


View Profile WWW
« Reply #4 on: October 23, 2018, 11:19:12 AM »

I remember I tried the new Unity pixel perfect camera, but there was something buggy about it. I forgot what the problem was because I must have tried five different assets overall. Well, thanks anyway.
Logged


Try it on Steam
Follow on Twitter
Richard Kain
Level 10
*****



View Profile WWW
« Reply #5 on: October 26, 2018, 08:48:56 AM »

Your best bet to get true pixel perfection in Unity is to... not use Unity. At least, not use Unity entirely. Unity is not built around pixel rendering. If you want to insure true pixel perfection, your best bet is to use a work-around.

I recommend Tilengine. I've been playing around with it for the past few weeks, and I recently figured out how to successfully embed it in Unity. Good stuff. Using it as an alternative rendering approach works well at providing a legacy pixel rendering context that can be wrapped up inside Unity. And it provides true integer-based pixel positioning and movement.

Of course, it also has no built-in 3D rendering, so you would be limited to a true 2D context for the actual Tilengine instance. Depending on how you set it up, you could still use 3D elements from Unity itself, as well as any other Unity-specific structures. I've been thinking of using this approach to construct a sprite-based 2D JRPG, while using Unity for the menus and interface.
Logged
ralphyua
Level 0
**


View Profile WWW
« Reply #6 on: October 26, 2018, 09:41:00 AM »

Never heard of Tilengine before. I will definitely check it out. Thanks.
Logged


Try it on Steam
Follow on Twitter
whendricso
Level 0
**


View Profile WWW
« Reply #7 on: November 02, 2018, 11:40:37 AM »

You don't need to buy any assets. Just use the Package Manager to install the Pixel Perfect Camera and you're good to go!
Logged

Founder or Tech Drone
Creators matter!

Programmer of MultiGame, make Unity games WAY faster!!
https://www.techdrone.com/multigamedocumentation
Bernie
Level 0
***



View Profile WWW
« Reply #8 on: November 10, 2018, 02:05:22 PM »

Here's how I got my pixel perfect camera set up in Unity for low res pixel games without any additional assets (not sure if this is exactly what you need, tho):

1. Render your game to a render texture via a camera (my game had a base res of 320x180, for example, so that was the size of the render texture)
2. Assign the render texture to a material, disable anti aliasing, and place this on another object (cube, quad, whatever)
3. Use another camera to render that object
4. If your sprites or textures behave weird, set them to full rectangle in the import settings (Unity's auto cropping can make tiles and sprites look weird)

This seems to work for any low res games. I've used it for pixelated adventure games and platformers in Unity in the past.
Logged

http://www.origamihero.com - freeware oldschool games |  gamedev twitter
Richard Kain
Level 10
*****



View Profile WWW
« Reply #9 on: December 03, 2018, 09:49:34 AM »

Bernie's solution is a good approach. I would add to it that you should apply some scripted scaling to your last-step camera and render object to insure that the final render is pixel-perfect in terms of integer scaling, but the general approach is quite sound. Also, you will want to make certain that your final-step camera is set to orthographic. (if you want a true 2D rendering) One of the nice things about this approach is that it can also be used for various other effects. By modifying it slightly, you could use it to create a quasi-CRT effect, as well as several post-processing effects. And of course, the lower-resolution rendering in the first step should improve the general performance of your title.
Logged
bateleur
Level 10
*****



View Profile
« Reply #10 on: December 12, 2018, 03:36:01 AM »

I've been using FES for a recent side project and that seems to handle pixel perfect stuff well. (It's a "fantasy console" style approach, so won't be right for all projects.)
Logged

dafu
Level 0
**



View Profile
« Reply #11 on: December 14, 2018, 06:06:38 AM »

I've been using FES for a recent side project and that seems to handle pixel perfect stuff well. (It's a "fantasy console" style approach, so won't be right for all projects.)

Woo! Glad you're still enjoying FES. With version 2.0 it is now renamed to RetroBlit by the way.

asset store: https://assetstore.unity.com/packages/slug/102064

video:


Logged
AlienplayGames
Level 0
***



View Profile WWW
« Reply #12 on: December 19, 2018, 02:16:20 AM »

You have a package for Unity 2018.2 for pixel perfect camera.
Here's a video tutorial I found for it. It seems to be really easy to use.



Logged

Check out my games: http://alienplaygames.com
Pages: [1]
Print
Jump to:  

Theme orange-lt created by panic