Amplifying your potential.

Odd behaviour with objects of differing scale.

Your feedback is very important to us. We are listening.
12 posts • Page 1 of 21, 2

Odd behaviour with objects of differing scale.

Postby funselektor » Wed May 16, 2018 11:44 am

Hey!

Relatively new to Amplify shader, but it's been very useful and powerful so far!

Been running into a strange issue where the scale of objects leads to different behaviour of the shader on Unity 2018.1.0f1 on Windows 10.

Here's an example with my triplanar shader (and I'm aware of the Amplify Triplanar sample, but I need more control over the falloff so I'm making this!)

So the sphere w/ Scale of 1,1,1 acts as expected, but when the scale is increased the effect doesn't work as expected. I tried a bunch of googling but couldn't see an issue, is there some beginner mistake that I'm making?

Image

Image

And here's the triplanar sample for sanity which works as expected (http://wiki.amplify.pt/index.php?title= ... nar_Sample)
Image
funselektor
 
Posts: 5
Joined: Wed May 16, 2018 11:28 am

Re: Odd behaviour with objects of differing scale.

Postby Amplify_Borba » Wed May 16, 2018 5:47 pm

Hey there, thank you for the kind words and support!

Depending on the type of effect you're creating, you could potentially use the Vertex Position node to ensure that the effect that is bound to the object stays exactly the same even if it changes position, rotation or size.

I would also recommend examining the PositionCutOff ( local and world ) and SnowAccum samples, as well as the TriplanarProjection.

Please let me know if this helps, and don't hesitate to let me know if you have any further questions, thanks!
Customer Relations at Amplify Creations
Learn more about our offering: Amplify Creations Products
Amplify Shader Editor won the Asset Store Best Tool Award - Thank you for your support!
User avatar
Amplify_Borba
 
Posts: 734
Joined: Mon Jul 24, 2017 9:50 am

Re: Odd behaviour with objects of differing scale.

Postby funselektor » Fri May 18, 2018 6:16 pm

Amplify_Borba wrote:Hey there, thank you for the kind words and support!

Depending on the type of effect you're creating, you could potentially use the Vertex Position node to ensure that the effect that is bound to the object stays exactly the same even if it changes position, rotation or size.

I would also recommend examining the PositionCutOff ( local and world ) and SnowAccum samples, as well as the TriplanarProjection.

Please let me know if this helps, and don't hesitate to let me know if you have any further questions, thanks!


Thanks for the quick answer!

After checking out those examples it turns out the World Normal node was the one to use.

This shader is for a road and is trying to replicate the Standard Shader with the Transparent or Cutout Rendering Mode but with Triplanar Projection to make the steeper parts of the road darker.

One other thing I'm wondering about is how to make the shader receive shadows? I've tried different combinations of the Blend Mode to no avail.The following screenshot shows a road w/ my shader and the Standard Shader side-by-side and the Standard shader does accept shadows so perhaps my configuration needs to be tuned?
Attachments
shadows.PNG
shadows.PNG (83.93 KiB) Viewed 397 times
funselektor
 
Posts: 5
Joined: Wed May 16, 2018 11:28 am

Re: Odd behaviour with objects of differing scale.

Postby Amplify_Borba » Mon May 21, 2018 10:31 am

Could you send us a simple project with the issue present, so that we can check whether it's an expected result or a potential issue?

Could you also elaborate on why you intend to use triplanar, and if you're going to use it on the rest of your terrain as well?

Feel free to attach it to your reply, or send it over through support@amplify.pt, thanks!
Customer Relations at Amplify Creations
Learn more about our offering: Amplify Creations Products
Amplify Shader Editor won the Asset Store Best Tool Award - Thank you for your support!
User avatar
Amplify_Borba
 
Posts: 734
Joined: Mon Jul 24, 2017 9:50 am

Re: Odd behaviour with objects of differing scale.

Postby funselektor » Mon May 21, 2018 6:57 pm

I just intend to use this triplanar shader on the road so that it's easier to see changes in elevation.

The road is a separate mesh that is on top of the terrain, so the terrain would not be using this shader.

Ok I will email a project over in Unity 2018.1.0f2, just making it now!
funselektor
 
Posts: 5
Joined: Wed May 16, 2018 11:28 am

Re: Odd behaviour with objects of differing scale.

Postby Amplify_Borba » Tue May 22, 2018 10:42 am

Thank you for sending the sample, I've noticed that you have the Blend mode set to Transparent, which is working as expected since transparent surfaces have no concept of depth, making them unable to cast or receive shadows.

There are a couple of workarounds which you could try, I suggest setting the Blend mode to Masked or Custom, and experiment with different Render Type and Queue settings in order to enable the required ports on the Output node. Making use of Cutout would be ideal for this sort of effect.

Please let me know if you have any further questions.
Customer Relations at Amplify Creations
Learn more about our offering: Amplify Creations Products
Amplify Shader Editor won the Asset Store Best Tool Award - Thank you for your support!
User avatar
Amplify_Borba
 
Posts: 734
Joined: Mon Jul 24, 2017 9:50 am

Re: Odd behaviour with objects of differing scale.

Postby funselektor » Tue May 22, 2018 8:51 pm

Thanks so much for the help and suggestions, Cutout & Alpha Test w/ an Opacity Mask did the trick!
funselektor
 
Posts: 5
Joined: Wed May 16, 2018 11:28 am

Re: Odd behaviour with objects of differing scale.

Postby Amplify_Borba » Wed May 23, 2018 9:05 am

No problem, glad I could help!

Have you had the chance to rate and review Amplify Shader Editor? It would be awesome if you could share your experience with the Unity community, the Unity Asset Store thrives on user interaction and direct feedback.
Every bit helps, your feedback is extremely valuable to us!

Feel free to get back in touch if you have further issues or questions, thanks!
Customer Relations at Amplify Creations
Learn more about our offering: Amplify Creations Products
Amplify Shader Editor won the Asset Store Best Tool Award - Thank you for your support!
User avatar
Amplify_Borba
 
Posts: 734
Joined: Mon Jul 24, 2017 9:50 am

Re: Odd behaviour with objects of differing scale.

Postby funselektor » Wed May 23, 2018 4:50 pm

Yep left a nice rating through the unity editor already. Moved over from Shader Forge and will definitely recommend Amplify to everyone I know!
funselektor
 
Posts: 5
Joined: Wed May 16, 2018 11:28 am

Re: Odd behaviour with objects of differing scale.

Postby Amplify_Borba » Wed May 23, 2018 5:20 pm

Thank you for your support and for taking the time to review ASE, it truly means alot to us!

Don't hesitate to get back in touch if you come across any further questions or issues, we're looking forward to see what you create with ASE, thanks!
Customer Relations at Amplify Creations
Learn more about our offering: Amplify Creations Products
Amplify Shader Editor won the Asset Store Best Tool Award - Thank you for your support!
User avatar
Amplify_Borba
 
Posts: 734
Joined: Mon Jul 24, 2017 9:50 am

Next

12 posts • Page 1 of 21, 2

Return to General Discussion

Who is online

Users browsing this forum: No registered users and 1 guest