Guitar Modeling - Part 3

Avatar image for akrid
Akrid

1397

Forum Posts

0

Wiki Points

0

Followers

Reviews: 0

User Lists: 2

Edited By Akrid

This week was a bit of a break for me. I'm in the rendering stage of my guitar project which mainly consists of tweaking for 15 minutes and then waiting an hour or two for it to render out, ad nauseam. It's times like these when I wish I had a little more power under the hood, It's only been a few months since I upgraded to a quad-core but it's already starting to lose it's novelty.


 Just noticed I forgot the fret dots... How in the hell did I miss that?
 Just noticed I forgot the fret dots... How in the hell did I miss that?
I changed the guitar to the "Cognac Burst" style. I own a "Natural", as I found the burst to be rather ostentatious, but I'm none to confident in my ability to pull off the delicate simplicity of my own guitar effectively. Above is my horrendously over-lit render, it's main intention being to bring out the colors as vibrantly as possible.


  Would probably look better with some context as well..
  Would probably look better with some context as well..
In pursuit of a more natural looking lighting scheme, I threw the model into an old medium-sized scene. It certainly produces a fairly natural and realistic result, but that's also the problem. Sometimes, things just aren't pretty in the real world. This is something that I run into all the time when I'm going for photo-realism; I take a look at the finished product and think to myself: Boring. Can't help but try and make it larger than life.

No Caption Provided

I think the main thing letting these renders down are the the textures. Despite my best efforts, these were the best I could find, and for those I couldn't find I had to generate procedurally (Neck, fingerboard, pickguard). In fact, I think the body and the branding textures are the only image based textures I used.

In any case, the prettiest renders are yet to come. In the mean time,

Shaders

The world around us is entirely defined by light. The science behind light is fairly straightforward: Rays are cast from a light source onto a surface. The ray of light changes direction upon striking it, it's course altered according to the attributes of said surface. A shader is simply the container for those attributes. For practicalities sake, these attributes can then be broken down into two groups: Reflective and refractive.

Reflective Properties


 Brought to you by: Some science-y site.
 Brought to you by: Some science-y site.
The law of reflection states that the outgoing angle of a ray is always equal to the incoming angle. This makes perfect sense in the context of a mirror; if you take a laser pointer and aim it at a mirror, the angle will always be perfectly predictable in that it is always the opposite and equal angle. However, all non-transparent surfaces are defined by reflection, not just mirrors. If this law of reflection is true, how does light interact with surfaces that are not perfectly reflective like a mirror?

All reflection based shading is based on the concept of roughness. The reason that a mirror is perfectly reflective is because it's a completely smooth surface. Take a look at an object near to you that is generally not considered "reflective", and feel it. It has, without a doubt, some degree of roughness to it. This provides an inexorable subconscious link in your mind that relates smooth surfaces as reflective and rough surfaces as not. However, this is not true. All non-transparent surfaces are defined by reflection.


No Caption Provided
If you compare a rough surface and a smooth surface at a microscopic level, there is a stark contrast in their profile. Now, if you think of the rays hitting those surfaces, what will happen? The rough surface bounces the light in all sorts of directions, as well as having a good chance of inter-reflecting with itself. This is called a diffuse reflection. Meanwhile on the smooth surface, the light hits the surface and exits at the equal opposite angle in a fairly uniform manner. This is called a specular reflection.

All this is from a purely scientific perspective. Which I explained because I think understanding how light works has helped me better understand how to construct shaders. Let's look at the application of this in regards to CG.

One of the few things that is truly universal among CG programs is that reflectance is always defined by three parameters: Diffuse, specular, and reflection. 

 80%, 40%, 0% diffuse respectively. Diffuse amount ends up being just a brightness modifier for the color. 0% here shows the complete absence of reflections.
 80%, 40%, 0% diffuse respectively. Diffuse amount ends up being just a brightness modifier for the color. 0% here shows the complete absence of reflections.
Diffuse can be largely considered the actual color of the object; if I wanted to apply a wood texture to something, I would put the texture in the diffuse input. An example of a purely diffuse surface would be drywall, or pretty much anything that's soft.


 40/40, 30/40, 40/90 (Specular amount/roughness)
 40/40, 30/40, 40/90 (Specular amount/roughness)

