Page 1 of 1

Convert normal map to world space

PostPosted: Tue Oct 02, 2018 5:31 am
by Ro0b
Hello there,

I'm playing around with amplify shader to achieve some effect. I saw a similar effect on a shader example from unreal.
They use "Transform Vector -> Tangent Space to World Space" and I couldn't repsoduce it somehow o.0

I already tried to multiply the normal map by an inversed world to tangent matrix. But that didn't work.
In Unreal, the normal map is just pluggied in the convert node "tangent to world space".

Thanks for any help.

Rob

Re: Convert normal map to world space

PostPosted: Wed Oct 03, 2018 10:44 am
by Ricardo Teixeira
Ro0b wrote:Hello there,

I'm playing around with amplify shader to achieve some effect. I saw a similar effect on a shader example from unreal.
They use "Transform Vector -> Tangent Space to World Space" and I couldn't repsoduce it somehow o.0
I already tried to multiply the normal map by an inversed world to tangent matrix. But that didn't work.
In Unreal, the normal map is just pluggied in the convert node "tangent to world space".

Thanks for any help.

Rob


Hello Rob,

We've introduced the Transform Position and Transform Direction in build v1.5.3 dev 04, a while back, please make sure you're using the latest version which is currently available through our website, as new builds usually take a while longer to be approved in the Asset Store.

However, I don't think you can currently use World Space normals with the Standard Unity shaders, World Space normal support should be available via the HD Pipeline soon.

Let me know, I would be happy to elaborate.

Thanks!

Re: Convert normal map to world space

PostPosted: Wed Oct 03, 2018 1:44 pm
by Ro0b
Hello,
thanks for the reply. I'm pretty sure I'm using the latest version. Yes, they are Transform Position and Direction.
But only from object, world or view space. I need to convert a normal texture from tangent space to world space =)
Just the texture information inside the shader editor. Maybe plugging the normal texture into the "World Normal" node already does what I need and I did something wrong elsewhere. I'm still figuring it out^^

Re: Convert normal map to world space

PostPosted: Wed Oct 03, 2018 2:48 pm
by Ricardo Teixeira
Ro0b wrote:Hello,
thanks for the reply. I'm pretty sure I'm using the latest version. Yes, they are Transform Position and Direction.
But only from object, world or view space. I need to convert a normal texture from tangent space to world space =)
Just the texture information inside the shader editor. Maybe plugging the normal texture into the "World Normal" node already does what I need and I did something wrong elsewhere. I'm still figuring it out^^


I'm afraid you cannot use World Space normal textures with the available shader types.

You should be able with the HD Shader Type when we add that specific option on our side.

Apologies for the inconvenience.

Re: Convert normal map to world space

PostPosted: Wed Oct 03, 2018 3:28 pm
by Ro0b
Hm, I see. Thanks for the info. I will implement this later then or find a workaround to achieve the same effect without world normals.

Re: Convert normal map to world space

PostPosted: Wed Oct 03, 2018 3:32 pm
by Ricardo Teixeira
Ro0b wrote:Hm, I see. Thanks for the info. I will implement this later then or find a workaround to achieve the same effect without world normals.


No problem!

Be sure to visit our wiki for additional information on how to create your own Shader Templates.

Thanks!

Re: Convert normal map to world space

PostPosted: Wed Oct 03, 2018 4:49 pm
by Ro0b
Heh, already kinda fixed my issue by using the head bones (transform.forward*-1) instead trying to get the information from the tangent of a normal map. :D
Now my eye refraction works. Maybe I add the normalmap details direct into the eye geometry.
And thanks for the link. Really like this tool. Already setup a nice toon character with stylized anisotrophic hair reflections, based on the official outline examples.

Re: Convert normal map to world space

PostPosted: Wed Oct 03, 2018 5:04 pm
by Ricardo Teixeira
Ro0b wrote:Heh, already kinda fixed my issue by using the head bones (transform.forward*-1) instead trying to get the information from the tangent of a normal map. :D
Now my eye refraction works. Maybe I add the normalmap details direct into the eye geometry.
And thanks for the link. Really like this tool. Already setup a nice toon character with stylized anisotrophic hair reflections, based on the official outline examples.


Awesome, glad to know you found a workaround ;)

Looking forward to see what you create!

Re: Convert normal map to world space

PostPosted: Wed Oct 03, 2018 7:47 pm
by Ro0b
Well, I need to finish the base character cloth before. But I will reply with some screens or maybe a vid once that's done.
:)

Re: Convert normal map to world space

PostPosted: Wed Oct 03, 2018 8:37 pm
by Ricardo Teixeira
Ro0b wrote:Well, I need to finish the base character cloth before. But I will reply with some screens or maybe a vid once that's done.
:)


Looking forward to it, we're always on the lookout for cool projects to promote!