Starting point for understand shaders and their fundamentals

Hey all,

Coming from polycount and I’ve been toying around with the idea of being a technical artist. I enjoyed coding until our professor made us do math problems in coding and I didnt really enjoy math. Recently figuring out UDK and making shaders and all in there was cool and I became engrossed in it. I have been trying to figure out where is a good starting point to learn the fundamentals behind shaders. I know there’s HLSL for 3dsmax and maya. Im planning on picking up the HLSL series from cg-academy as the previews were actually pretty good. Was wondering if anyone could give some thoughts about some things I want some further clarification/input on.

  1. I’m planning on grabbing tutorials to learn python/C# but would it be better to learn C++. Also do I need to know indepth knowledge of programming?

EDIT: scratch that. Went through 8 pages of threads and python kept showing up along with C#. So will do that.

  1. If I know the basics of how shaders work, is it easy to port the knowledge to say UDK. Cause I always saw the materials in UDK and if I followed a tutorial I would understand what that node was doing but if someone said hey you make this…I would not know where to start. Would Chris Holden’s dvd’s help me or will this be more of researching the documentation.

  2. I’ve been researching a lot of what it takes to become a TA. Tech-artists.org has been an amazing resource for figuring out how convulted the description of TA has become But almost each position asked for scripting knowledge and instead of asking which is better, which will help me understand the core concepts. Also any good spots to learn the languages would be awesome.

EDIT: answered with python/mel/max etc. I’ve been seeing tonnes of tutorials for max but I come from maya so are there any good maya sites Shame cgacademy has maxscript only :frowning:

This post is almost a carbon copy except for what I learnt from the time I posted on polycount till now. Spent worktime researching XD…

Hope to get some good feedback as always from polycount

Edit: Found this book, time to visit the library: http://www.amazon.com/Shaders-Programmers-Artists-Premier-Development/dp/1592000924/

I’ve just went through learning how to author shaders recently… so a lot of this is fresh in my mind and I might be able to help a little.

It really seems like all you need is basic programming knowledge… almost all of it is math… But in a lot of cases people have already written shaders that you can learn from for almost any problem…

A really helpful tool for me has been ShaderFX … I know you prefer maya… but this tool can save out to CGFX for Maya, too. I haven’t actually tried doing that, though :stuck_out_tongue:
You can download and use it for free, but if you use it enough those guys definitely deserve a purchase. It’s a tool to work with as well as learn from.

Also, you may have seen some people here recommend a shader training DVDs “HLSL Shader Creation”:
Part 1
Part 2

It’s by the same guy that made ShaderFX, Ben Cloward. I bought that a bit ago and it was pretty damn helpful… It does cover pretty much the basics (which you might already know)… but still it really helped fill in some gaps for me.

I really don’t know, sorry. I haven’t messed with Unreal nearly enough :frowning:

The definition of a tech-artist varies between studios. I view tech-artist as general title, like “artist”… Where an artist could be used to describe various roles that are vastly different… Character artist, Texture artist, Animator, Environment artist, etc… In the same way, I’d break tech-artist title down to these major roles:
Pipeline management
Tools Developer
Rigger
VFX (Shaders/Particles)

A tech-artist might fill 1 or 2 of those roles… or even all of them. The most similar attribute between all of them is they all require the person to act as a liaison between code and art… Where they are helping bridge the gap to get the art in game.

That’s pretty much all I got atm… I hope that helps!

[QUOTE=haiddasalami;6751]EDIT: answered with python/mel/max etc. I’ve been seeing tonnes of tutorials for max but I come from maya so are there any good maya sites Shame cgacademy has maxscript only :frowning:
[/QUOTE]
Gnomon has a really good MEL kit with 3 DVD (it’s actually 4 as the first one is a double). I got this when I was in school, it was expensive for a student but it was worth it.

Digital Tutors has some different MEL and Python in Maya tutorials. Most are pretty basic as they all start at beginner level from what I remember.

These sites are the biggest when it comes to Maya tutorials in general.

Thanks for the awesome replies

@MostlyToad: Yeah someone on polycount pointed out ShaderFX and definitely will grab that as it’s really close to what UDK has (if not the same with UDK being able to put custom code in)

@Wolfsong: thanks for the direction regarding maya will grab those today or tommorow.

My plan of attack is to take it slow and just work on random/fun scripts that improve my workflow. Also I plan to bug my friends/classmates if they have anything that bugs them. Would give me an incentive to fix their problem :slight_smile:

EDIT: Found my first problem. To export to unreal you have to center the pivot(depending on the object so maybe different options = different positions for pivots) and move to 0,0,0. So that would probably be my first script and probably break it down into chunks…now if only those dvds would arrive faster XD

