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

HDRP Support #39

Open sergiobd opened 4 years ago

sergiobd commented 4 years ago

Any suggestions on how to import the brushes correctly in Unity when using HDRP?

dubois commented 4 years ago

I've never used the HDRP. Many of the materials use relatively straightforward surface shaders, and all the shaders are written so they work mostly the same whether you're using srgb or linear lighting.

andybak commented 4 years ago

Unfortunately surface shaders are one of the things unsupported in the new rendering pipelines. They are heavily tied into the old pipeline.

However I'm not sure many of the Toolkit shaders really need to be surface shaders. Most would be pretty easy to reproduce using normal vertex/fragment shaders or even reimplemented using Shadergraph.

The only problem is that there are quite a few of them.

My question to @sergiobd would be - are you using a big number of different shaders and are they the funky animated ones or simpler ones that could probably be replaced from scratch fairly easily?

sergiobd commented 4 years ago

Hey! Thanks for your extremely quick answer! No funkiness, I'm going to use the simple ones. The problem with HDRP is that the process for writing shaders is still a bit obscure. It is suggested to use ShaderGraph. I'm going to look into that.

sergiobd commented 4 years ago

Hi @andybak and @dubois,

So, I can confirm that the brushes that are coded as fragment shaders do import fine in HDRP (I tested with "snow" and "comet"). I did a quick test using ShaderGraph to see how easy it was to port the surface shaders, and it looks it's indeed pretty easy. I tested with the Oil Paint brush, which uses the Standard Double Sided shader. Note that I'm connecting the output of the normal map directly into the master node. Therefore, I'm assuming all the lighting and shading is handled internally by Unity.

image

dubois commented 4 years ago

I'm going to leave this open as a discussion space, but the shaders in the Toolkit cannot diverge significantly from the ones used in Tilt Brush. If anyone does create an alternate set of shaders that works well with other render pipelines, link to your repo here and I'll promote it into our README

gilasher commented 4 years ago

Any updates regarding importing Tiltbrush materials into unity HDRP? TNX

dubois commented 4 years ago

No change. Tilt Brush still does not use HDRP internally, and therefore the shaders exported from Tilt Brush do not support HDRP. It looks like nobody is interested in contributing any, either.

sergiobd commented 4 years ago

@gilasher, the Tiltbrush standard shaders have a simple implementation, and therefore it was relatively easy to make similar ones on shadergraph (at least to fit my own purpose). I can send a graph to you if you want.

gilasher commented 4 years ago

@sergiobd I'll really appreciate it, Thanks! My shading skills aren't very good, so I get stuck even with the simple things! It would be very helpful if you can share it!

Dennisrudolph commented 4 years ago

I am also having this problem. Unfortunately I have no idea how a shader graph works. Could you help me out? Maybe send me the updated tiltbrush shaders for HDRP? Highly appreciated ! Thanks. Dennis

sergiobd commented 4 years ago

@gilasher @Dennisrudolph, I added a small repo with the shader graphs in case you still need them.

Dennisrudolph commented 4 years ago

Thank you so much Sergio! Highly appreciated.

www.dennisrudolph.com www.stateoftheartberlin.net

Von: Sergio Bromberg Gesendet: Mittwoch, 3. Juni 2020 04:07 An: googlevr/tilt-brush-toolkit Cc: Dennisrudolph; Mention Betreff: Re: [googlevr/tilt-brush-toolkit] HDRP Support (#39)

@gilasher @Dennisrudolph, I added a small repo with the shader graphs in case you still need them. — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

gilasher commented 4 years ago

@sergiobd thank you! it is very helpful

VKolbasa commented 3 years ago

Hi Sergio!

Could you send it to me also pleeease? Need it urgently! :) vkolbasa@gmail.com

Volo

sergiobd commented 3 years ago

Hi Volodymir, its here : https://github.com/sergiobd/TiltbrushHDRP/tree/master