A Unity ID allows you to buy and/or subscribe to Unity products and services, shop in the Asset Store and participate
in the Unity community.
Discussion in '2D Experimental Preview' started by rustum, May 24, 2019.
You were right on. I don't know how I missed this, thank you!
You can actually use z and a perspective camera if you want. If you don't want to do that, you can choose to scroll the layers themselves.
Btw, how are you using the other camera's to do parallax scrolling?
the first camera is setup to only see the default layer, and depth set to 0. The other camera has a larger lens, depth at -2, and only sees the background layer. So it's kind of a fake parallax vs. moving the layers. They are both orthographic. Maybe perspective cameras would be a better route, I just did it that way based on a YouTube tutorial.
SUCCESS! I finally got the point light to show, it was a combo of z-index and not doing parallax the way I was before, just one layer now. Thank you for the suggestions! Do you guys think this is a good way to do layers (skip to around 14:00)? For some reason on my scene it's a little herky-jerky with the movement, but for this guy it looks very smooth. Could be my cheap HDTV as monitor though.
OK last post, sorry just learning. Do any of you guys get this pixel-line tracer thing from point light? Is it a setting?
Please ignore the art/graphics, just a fast test scene.
Hey! So I'm using the 2D Renderer inside the URP (and also pixel perfect). I'm trying to get a GrabPass of the camera from _CameraOpaqueTexture but it's throwing me a bunch of errors:
Shader properties can't be added to this global property sheet. Trying to add _CameraOpaqueTexture (type 3 count 1)
I have Opaque Texture enabled in my RenderPipelineAsset. Am I doing something wrong, or is this simply not possible? How else would I get a screen grab of the current frame?
The documentation states here that this should be the way to do it, although it does say it's not safe to assume it works for the 2D renderer.
Thanks in advance.
I don' know if I have a 'case', but I have a shader pack of shader graph-based shaders, I have to recommend the use of a render pipeline, and I'd like to be able to tell people that can use it with lightweight or HD pipelines. Otherwise it seems limiting because some of the shaders are designed for use in 3D, some are 2D.
Don't think you an HD bells and whistles pipeline should AT LEAST be able to render basic 2D objects in some fashion? Because now what happens is if people choose to use the HD render pipeline they cannot use some of my shaders because they'll get no output at all.
So the 2D Renderer is an alternative to the Forward renderer in URP. The Forward renderer can render sprites, but it won't be able to use the features supported by the 2D Renderer.
Likewise, HDRP can render sprites as well, it just won't have some of the features that the 2D Renderer has.
Hello. Just some feedback on LWRP 6.9.2 and questions from a Unity noob.
I have now implemented 1x global light and 1x point light in my project using LWRP. I have had some issues though:
Edit -> Render Pipeline -> Lightweight Render Pipeline -> 2D Renderer -> Upgrade Scene to 2D Renderer, does not convert Anima2D SpriteMeshes. One has to manually add the Sprite-Lit-Default material to every SpriteMesh manually.
The point light worked in edit mode, but seemed not to in play mode. It turns out the default Z position was not in my camera's view. A common gotcha. Perhaps a better default Z value might help newbies?
Mobile performance is abysmal with just these 2 lights. My Dell XPS 13 with on-CPU graphics runs the project well, but not so with my Huawei P10 Lite. Are there any RWRP settings to significantly improve mobile performance? Thanks in advance.
Thanks for reading.
Hi, just noticed that the sorting layer target field on the Light2D class is not exposed in the API so i can't set it via script? Is there any chance we could get access to this in a coming update?
Or am i blind and somehow can't find a way to set it in code?
Just hit a wall as well, tried to update `
Light2D.shapeLightFalloffOffset` via script but it has no setter.
Hey Guys, Is there a known issue with 2D shader graph and Intel integrated graphics?
The simple noise node is looking wierd on editor and builds (only with intel in windows).
it looks like this:
I've added these to my next sprint to fix, but I'll try to fix them sooner if I have time. Not sure when you will get these changes since I have little control over when Universal RP is released
So a while back LWRP was renamed to Universal RP. Some of these issues were fixed.
With that said, the performance is being worked on. But one thing you can do right now is to reduce your Render Texture Scale in the Renderer2DData. The smaller the value the faster things will run, but the more visual effect it will have. From testing 0.5 seems like a value that you will probably not notice much difference, but depending on your scene and lights you may be able to reduce it much more than that.
Hi! Is there a way to edit/set via script the vertex positions of a freeform light ?
I'm liking this. I get reflections on the camera though I think I saw somewhere in here that is a bug. The lights shouldn't reflect on the camera background right? If its not in the layers selected. Anyway cool tech can't wait for shadows and such.
Is there a way for me to write a shader that will allow my custom mesh to take advantage of the new 2D render pipelines features? Specifically the normal mapping.
Is shadow casting any closer? In particular I'm wondering about Tilemaps (Isometric). Maybe kinda like this.
Seems like I'm jumping the gun, but is there any way to get use a custom Transparency Sort Mode with Custom axis for 2D lights? I'm in the 2D Renderer sample project and am not seeing any way to do this, which blocks many isometric projects b/c I can't sort GameObjects against stuff on the tilemap. I was hoping for a setting on the 2D Renderer Data.
There is already a shadow caster component. See 2D light video from Unite Copenhagen.
Is the roadmap published somewhere? Support for custom shaders (shader graph?), or at least support for specular? ()
Any chance to see the shadow casters to deform with rigged sprites?
Any idea when the shadow part of the 2D lighting will be in as a package? I'm liking the 2D lights for their simplicity and performance, but now I'm wondering about the shadows. I've seen in some places it mentioned that shadows will come in later this year, but this year is ending soon lol... so I'm just wondering when that may occur. I'm developing my game in hopes that by the time its near done the shadow portion of the 2D lighting might be available in 2019.2 : )
Is there some offset property for sprite light? Shadows are cast from pivot, but you have no control over the sprite position.
Its in the latest 2019.3 beta version, I installed it and tada the shadows are there.
For fear of a buggy beta version... i was hoping it would be part of the LWRP package rather than the unity 2019.3 build... that said, any Unity Dev can confirm that this will be the only way to access them? Or will waiting eventually bring them to 2019.2? My game is in early development at the moment, so I can wait a few months...
We don't plan to backport shadows support to LWRP. The final release of 2019.3 is almost upon us and we encourage you to try out 2019.3 and Universal RP.
Going forward and porting over to 2019.3 from 2019.2.15 hopefully wont bring me any bugs, but fair enough will definitely do this : P
Is there a way to do one of the following?:
A) Support seeing 2d lights along with 3d models at the same time?
B) Hot swap between rendering pipelines via code? (the below image shows how im currently doing it, even at runtime, but I don't know how to access this in code.
This would greatly increase my workflow.
Haven't tested it, but I think you should take a look at this: Rendering.GraphicsSettings
Is there an ETA for URP supporting custom post-processing effects yet? It's the main thing that's keeping me on 2019.2 and 2D LWRP.
I'm testing the newest version 2019.3 and trying to add normal maps to my sprite for 2D Lighting. Sprite was imported with PSB Importer and it is a rigged sprite. I don't see any way to add normal maps to my sprite, because it is displayed as a sprite sheet. So, in "Secondary Textures" I can only add one normal map, which goes over all the sprite sheet. But I cannot provide a normal map in this format, because the sprite sheet was created by Unity PSB Importer. And there is no way to provide individual normal maps for each layer.
Any plans to make shadow casting work automatically with tile maps? My game uses them and I have a specific ceiling layer, which is the layer I want to be casting shadows. It's just not practical to redraw the shadow caster shapes by hand with every tile update.
That aside, the 2d lights are looking great!
Edit: Also, are you guys ever going to expose the shape path for the freeform lights? Determining the light shape via script would be fine for my game too, instead of using the shadow casters...
So I can get access to my render pipeline asset like:
public class RenderPipelineSwapper : MonoBehaviour
public RenderPipelineAsset Pipeline3D;
public RenderPipelineAsset Pipeline2D;
-But where/how do I assign these?
Any ETA on when GrabPass/SceneColor will work with the 2D renderer?
Anyone's figured out how to work out Blur filters with this Renderer?
I updated my project to 2019.3 but I cant't see the shadows...How does it work?
Rendering 3d models with 2d lights is something we plan to do but it's hard to give you a time frame on this.
This is also on our list. It should be something easy to put in. Hopefully, I can get a chance to work on it early next year sometime.
Hi, I noticed that RenderPipelineAsset has a Renderer List.
However my shaders for 3dmeshes works fine only when the second Renderer is active.
Could I make two Renderers take effect at the same time?Thanks
While the new 2D renderer and lights look pretty awesome, I’m not sure I understand their benefits over the regular 3D renderer with 3D light and sprites with normal maps.
Is the big gain here in performance? If so I would love to see a benchmark.
Or is it the ability to use more interesting 2D lights?
Or something else?
If I start a new 2D sprites only game, what should be my consideration in choosing a render pipeline?
with your setup and
Edit -> RenderPipeline -> URP -> Upgrade project materials
I'm able to see 2d and 3d assets with proper 2d lighting. Finally! Thanks for nudging me in the right direction
Thanks, I'v already tried this option however it only works with few builtin shaders. Most of my shaders(materials) were not upgraded.I got tons of warnings just like this:
... material was not upgraded. There's no upgrader to convert Universal Render Pipeline/2D/Sprite-Lit-Default shader to selected pipeline
UnityEditor.Rendering.Universal.UniversalRenderPipelineMaterialUpgrader:UpgradeProjectMaterials() (at Library/PackageCachefirstname.lastname@example.org/Editor/UniversalRenderPipelineMaterialUpgrader.cs:22)
Yeah I think we're probably gonna need to make new shaders? I'm trying to figure out how to incorporate specular maps into the pipeline right now. I don't know if those are supposed to behave like the secondary textures shown here:
or if I need to make some new shader to incorporate them.
or if my only option right now is to somehow bake the specular data into the normal map by doing an operation on the normal map pixel based corresponding specular map pixel, and making it so that black on the specular produces the standard 128,128,255 "normal purple" and white on the specular map makes it whatever the base normal should have been and everything in between is interpolated accordingly.
I'm not even sure if this would get the desired result. But I'm basically looking to do this:
Just need to add the specular
Oh and Happy Holidays to everyone here and especially all the Unity devs that have been grinding it out on this new 2D lighting system. I know RT3D is the buzzword these days but I really appreciate all the time spent on making Unity an incredibly versatile engine.
Is there any way to mask a 2d light?
Hello, I couldn't find any info or way to do this. Is there any way I can control the 2d light/sprite sorting (Freeform/Parametric/Point) without having to change layers?
For example, the two images below, I would control the sprite sorting using the Y axis, so when the character Y is under the light Y, he should be in front of the light. Is there any config I could use for this right now?
Thanks in advance.
Fig 1. Light in front of character.
Fig 2. Character shouldn't be affected by light (he is in front of it)
Why aren't tilemaps affected by the 2d lights?
Not at the moment.
Not at the moment. But coming soon...ish, you will be able to do camera stacking with different renderers. This will allow some of your stuff to be rendered with the URP forward renderer, and some of your stuff to be rendered with the 2D renderer.
This should work. Check that your tilemaps are using the Sprite-Lit-Default material.
Also, if you created this after installing Universal RP, you may want to check to see that you have setup the 2D renderer properly, as this material should be assigned automatically if everything is properly setup.
Sorted lights like this aren't currently supported.