How to render in Non Specular OR shadows only?

Node-based Shader Editor

How to render in Non Specular OR shadows only?

Postby GalacticArmada1 » Thu May 03, 2018 6:51 am

I learned alot from this:
Image

but I am wanting to do the opposite. I want to have an emmisve texture appear only on the dark side of an object. Is this possible. I have learned how to make stuff appear on the lit side but i can't figure out how to flip it.

If i could flip the texture so that my effect would appear on the non lit side of the planet that would be what im looking for.

Anyone know of a way to control how a texture is rendered to a non lit side of an object?

Any pointers would be extremely helpful. I've been going at it for hours lol.. learned alot along the way.
GalacticArmada1
 
Posts: 10
Joined: Wed May 02, 2018 6:59 am

Re: How to render in Non Specular OR shadows only?

Postby GalacticArmada1 » Thu May 03, 2018 6:54 am

Image

hmm this might be what im looking for.
GalacticArmada1
 
Posts: 10
Joined: Wed May 02, 2018 6:59 am

Re: How to render in Non Specular OR shadows only?

Postby Amplify_Borba » Thu May 03, 2018 10:47 am

Hey there!

I've replied to your other post regarding a possible solution for the planetary lights effect you wish to create:

viewtopic.php?f=8&t=631&p=2666#p2666

On a sidenote, even though we appreciate the thoughtfulness of creating a new separate post for questions unrelated to a previous post, we'd prefer if you just ask them in one place, thank you for understanding!
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: 1239
Joined: Mon Jul 24, 2017 9:50 am

Re: How to render in Non Specular OR shadows only?

Postby GalacticArmada1 » Thu May 03, 2018 11:47 am

Ok, I figured it out using Dot, World Normal, World Space. Got ti working.

I'm trying to figure out how to do simple edge length tessellation.

I have the model tessellated using edge length tess and a float but i dont know how to hook the height map into so the height map is read into the tessellation and im having a hard time finding any examples anywhere.

Vertex offset seems to have an effect, perhaps i just need to find a way to adjust my heightmap because it's warping the model way to much.
GalacticArmada1
 
Posts: 10
Joined: Wed May 02, 2018 6:59 am

Re: How to render in Non Specular OR shadows only?

Postby Amplify_Borba » Thu May 03, 2018 2:07 pm

For clarification purposes, although you can't specifically dictate where the Tessellation effect takes place, you may control it through a few nodes that we provide for that matter: the Distance-Based Tessellation, Edge-Length Tessellation and Edge-Length Tessellation with Cull nodes.

Do note that our Tessellation technique is limited by what is currently provided by Unity, since we're in fact using their implementation.

Let me know if this information helps, and 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: 1239
Joined: Mon Jul 24, 2017 9:50 am

Re: How to render in Non Specular OR shadows only?

Postby GalacticArmada1 » Thu May 03, 2018 9:48 pm

Yah I got that but what im curious about is the vertex offset what is the proper color scheme for the heighmap. I have tried using a greyscale and alerting it but i cant get the fine details in the height map to show up in the tessellation.

I have a dx11 tessellation shader that works perfectly with the hightmap I'm using which is why im trying to replicate it. What i was wanting to see is an example usage of tessellation using a heightmap to offset the vertex so i can see the color scheme / system used to alter the height of the vertex offset with the heightmap.


Here is my planet shaders, the first shaders I have made. I made the atmosphere and the sufrace shaders, check out the ocean. Not bad for first shaders ever made by a noob?
https://www.youtube.com/watch?v=nLdOMsbWwf8&feature=youtu.be
GalacticArmada1
 
Posts: 10
Joined: Wed May 02, 2018 6:59 am

Re: How to render in Non Specular OR shadows only?

Postby Amplify_Borba » Fri May 04, 2018 3:09 pm

What do you mean by color scheme? You can use any channel that you feed it, internally it's a single grayscale channel.

Could you specify which shader did you use? It might be using a different tessellation technique than the one available in Unity.

On a sidenote, be sure to check the texture size and compression options!
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: 1239
Joined: Mon Jul 24, 2017 9:50 am

Re: How to render in Non Specular OR shadows only?

Postby GalacticArmada1 » Sat May 05, 2018 1:37 am

I got the tessellation to work, just trying to figure out how to get it to work at high resolution where fine details within the heightmap are rendered. Currently it's (working) just not working very well. I have been playing around with the heightmap. For now im skipping it and working on my ocean.

Anyway I have another question not related.

How can I invert an RGBA output. I have been going through the math functions and can't find any straight forward way so far. Say i have a black and white image and i want to invert the colors so that the White becomes black and black white and vise versa. The reason i am wanting to do this is i want to control an emission output where i need to inverse the image to get the proper emission area.

Thanks,
Johnny
GalacticArmada1
 
Posts: 10
Joined: Wed May 02, 2018 6:59 am

Re: How to render in Non Specular OR shadows only?

Postby Amplify_Borba » Mon May 07, 2018 2:34 pm

For inverting values, you could use the One Minus node, which is perfect for manipulating masks as you can see in the example below:

Image

Please let me know if this helps, 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: 1239
Joined: Mon Jul 24, 2017 9:50 am


Return to Amplify Shader Editor

Who is online

Users browsing this forum: No registered users and 33 guests

cron