Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  Obi Particle Renderer not working on Rope in URP
#1
Triste 
Hi, new user here.

I've been following along with the video tutorials to integrate ObiRope into my project, and everything was going fine up until I went to attach the Obi Particle Renderer component to my rope, as per video 2.

Adding this component had no visible effect, and my rope's particles remained invisible.

As mentioned in the title, I'm using URP. I tried changing the shader used by the Particle Renderer to the Particle Shader found in Assets/Obi/Resources/ObiMaterials/URP/, but this likewise had no effect.

Sorry if this is a common problem, but I attempted to search the forum and didn't find anything. If anyone can help tell me what I'm doing wrong, or suggest something that might help fix this, I would greatly appreciate it. I've attached screenshots of the inspector for my various components.

Blueprint:
   

Solver:
   

Rope:
   
   

Scene View:
   
Reply
#2
(19-01-2024, 01:03 AM)Memenaar Wrote: I tried changing the shader used by the Particle Renderer to the Particle Shader found in Assets/Obi/Resources/ObiMaterials/URP/, but this likewise had no effect.

Using the "ParticleShaderURP" shader found in /Obi/Resources/ObiMaterials/URP/ should work.

From your screenshot however, it looks like your game is 2D, is there any chance you're using URP's 2D renderer instead of the regular renderer? If that's the case, the built-in particle shader won't work as-is (since the 2D lighting system works in a completely different way to all other pipelines in Unity) and you must slightly modify it:

Open up /Obi/Resources/ObiMaterials/URP/ParticleShaderURP.shader and in line 15-ish, replace:

"LightMode" = "UniversalForward"

with

"LightMode" = "Universal2D"

This change alone should allow your particles to render in 2D, even though directional lighting will be wrong (again, because 2D lighting works in a completely different way than Unity's usual lighting pipeline). You can modify the shader further to fit your rendering style, by for instance removing directional lighting or making it toon-like.

let me know if I can be of further help,

kind regards
Reply
#3
(19-01-2024, 09:34 AM)josemendez Wrote: Using the "ParticleShaderURP" shader found in /Obi/Resources/ObiMaterials/URP/ should work.

From your screenshot however, it looks like your game is 2D, is there any chance you're using URP's 2D renderer instead of the regular renderer? If that's the case, the built-in particle shader won't work as-is (since the 2D lighting system works in a completely different way to all other pipelines in Unity) and you must slightly modify it:

Open up /Obi/Resources/ObiMaterials/URP/ParticleShaderURP.shader and in line 15-ish, replace:

"LightMode" = "UniversalForward"

with

"LightMode" = "Universal2D"

This change alone should allow your particles to render in 2D, even though directional lighting will be wrong (again, because 2D lighting works in a completely different way than Unity's usual lighting pipeline). You can modify the shader further to fit your rendering style, by for instance removing directional lighting or making it toon-like.

let me know if I can be of further help,

kind regards

Thank you so much Jose, that worked perfectly.

I mostly just wanted to be able to see the particles in order to help internalize how they work, they'll be turned off for the actual gameplay. I'll keep the above in mind in case I ever need to show them in-game though.

Really appreciate it!
Reply