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

Embers material scaling #40

Closed mrlinds closed 4 years ago

mrlinds commented 4 years ago

When scaling geo using 'Brush/Particles/Embers' the motion of the 'particles' don't scale correctly. There is a comment in there with an alternate that also doesn't quite scale correctly.

I locally added a scale term to the displacement function output, similar to what's done in other shaders ie: return dispVec kDecimetersToWorldUnits length(unity_ObjectToWorld[0].xyz);

dubois commented 4 years ago

Thanks for the report. I just took a look at this.

On the one hand, the current behavior (embers always move upwards relative to the environment; embers always rise ~1m measured in environment space, even if you select and scale them to giant size) matches what happens inside Tilt Brush, which is our primary constraint.

On the other hand, all that scale is baked out at export time, so it seems reasonable to interpret scale differently in TBT than in TB. I'm sure there are other similar issues lurking in our vertex shaders but I'll apply your suggested fix in the next release.