[Topic] || Unreal Shaders ||

23 replies [Last post]
JBaldwin's picture
Posts: 2162

Hey everyone! I just wanted to make this thread for any questions regarding Unreal Shaders! Feel free to post any questions you might have and I will get back with you asap Laughing out loud

-Jeremy- 

JBaldwin's picture
Posts: 2162

To get things started, I have seen a few requests on how to begin building a nice concrete shader. The example below would be a decent starter material for an asset. I personally like to build floors, ground, ceilings, etc all using world space coordinates. In the images below, I simply leave the UV coordinates alone to represent a preset texture that won't tile. Hope this helps Smiling

-Jeremy- 

simpleconcreteshader.jpg simpleconcreteresult.jpg
JBaldwin's picture
Posts: 2162

Here is an update for adding real time reflection if you are using DX9. (I also added a simple distortion function).

-Jeremy-

simpleconcreteshader_reflectiondx9.jpg simpleconcreteshader_reflectiondx9close.jpg simpleconcrete_reflect.jpg simpleconcrete_reflectdistort.jpg
your0wnskills's picture
Posts: 158

Hey Jeremy on the specular, do you usually just use the diffuse for concrete? Or do you ever take the diffuse and do level adjustments on it?

 

JBaldwin's picture
Posts: 2162

Normally I would do a lot to create a specular map. But for quick demos I normally just use the diffuse.

-Jeremy-

your0wnskills's picture
Posts: 158

On the specular section I cant make out whats what. Anyway you can take a close up shot on that. I want to try that set up.

JBaldwin's picture
Posts: 2162

Here is the spec. Pretty simple.

-Jeremy-

simpleconcrete_spec.jpg
Loard_roy's picture

Hey jeremy, nice looking shader, but i dont quite understand how the realtime reflection part works, could you please explain it a little bit please?

Thanks!

Loard_roy's picture

hi ceribral

