Hi all,

So I'm back to the outline task. I'm still not quite sure what is the smartest way to do this.

I think Harald mentioned an outline is basically just a duplicate of the character. (Rigs, animation are duplicated).. So I did a quick test and ran into a roadblock rather quickly.

The material of the main hero cannot be manually changed. Spine auto sets it, (which is a very good safety measure) .. but problem is I don't know how to make one main hero use the original material and the duplicate hero to use a new outline material?

I think it was Spine 3.8, that version of the Spine material allowed us to have an outline around the original material. I think it was just coloring in the transparent mesh areas? But I guess for URP it's not possible now.

I made a quick screenshot to show what I mean. The Spineboy in the back should ideally be the outline material, and the Spineboy in front would use the original material.

Do you guys have any suggestions to get me started? (o゜▽゜)o☆

Should I just be re-exporting a completely different Spineboy? And then copy paste the animator controller into there? Along with all the animation scripts, rigidbody, etc? (。・∀・)ノ

Eagerly waiting for some news on this one.
EsotericSoftware/spine-runtimes1824

**UPDATE
I'm reading this now and checking out the example scene.
http://en.esotericsoftware.com/blog/Outline-shaders-for-spine-unity#Mesh-attachments
This is the perfect result. But I think it's only for Unity's SRP, right? Not for URP.

I thought I could be clever and add an extra material array, but no luck. Spine reverts back to 1 material array when I mouse over the Raptor

Is this the best solution?
~> x2 game objects, x2 rigs, x2 sets of rigidbody, x2 player scripts etc
~> Front Spineboy gameobject uses the URP shader.
~> Back Spineboy gameobject uses the SRP outline shader.

Thanks for the help!

Related Discussions
...

Hi Harald

Harald There is a separate Outline Shaders URP example scene.

Are these the latest files required? ( \ ^ o ^) /

URP Shaders - Extension UPM Package.. is this ZIP the correct one?

http://en.esotericsoftware.com/spine-unity-download
I don't see anything named URP Shaders - Extension UPM Package on this page. (this is where I always get the runtimes for Spine)

Am I missing anything else?
.
.
.

Test #1 - RenderExistingMesh (When I did NOT find the Outline Shaders URP.unity file)

Harald

There is a separate Outline Shaders URP example scene. This is also documented on the spine-unity documentation page:


This is what you were referring to, right?

I added the RenderExistingMesh component script and dragged in the Renderer and Materials. But I get a red error. I think I'm incorrectly using the script?

NullReferenceException: Object reference not set to an instance of an object
Spine.Unity.Examples.RenderExistingMesh.UpdateMaterials () (at Assets/Spine Examples/Scripts/Sample Components/RenderExistingMesh.cs:129)
Spine.Unity.Examples.RenderExistingMesh.LateUpdate () (at Assets/Spine Examples/Scripts/Sample Components/RenderExistingMesh.cs:121)

This is the line of code at 129
ownMeshFilter.sharedMesh = referenceMeshFilter.sharedMesh;

Line of code at 121
UpdateMaterials();

.
.
.

Test #2 - Outline Shaders URP.unity

After some digging around, I stumbled upon the outline urp scene. For those that read this, its located in your folder as a separate file.

It is NOT the one called Outline Shaders in the other examples folder. Not sure how to be more specific about this in the documentation, but I was pulling my hair out for an hour or so. (⊙o⊙).. anyways hopefully the above image helps future people

.

Just when I thought I was making progess, the Unity overlords decided otherwise... the scene doesn't open. o((⊙﹏⊙))o.

I have no idea how to proceed. Today I've been walking into a wall over and over.(゜ー゜

While I'm here I guess I should ask, does this outline work with this shader?

Thanks so much for your help Harald ! O(∩_∩)O

  • Harald님이 이에 답장했습니다.

    IndieDoroid http://en.esotericsoftware.com/spine-unity-download
    I don't see anything named URP Shaders - Extension UPM Package on this page. (this is where I always get the runtimes for Spine)

    Am I missing anything else?

    We call all optional Spine UPM packages "Extension UPM Package" in the spine-unity documentation page (here and here), so that it's clear that this extends the spine-unity runtime and is not mandatory. Admittedly I didn't anticipate that this could be misunderstood as "there is a second extension UPM package to the already optional URP Shaders UPM package". Nevertheless, I'm not sure it can be made any clearer without other drawbacks and potential misunderstanding.

    IndieDoroid After some digging around, I stumbled upon the outline urp scene. For those that read this, its located in your folder as a separate file.
    ..
    It is NOT the one called Outline Shaders in the other examples folder.

    That's why it reads "Outline Shaders URP" and not "Outline Shaders" in my above posting and on the documentation page. Note that you can also use the search function in the Project panel to find files. Anyway, we have updated the documentation to explicitly list the full path so that it can't be misunderstood.

    IndieDoroid Just when I thought I was making progess, the Unity overlords decided otherwise... the scene doesn't open. o((⊙﹏⊙))o.

    Why do you open the scene file via the file browser and not via the Project panel? You might choose the wrong file outside of your project directory. Also, why do you have your Console window hidden? Always keep the Console window visible, especially when encountering any problems. Likely you find your problem described there. If you receive an error like "Opening scene in read-only package!", you need to copy the scene to e.g. your Assets directory as mentioned in the FAQ:
    https://esotericsoftware.com/spine-unity#Import

      Harald Why do you open the scene file via the file browser and not via the Project panel? You might choose the wrong file outside of your project directory. Also, why do you have your Console window hidden? Always keep the Console window visible, especially when encountering any problems. Likely you find your problem described there. If you receive an error like "Opening scene in read-only package!", you need to copy the scene to e.g. your Assets directory as mentioned in the FAQ:

      I use Unity in a strange way I guess. To be honest I've never had to open anything outside of the Assets folder.

      For those that stumble onto the same problem. The Outline Shaders URP scene is located here.

      and again.. it's NOT this Outline Shaders scene here.

      Ok I finally got the scene open! Time to study it.

      Thanks Harald! ! ! ! ! ! ヽ(✿゚▽゚)ノ

      @IndieDoroid Glad to hear you've got it worked out, thanks for getting back to us 🙂.