Specular(ity) is essentially the "Highlight" of the object. Look around and you will see that almost all objects have a particular shine where the light hits hardest, but this couldn't be considered a reflection in the traditional sense of the word. I think the cause of this has something to do with the way a surface absorbs and releases light energy, though that's purely an observation. Also note that on a smoother object the highlight becomes more pronounced and "Sharp", while on rough surfaces the energy is dispersed over a larger area and as a result is not as strong. This effect is controlled by an independent parameter called either roughness or glossiness depending on who you ask.

No Caption Provided
Reflection does exactly what it says on the tin: reflect light rays. Another important part of mirror-like reflections is a phenomenon referred to as fresnel. Simply put, this modulates the reflectivity of an object depending on the viewing angle. The best example of this would be a still lake. When looking out across the lake, the water provides an almost perfect reflection, but when you look down at your feet you can see fairly clearly through the water. Another example of fresnel would be a slab of marble. Reflection has it's own roughness as well, changing it causes blurrier reflections.

Some very basic shaders. Bottom middle is an example of reflections with roughness.
Some very basic shaders. Bottom middle is an example of reflections with roughness.
The combination of these three base parameters and their interaction with each other allow for nearly infinite shading variations. Combined with texturing and other techniques, you can make just about anything. This method of reflection shading is referred to as BRDF, or bidirectional reflectance distribution function, A name that always reminds me that something must be going on that's more complicated then these three parameters. 

 Modo 501's (The program I use) shader editor. Any parameters that went unmentioned are probably not important... Probably.
 Modo 501's (The program I use) shader editor. Any parameters that went unmentioned are probably not important... Probably.

The significant deviation from true science in this method is that a choice was made to separate specular reflections and just *plain* reflections into two separate parameters, when in reality they are supposed to be one and the same. This leads to some artists insisting that specularity is not a real-world phenomenon and attempt to boycott it, trying to substitute it with reflections with roughness applied.

And of course, the other fallacy is that a rendering engine is never really sending out millions of light rays and bouncing them off a microscopic surface to determine how it diffuses. It's always a predetermined outcome, the entire shading system is based upon fakery of known quantities.

If you're reading this, thanks for reading this! I hope it wasn't boring. I'll go into refraction at some other point in time, this blog is long enough as it is.

Any sort of feedback would be appreciated, though there is admittedly very little to comment on...
Avatar image for akrid
Akrid

1397

Forum Posts

0

Wiki Points

0

Followers

Reviews: 0

User Lists: 2

#1  Edited By Akrid

This week was a bit of a break for me. I'm in the rendering stage of my guitar project which mainly consists of tweaking for 15 minutes and then waiting an hour or two for it to render out, ad nauseam. It's times like these when I wish I had a little more power under the hood, It's only been a few months since I upgraded to a quad-core but it's already starting to lose it's novelty.


 Just noticed I forgot the fret dots... How in the hell did I miss that?
 Just noticed I forgot the fret dots... How in the hell did I miss that?
I changed the guitar to the "Cognac Burst" style. I own a "Natural", as I found the burst to be rather ostentatious, but I'm none to confident in my ability to pull off the delicate simplicity of my own guitar effectively. Above is my horrendously over-lit render, it's main intention being to bring out the colors as vibrantly as possible.


  Would probably look better with some context as well..
  Would probably look better with some context as well..
In pursuit of a more natural looking lighting scheme, I threw the model into an old medium-sized scene. It certainly produces a fairly natural and realistic result, but that's also the problem. Sometimes, things just aren't pretty in the real world. This is something that I run into all the time when I'm going for photo-realism; I take a look at the finished product and think to myself: Boring. Can't help but try and make it larger than life.

No Caption Provided

I think the main thing letting these renders down are the the textures. Despite my best efforts, these were the best I could find, and for those I couldn't find I had to generate procedurally (Neck, fingerboard, pickguard). In fact, I think the body and the branding textures are the only image based textures I used.

In any case, the prettiest renders are yet to come. In the mean time,

Shaders

The world around us is entirely defined by light. The science behind light is fairly straightforward: Rays are cast from a light source onto a surface. The ray of light changes direction upon striking it, it's course altered according to the attributes of said surface. A shader is simply the container for those attributes. For practicalities sake, these attributes can then be broken down into two groups: Reflective and refractive.

