googlevr / tilt-brush-toolkit

Scripts and assets that help you use Tilt Brush data in your creative projects.
Apache License 2.0
737 stars 164 forks source link

TiltBrush SDK Unity Shader Problems #50

Open thomasender opened 3 years ago

thomasender commented 3 years ago

I encounter problems with the following shaders from the TiltBrush SDK v23 (latest version to date):

Bubbles Failed to open source file: 'Assets/ThirdParty/Noise/Shaders/Noise.cginc' at line 26 (on d3d11) Diamond Hull: failed to open source files 'HLSLsupport.cginc' 'UnityShadersVariables.cginc' 'Lightning.cginc' and many more... Smoke: Failed to open source file: 'Assets/ThirdParty/Noise/Shaders/Noise.cginc' Toon: Failed to open source file: 'Assets/ThirdParty/Noise/Shaders/Noise.cginc' WigglyGraphite: same as Diamond Hall

Anyone encountering the same? Anyone got a solution? It would be awesome to get this going. Also I am curious if there is a way to import an export from tiltbrush into unity so I will have the obj file with it. My situation is this: I export an obj from Medium and can import it into TiltBrush just fine. After doing the fancy design thing I want to export the whole sketch/project so I can import it in Unity. Until know I only could import the obj itself (without TiltBrush design) and I managed to import the TiltBrush sketch, but having problems with the shaders. They are not assigned automatically and the above mentioned are not showing up in the list so I could assign them manually.

In the documentation about importing Sketches from Tiltbrush in Unity it says I only need to import the fbx from TB into unity, unfortunately it doesn't work for me. I am using Unity 2019.4.f121

Update: I also got problems with all the other shaders. Somehow Unity will not apply them to the TB sketch although I import it through Poly. I can assign another shader, I am using Universal Rendering Pipleline, but of course it will not create the same effect. I would be very happy to get a good tutorial on how to import TB sketches correctly into Unity 2019.4.12f1 to fully make us of these two great and powerful softwares.

Any help is much appreciated, as I am diving deep into this wonderfully creative workflow. It's been 10 years since I worked as Dev and am getting back to it these Lockdown days. I am amazed how much changed and with VR the DevGame evolved to a completely new dimension. Super excited to witness this :D

Thanks for helping out Thomas

KashCorp commented 3 years ago

Hi Thomas,

I have the same problem. Only solution I found was to use Poly Toolkit instead.

Give a try

dubois commented 3 years ago

Hi Thomas -- those errors happen when you move Tilt Brush Toolkit's files away from where it expects them to be. Install the toolkit using one of the .unitypackage releases, for example https://github.com/googlevr/tilt-brush-toolkit/releases/download/v23.0.1/tilt-brush-toolkit-UnitySDK-v23.0.1.unitypackage

If you clone this repo and copy the files into your project, at least make sure that you put the ThirdParty directory in your Assets.

dubois commented 3 years ago

Regarding your other question, you can take either the .glb or the .fbx file from your Tilt Brush exports and drop it into your project. It will work once you've resolved the Unity issues building your project.

thomasender commented 3 years ago

Thanks for your replies @dubois and @KashCorp. I always used the unitypackage installer and never moved files from the polytoolkit. I still can't figure out how to fix make all brushes work. Yesterday I got a mail from google where they say that poly will be shut down. This is rather sad I think. Hopefully someone will build a platform so the tiltbrush/poly community, as well as the unity implementation can survive. I don't see why they cut this promising connection. Do you?

dubois commented 3 years ago

Hi @BhujangaOne .

Try to figure out why the error message "Failed to open source file: 'Assets/ThirdParty/Noise/Shaders/Noise.cginc'" is happening. Does that file exist? if so, why is unity claiming it does not exist?

Verify my claim that those files are in the .unitypackage by importing it into a new Unity project. Does that file exist? If so, why does it not exist in your current project? Did it get moved or deleted accidentally? etc.

This github repo is not going away. The shutdown only concerns poly.google.com.

garretthoyos commented 3 years ago

Also experiencing the same issue - my Tiltbrush/poly assets import fine but the shaders are all pink/missing. I imported the poly package manager but it looks like shaders are broken. @dubois and @KashCorp @bhujangaOne - any idea how to fix this? Asset directory is correct as far as I can tell.