while there’s nothing regarding shaders, those 2 links are invaluable source of information regarding learning how to do stuff with maya:

http://mayamel.tiddlyspot.com/
http://pythonwiki.tiddlyspot.com/

I can’t stress how useful they both were to me when I started to look into learning mel and scripting for maya.

also, the posts about Python from Ryan Trowbridge’s blog are a very insightful look into more deeper concepts about maya and python.

What’s cool is that it sounds like by by editing and hacking existing shaders/scripts, you’re already on your way down this path:):.

That’s how I started as well. And the next step for me was to really drill into understanding how the shaders that I found most useful works.This book deserves all the recommendation that’s sent it’s way :

http://www.amazon.com/Shaders-Programmers-Artists-Premier-Development/dp/1592000924

I especially admire how the author takes a heuristic approach that also accounts for how human vision perceive light. The example I have in mind is the section on the grayscale shader: In addition to just linearly averaging the individual rgb channels to desaturate, he describes an option to weight that desaturation based on our sensitivity to green>>red>>blue.

The only gap I recall wishing the book covered more thoroughly is visual debugging; printing to screen your model’s normals, binormals, uvs…etc. Once I learned to debug, 90% of the rest of the journey was googling any language syntax, and matrix/vector concepts that I didn’t grasp and internalizing them.

Shaders are an excellent starting point to building technical chops; it’s an environment where one can produce an extraordinary variety of effects from a fairly small number of ingredients. It’s a lot like cooking:|:.

Ingredients : Vertex data (position, normal, uv)
Texture data (color, bump, depth, rendertargets…etc)
Cooking : Preparation and Heating (xform and lighting calculations)
Presentation : Image filtering(blurring, blending, and color correction)

In fact, I think the only thing that shaders don’t teach, that you’ll use on a day to day basis when coding is regular expression/text filtering/manipulation. Thankfully picking that up is relatively less taxing:laugh:.

Here’s wishing you luck, and that you’ll enjoy the trip!

-Mike

Woah thanks for the awesome writeup MTON and advice from greuh. I actually looked at that book and will probably order this month. Was busy with Canada day XD On the side I do some compositing and FXPHD has an awesome course regarding the math (already registered for the term so dropped a course I sorta didnt need and grabbed that :)) So much knowledge on the internet. Im probably gonna work my way through the Laurent book then move up to the Engel ones and those GPU gems. Will show some stuff when I get to a decent grasp of the stuff :slight_smile:

I’m not too sure how the industry is right now, but I know writing shaders is practically all math. Sure there is the aesthetic of the shader, but unless your strictly using a node system, math is all your going to be doing. I would suggest this book

http://http.developer.nvidia.com/CgTutorial/cg_tutorial_chapter01.html

which you can read for free online (at the link) or buy on amazon for like 15 bucks. It’s going to be almost all math, with no explanation of node based shaders. It begins talking about graphics pipeline, then moves into simple shaders. It’s not great for beginners, because it assumes a certiant amount of knowledge, but you might still want to check it out.

ShaderFX is a sweet place to start.

[QUOTE=UncCheezy;6837]I’m not too sure how the industry is right now, but I know writing shaders is practically all math. Sure there is the aesthetic of the shader, but unless your strictly using a node system, math is all your going to be doing. I would suggest this book

http://http.developer.nvidia.com/CgTutorial/cg_tutorial_chapter01.html

which you can read for free online (at the link) or buy on amazon for like 15 bucks. It’s going to be almost all math, with no explanation of node based shaders. It begins talking about graphics pipeline, then moves into simple shaders. It’s not great for beginners, because it assumes a certiant amount of knowledge, but you might still want to check it out.

ShaderFX is a sweet place to start.[/QUOTE]

Been going through Ben’s dvd’s and man do they help a tonne. I was able to look at those example shaders and understand what he was doing. I definitely need to brush up on vectors and matrices so been checking some of the books at my library. I tried reading through that book but I hate ebooks so gonna get my a copy :slight_smile:

regarding matrices and vectors, I can’t recall where I saw it recommended the first time (maybe here actually?) but this dvd is supposed to be really awesome at it: https://www.cg-academy.net/es_catalog/product_info.php?products_id=48

I might add a free source that starts REALLY simple…

just scroll down and find the trig or matrices section

Hey thanks for the recommendation. Will check it out. Planning on getting a shader running in maya. Work keeps interfering :frowning:

[QUOTE=UncCheezy;6854]I might add a free source that starts REALLY simple…

just scroll down and find the trig or matrices section[/QUOTE]

nice…will check it out. Been learning mel on the side. So much info…