x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

A shader function that can tell flatness?

http://img2.meristation.com/files/imagenes/juegos/pc/action/torchlight_ii/1.jpg

I really like the look of the stones in torchlight. Low poly but the textures are light at the edges of the stone and darker where it is flatter. Makes things look "worn".

I am wondering if there is a function that I could use that could determine how "flat" the area I am currently using is. If I had total freedom I would think of getting the dot product of the normal at the very point I was calculating plus another point that was very close (actually a few points around and taking the mean of them or something) and that would give me a value that would give an idea of whether or not the point I am calculating is generally flat or near an edge, and use that to lerp between bright and dark as necessary. I can imagine this kind of thing would be easy in a normal blueprint but I don't seem to find that same kind of functionality in the material blueprints

Any leads would be appreciated

Product Version: Not Selected
Tags:
more ▼

asked Aug 24 '14 at 09:39 AM in Rendering

avatar image

rodstone
76 11 16 90

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

In theory this is doable, I know that rendering software has those tricks. However, real-time creating that in a way that looks good and affordable by hardware is hard, plus not a thing that is shader only, you would probably need some extra data calculated on the cpu and pass it on to the shader. Or maybe some form of post processing.

However, the guys that made Torchlight just have really good artist that hand painted the whole thing. There is not much going on in the shader.

If you do want info in the shader like that, you might want to go for some cheap solution, like painting it in the vertex colors.

more ▼

answered Aug 24 '14 at 10:56 AM

avatar image

Roel
2.4k 70 43 142

avatar image rodstone Aug 24 '14 at 07:44 PM

Thanks for that. I'll have to look up vertex points regarding shadet. so fat I have completely managed to avoid uv unwrapping and baking and paint and all those things and wanted to carry on that procedure

is there a function for shiftin the uv a smal bit? like what panner does but not constantly moving?

avatar image Roel Aug 24 '14 at 08:45 PM

Well, the function is just adding a value to the texture coordinate node. Panner is basically adding a value ever x amount of time. Adding a value of 0.5 to your uv's will make sure they are shifted by half of the uv size. adding 1 would mean there are exactly "the same" again because you shifted them the size of the uv's.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question