Reflective Properties


 Brought to you by: Some science-y site.
 Brought to you by: Some science-y site.
The law of reflection states that the outgoing angle of a ray is always equal to the incoming angle. This makes perfect sense in the context of a mirror; if you take a laser pointer and aim it at a mirror, the angle will always be perfectly predictable in that it is always the opposite and equal angle. However, all non-transparent surfaces are defined by reflection, not just mirrors. If this law of reflection is true, how does light interact with surfaces that are not perfectly reflective like a mirror?

All reflection based shading is based on the concept of roughness. The reason that a mirror is perfectly reflective is because it's a completely smooth surface. Take a look at an object near to you that is generally not considered "reflective", and feel it. It has, without a doubt, some degree of roughness to it. This provides an inexorable subconscious link in your mind that relates smooth surfaces as reflective and rough surfaces as not. However, this is not true. All non-transparent surfaces are defined by reflection.


No Caption Provided
If you compare a rough surface and a smooth surface at a microscopic level, there is a stark contrast in their profile. Now, if you think of the rays hitting those surfaces, what will happen? The rough surface bounces the light in all sorts of directions, as well as having a good chance of inter-reflecting with itself. This is called a diffuse reflection. Meanwhile on the smooth surface, the light hits the surface and exits at the equal opposite angle in a fairly uniform manner. This is called a specular reflection.

All this is from a purely scientific perspective. Which I explained because I think understanding how light works has helped me better understand how to construct shaders. Let's look at the application of this in regards to CG.

One of the few things that is truly universal among CG programs is that reflectance is always defined by three parameters: Diffuse, specular, and reflection. 

 80%, 40%, 0% diffuse respectively. Diffuse amount ends up being just a brightness modifier for the color. 0% here shows the complete absence of reflections.
 80%, 40%, 0% diffuse respectively. Diffuse amount ends up being just a brightness modifier for the color. 0% here shows the complete absence of reflections.
Diffuse can be largely considered the actual color of the object; if I wanted to apply a wood texture to something, I would put the texture in the diffuse input. An example of a purely diffuse surface would be drywall, or pretty much anything that's soft.


 40/40, 30/40, 40/90 (Specular amount/roughness)
 40/40, 30/40, 40/90 (Specular amount/roughness)

Specular(ity) is essentially the "Highlight" of the object. Look around and you will see that almost all objects have a particular shine where the light hits hardest, but this couldn't be considered a reflection in the traditional sense of the word. I think the cause of this has something to do with the way a surface absorbs and releases light energy, though that's purely an observation. Also note that on a smoother object the highlight becomes more pronounced and "Sharp", while on rough surfaces the energy is dispersed over a larger area and as a result is not as strong. This effect is controlled by an independent parameter called either roughness or glossiness depending on who you ask.

No Caption Provided
Reflection does exactly what it says on the tin: reflect light rays. Another important part of mirror-like reflections is a phenomenon referred to as fresnel. Simply put, this modulates the reflectivity of an object depending on the viewing angle. The best example of this would be a still lake. When looking out across the lake, the water provides an almost perfect reflection, but when you look down at your feet you can see fairly clearly through the water. Another example of fresnel would be a slab of marble. Reflection has it's own roughness as well, changing it causes blurrier reflections.

Some very basic shaders. Bottom middle is an example of reflections with roughness.
Some very basic shaders. Bottom middle is an example of reflections with roughness.
The combination of these three base parameters and their interaction with each other allow for nearly infinite shading variations. Combined with texturing and other techniques, you can make just about anything. This method of reflection shading is referred to as BRDF, or bidirectional reflectance distribution function, A name that always reminds me that something must be going on that's more complicated then these three parameters. 

 Modo 501's (The program I use) shader editor. Any parameters that went unmentioned are probably not important... Probably.
 Modo 501's (The program I use) shader editor. Any parameters that went unmentioned are probably not important... Probably.

The significant deviation from true science in this method is that a choice was made to separate specular reflections and just *plain* reflections into two separate parameters, when in reality they are supposed to be one and the same. This leads to some artists insisting that specularity is not a real-world phenomenon and attempt to boycott it, trying to substitute it with reflections with roughness applied.