i am an environment artist.
i very like work with materials and creating materials.but i can not...
i want to create on my assets good materials but my materials be weak and bad!
i think that a good environment artist is a good material creator.
please help me in shader creating.and say me Tips and considerations.(Dos and Don'ts)
thanks

JBaldwin's picture
Posts: 2162

Sure Smiling I will hop on in the morning and get the breakdown to you Loard! I am at work at the moment.

@XEnvironmentArtist - No worries! I would love to do what I can to help. Can you post up the model(s) you are working on?

-Jeremy-

JBaldwin's picture
Posts: 2162

Here you go sir!
It's called a Scene Capture 2D Texture:

Here is the process:

1. Right Click in the content browser and select the option in Image 1

2. Set the settings of the new texture (Resolution) to anything between 64x64 - 512x512

3. Make a texture sample in your material like in image 3 and use the previous pictures to see how to add it to the node tree.

Hope this helps Laughing out loud

-Jeremy- 

simpleconcrete_reftexture01.jpg simpleconcrete_reftexture02.jpg simpleconcrete_reftexture03.jpg
JBaldwin's picture
Posts: 2162

For an in-depth tutorial on how to do this, you can refer to the Unreal Documentation HERE:
 https://udn.epicgames.com/Three/DevelopmentKitGemsCreatingDistortedReflection.html

-Jeremy-

your0wnskills's picture
Posts: 158

Hey 

JBaldwin's picture
Posts: 2162

Yes sir?

-Jeremy-

your0wnskills's picture
Posts: 158

I had a question but took it down because I found the answer but didnt know how to delete the post ha. sorry

JBaldwin's picture
Posts: 2162

Ah no worries Smiling If you ever have questions just post them! Even if you found the answer, some other people might be interested as well.

-Jeremy-

your0wnskills's picture
Posts: 158

Ok , well the question was about making fog cloudy like in this scene....I really like the atmosphere, I found a good material set up by checking this link out...using a cloud texture that repeated and then attached it to a plane model that I exported from max and then within the udk material having the image pan upward..... http://www.hourences.com/tutorials-ue3-fog/

I got it looking ok but then I decided against it because I had someone look at the reference and go,,, well why is the fog there? looks like radiation or something..I never really thought about why it looked that way, I just liked the feel, even though my scene is apocalyptic, I don't envision the people within the scene wearing radiation mask..

in_a_shadow_of_the_cyberpunk__01_by_darkenter-d5i92m1.jpg
JBaldwin's picture
Posts: 2162

That is awesome concept art! Really inspiring.

Yea... That is weird, radiation is the last thing on my mind when I see fog. This honestly just felt like a humid arid environment. Like a futuristic city street with thick steam from industry filling the air on a wet night. 

This just feels like normal neopunk. I would recommend experimenting with a thick atmo like this. Trust me, I honestly don't think anyone would feel "radiation", well... accept whoever you showed it to Sticking out tongue

That is just me though.

I will see about putting a little something together over the next day or 2 for you and maybe you can experiment with it.

-Jeremy- 

your0wnskills's picture
Posts: 158

thanks....also I was using planes t o show it off within the level but the problem is where one plane would end and the other would begin, you can see the edge...is the solution to just create an octagon model and have the material applied to that with one smooth group?

JBaldwin's picture
Posts: 2162

No, the solution is Transparency Priority, and Pixel Rendering. I will make sure to include that in my small tutorial I post up for you.

-Jeremy- 

your0wnskills's picture
Posts: 158

sweet looking forward to it

 

JBaldwin's picture
Posts: 2162

Decided to create a few small shaders for you guys tonight Smiling
Don't forget to post questions about anything shader related.

-Jeremy- 

mat_objectstaticfx.jpg mat_ripplesimplefx.jpg
gaspode2's picture
Posts: 1

Hi JBaldwin

 I have a question to you what is the best way to learn such things? I have seen few books and tutorials that show how to create simple materials and nothing more. I guess that most of materials in games are created with use of very simple expressions but finding right network is like a black magic. :(  I would like to thank you for these very nice shaders  examples. I have some materials to study now. Smiling If you will continiue your posting here could you please show few examples of natural materials like skin, eye, lashes?

 

 

 

JBaldwin's picture
Posts: 2162

Hey Raptor Smiling

Is there any issue with performance when using vertex paint, i know that adding couple control vertices to models like walls are necessary but i think that performance impact are minimal or im i wrong

Let me quote a statement made out of the help doc:
"Vertex shader instruction counts are generally less of a performance concern than pixel instruction counts, due to the number of vertices on a model compared to the number of pixels on the screen."

 Saying that, performance still can become an issue if you don't manage it properly. 

Is better to use vertex paint or just two different texture on separate chanel for like inner and outer wall of the building 

This really depends on the situation. For example: Let's say you have a hero piece (Mesh that is a focal point) For this example, I will use a Vault Door. Because this mesh meets certain requirements: (Level of importance, silhouette type, uniqueness) - it would be ok to prepare it for vertex painting. Since it is a unique object, you can get away with making it a higher resolution (More Vertices), and there won't be a dramatic performance hit. However, if you had a generic mesh like "A wall" that is duplicated all over the place, then some steps may need to be taken to reduce the performance hit. (Like LOD's). 

The choice of using Vertex Paint or Textures also is dependent upon the situation. Many times, large surfaces can be broken up using (Small to Large) blending methods.
You could create an STL (Small to Large) surface using only 1 texture and never see repeating patterns.  It has to be done right though.
For example: If you took a tileable rock texture and:

  • Created a version that tiled 2x2 and set it's X rotation to 90 then
  • Duplicated the same texture sample and tiled it 5x5 and set it's rotation to -180 then
  • Duplicated the same texture sample and tiled it 8x8 and set it's rotation to 0

And blended between them using matching resolution masks, it would be enough variation to have a good base for something as large as terrain.
** Note - The resolution increments are dependent on the FOV of the camera. If the increments are too small, patterns could become visible.** 

I personally think a combination of Vertex Painted surfaces and STL surfaces using textures would be ideal. How you balance that is up to you Smiling

is the modular stuff still using in professional work

All the time Smiling


i created this shared for testing purposes but don't know is it functional the goal is to make inner and outer walls of the same material and to add some variations to walls

Can you post a picture of your shader network?

-Jeremy-