Author Topic: Snow on moving objects  (Read 97 times)

cbethax

  • Newbie
  • *
  • Posts: 2
    • View Profile
Snow on moving objects
« on: October 26, 2020, 12:11:50 PM »
Hi, is there a way to have the snow on moving objects be static? Currently if an object moves, the snow UV on top of it moves too which makes it look weird.

Kronnect

  • Administrator
  • Hero Member
  • *****
  • Posts: 6345
    • View Profile
Re: Snow on moving objects
« Reply #1 on: October 26, 2020, 01:00:53 PM »
Hello,

1) In forward rendering path, yes -- the shader can use the GLOBALSNOW_MOVING_OBJECT define to specify that the object can move hence make the snow layer include the object position.

2) In deferred rendering path, no -- the shader works with g-buffer so it works same with terrain or moving object. In this case a solution, if you really need snow over that moving object, could consist of excluding the object from snow coverage (using the Layer Mask option of Global Snow or adding the Global Snow Ignore Coverage script to the object) and then use a material/shader that integrates the snow into the shader itself. I'll add such material into next beta -- which shader are you using on that object?

cbethax

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: Snow on moving objects
« Reply #2 on: October 26, 2020, 01:27:00 PM »
I'd prefer to use the deferred mode. I'm using unity's standard built-in shader

Kronnect

  • Administrator
  • Hero Member
  • *****
  • Posts: 6345
    • View Profile
Re: Snow on moving objects
« Reply #3 on: October 26, 2020, 01:52:46 PM »
Ok, please send me a pm with your invoice number to get access to the beta board.

Kronnect

  • Administrator
  • Hero Member
  • *****
  • Posts: 6345
    • View Profile
Re: Snow on moving objects
« Reply #4 on: October 26, 2020, 11:38:19 PM »
Hi, I've updated the snow shader included in Global Snow for moving objects as well as the documentation (please check page 12).
You should update to latest version from the beta board as it includes minor improvements.

Andenybe

  • Newbie
  • *
  • Posts: 1
    • View Profile
Re: Snow on moving objects
« Reply #5 on: November 15, 2020, 04:28:17 PM »
I'm using Global snow with deferred rendering and I'm trying to set it up on a character and its gear.

1) The Moving Object Snow shader, when I use it the normal map for the specific mesh disappears and the snow texture itself gets stretched and ugly (see attached).

2) The character in question has various hair and fur meshes with materials that uses transparent shaders, is there any way to get it working for those meshes? Using the cutout mode I get somewhat the result I seek, but fur/hair doesn't look as nice then as with transparent rendering modes.

3) Is there a simple way to add accumulation time, i.e to have snow build up over time? I didn't see any mention of this in the documentation

4) Is there a way to make the snow appear and transition more naturally on animated characters that twist and turn? For example it makes sense for a standing character to built up snow on shoulders and head, but when he rolls or lifts his arms the snow shouldn't just instantly appear at 100% on whichever area is facing up during the animation.

Thanks for your time :)
« Last Edit: November 15, 2020, 04:40:47 PM by Andenybe »

Kronnect

  • Administrator
  • Hero Member
  • *****
  • Posts: 6345
    • View Profile
Re: Snow on moving objects
« Reply #6 on: November 16, 2020, 12:39:05 PM »
Hi,

In deferred, Global Snow works with gbuffers so every shader compatible with deferred (ie. not transparent shaders) will receive snow.
So for moving objects & characters, Global Snow offers you a few exclusion options - layer or GlobalSnowIgnoreCoverage script that you can attach to the character.
Once you exclude your character or moving object, now it's time to use a custom shader that supports snow on the character/object.

The moving object snow shader provided by Global Snow can't handle all kind of materials. Ideally you should be able to tweak it or duplicate it and adapt to other kind of effects or submeshes.
In any case I'll gladly help you creating those variations or fixing the issue with the default moving object snow shader. But I'll need a repro scene to work on it - you could just add the character in an empty scene and send it to me by pm.