And of course, the other fallacy is that a rendering engine is never really sending out millions of light rays and bouncing them off a microscopic surface to determine how it diffuses. It's always a predetermined outcome, the entire shading system is based upon fakery of known quantities.

If you're reading this, thanks for reading this! I hope it wasn't boring. I'll go into refraction at some other point in time, this blog is long enough as it is.

Any sort of feedback would be appreciated, though there is admittedly very little to comment on...
Avatar image for neozeke
neozeke

384

Forum Posts

0

Wiki Points

0

Followers

Reviews: 0

User Lists: 0

#2  Edited By neozeke

Fret dots are lame! Only girls use them! Great work!

Avatar image for akrid
Akrid

1397

Forum Posts

0

Wiki Points

0

Followers

Reviews: 0

User Lists: 2

#3  Edited By Akrid
@neozeke: Heh heh, thanks!

Mine is actually missing the dot at the 9th fret, I don't know how that happened...
Avatar image for nintendoeats
nintendoeats

6234

Forum Posts

828

Wiki Points

0

Followers

Reviews: 4

User Lists: 9

#4  Edited By nintendoeats

I want that guitar.

Cools stuff, I'm ashamed to admit that I never knew what specularity meant. I am now en-knowledged.

Avatar image for goboard
Goboard

346

Forum Posts

0

Wiki Points

0

Followers

Reviews: 0

User Lists: 1

#5  Edited By Goboard

looks great! How long did the render take?

Avatar image for ssully
SSully

5753

Forum Posts

315

Wiki Points

0

Followers

Reviews: 0

User Lists: 3

#6  Edited By SSully

That looks outstanding. Plain and simple. That second picture is easily my favorite, it looks very realistic. 


The last picture does give it a natural look, but it seems to detract from the look of the texture of the body a lot. The first two pictures give  a realistic representation of what the bodys color and texture actually looks like for the most part. The last picture makes it look a bit too dull. Still looks great, but from my experience with guitars they don't look like that in person. To me, the second picture does the best job of showing that. 
Avatar image for neozeke
neozeke

384

Forum Posts

0

Wiki Points

0

Followers

Reviews: 0

User Lists: 0

#7  Edited By neozeke
@Akrid: Haha nice, when I get some more cash I'm going to mod the hell out of my guitar. Hopefully the end product will be something like this 

http://www.blackmachine.net/images/b2a.jpg

Idk why, but I seriously can't stand fret dots anymore, kinda ugly. 
Avatar image for akrid
Akrid

1397

Forum Posts

0

Wiki Points

0

Followers

Reviews: 0

User Lists: 2

#8  Edited By Akrid
@SSully: Why do you always go with the one I hate?! You're right though, the second one is the most natural and realistic. Problem is, I can never help myself from wanting to make it a bit better then it has any natural right to be. I'll give it a work over though, I think establishing some context with the rest of the scene will really help it out.

I'd definitely agree the third makes it look washed out.

Thanks for your feedback, I really appreciate it. You give great tips!

@Goboard: They took about 2 hrs each. I've got a couple more lined up that will take around 8-10.

@nintendoeats: It has my whole-hearted reccomendation. Pretty cheap too, all things considered.
Avatar image for hitmanagent47
HitmanAgent47

8553

Forum Posts

25

Wiki Points

0

Followers

Reviews: 0

User Lists: 2

#9  Edited By HitmanAgent47

Woah...This isn't..real?

What is real, how do you define real? real is only electrical signals interpreted by your brain.

(looks almost real, hyperrealistic, good lighting)

Avatar image for akrid
Akrid

1397

Forum Posts

0

Wiki Points

0

Followers

Reviews: 0

User Lists: 2

#10  Edited By Akrid
@HitmanAgent47: Heh heh, thanks. That's high praise from a connoisseur such as yourself!

@neozeke: That thing is crazy!

I'm pretty vanilla when it comes to guitars.
Avatar image for ssully
SSully

5753

Forum Posts

315

Wiki Points

0

Followers

Reviews: 0

User Lists: 3

#11  Edited By SSully
@Akrid: Haha it isn't intentional, I just think it looks like something I would see in a guitar magazine. You are on the right track, all of these images are great. I am sure you will strike a good balance soon enough.