PDA

View Full Version : Mapping specular falloff


JamesMK
08-08-2003, 08:40 PM
Before turning into a Cinema user, I very often used greyscale textures to control specular falloff in my materials. That is, not the specular color or the specular level/amount, but the falloff specifically (the "hardness" of the surface).

I can't seem to figure out a way to do this in C4D...

Any ol'timer with some hints for me?

Per-Anders
08-08-2003, 09:47 PM
sadly the diffusion channel in cinema (where you can control the specular) seems to only give the same results as specular color which in essence is to control the specular brightness.

however it is possible through some more convoluted ways.

way #1 use two materials one with a hard specular, one with a soft specular, and then use your image in the alpha channel, and overlay the materials by simply putting the one without alpha on your object first, then the second one with alpha onto the object (don't use mix textures). you can carry on adding layers and using the brightness/contrast shader in the alpha channel of newer materials to add in more inbetween levels.

way *2 is to switch off the specular channel, and in the luminance channel put a bhodinut fusion, then in the top and bottom channels of teh fusion put in a Bhodinut Lumas shader, and in the alpha of the fusion put in your alpha material to blend between the two, then in the lumas materials switch off the diffusion/color channels, leaving the specular channels active (though you probably don't need three layers of specular, so just have only the one active in each lumas material) and then set one specular to be wide, and one hard.

LucentDreams
08-08-2003, 09:50 PM
hmm there are afew ways to control such things, the diffusion channel can't be set to affect specularity, The illumination tab has a Falloff for shading modes and then Their is the fact that you controlnot just height and width but inside width and falloff in the specular channel. To make something hard increaseits inside width and lower its falloff to soften lower the inside width and increase fall off.

DOn't know how much this helps overall would you have an eample of a a greyscale image and its effect on a render?

AdamT
08-08-2003, 11:28 PM
This really is an annoyance. It would be so easy if the diffusion channel affected specular width as well as height. Time to gear up a letter writing campaign. :) I

JamesMK
08-09-2003, 12:05 AM
Hmm.... I was afraid of this. Mdme_sadie's workarounds could be useful perhaps, but, as you said, a bit convoluted.

Yeah, a campaign might be in order!

EDIT: On closer examination, sadies' way #1 isn't too bad at all really. And indeed extendible. Yet again, the alpha saves the day!

kiwi
08-09-2003, 03:45 AM
Multi pass > spec pass,try gradients in PS,use adjustment layers,and you can tweak much more quickly then you could rendering in C4D :) ,thats what I do.



Stu.

JamesMK
08-09-2003, 08:11 AM
As there are some misconceptions about the use of specular falloff mapping, I figure I should explain a bit closer what I mean here (my question is already answered, but I'll add this as sort of an educational bonus =)

Let's say you are making a crystal vase or something (mostly you wouldn't, but lets just pretend). The vase has an etched pattern on it. Etchings on glass are sort of matte, while the rest of the glass is very shiny. So you would want to use a greyscale texture to control the specular falloff so that the dark areas of the texture result in a small falloff (sharp glossy highlights) for the ordinary glass, and that the lighter areas give a wide falloff (very bloated highlights) for the etched bits. Then you would use the same texture again, but inverted, mapped to control the specular height, to make the etched bits have a lower specular height.

To finish it off, the same texture, still inverted, would be used in the transparency channel to make sure that the etched parts are less transparent than the rest. The transparency mapping is not a problem of course, but the above specularity mapping is not quite as easy to do. But I'm pretty sure that Mdme_Sadie's first workaround suggestion does the trick. I'll try it the next time I need this sort of thing.

MJV
08-09-2003, 08:38 AM
Originally posted by JamesMK
As there are some misconceptions about the use of specular falloff mapping, I figure I should explain a bit closer what I mean here (my question is already answered, but I'll add this as sort of an educational bonus =)

Let's say you are making a crystal vase or something (mostly you wouldn't, but lets just pretend). The vase has an etched pattern on it. Etchings on glass are sort of matte, while the rest of the glass is very shiny. So you would want to use a greyscale texture to control the specular falloff so that the dark areas of the texture result in a small falloff (sharp glossy highlights) for the ordinary glass, and that the lighter areas give a wide falloff (very bloated highlights) for the etched bits. Then you would use the same texture again, but inverted, mapped to control the specular height, to make the etched bits have a lower specular height.

To finish it off, the same texture, still inverted, would be used in the transparency channel to make sure that the etched parts are less transparent than the rest. The transparency mapping is not a problem of course, but the above specularity mapping is not quite as easy to do. But I'm pretty sure that Mdme_Sadie's first workaround suggestion does the trick. I'll try it the next time I need this sort of thing.

Like this? http://www.mvpny.com/AntiqueGlassMV.html

JamesMK
08-09-2003, 08:45 AM
@ MJV: Exactly! Gotta check out that file.

There are other scenarios of course: Creases versus "flat skin" on a hand or a foot for instance, or worn versus unworn parts of a wooden table or chair, etcetera etcetera.

That glass looks very good, btw!

flingster
08-09-2003, 12:33 PM
man this is a cool topic...was totally confused by your posting...my lack of understanding really showing me up...thanks for the educational bit...for the specularly challenged!! heh heh.

probably not directly to related to this but did you see arnt's new light shader...would be good for you skin creases and folds etc.
:shrug:

Can I also please throw one more thing in here...slightly off topic but recently i saw a posting which really made me think...and the guy mentioned that in the real world you should not really use specular but reflection? (as reflection is a true representation of the real world rather than faking it by specular) any chance someone can clear this up a bit...or did i totally miss the boat here?
thanks guys really appreciate it.

btw..mjv always wondered how you did that glass etching so i'm totally thankful to you for sharing your efforts..thanks.

Chrissyboy
08-09-2003, 12:51 PM
Originally posted by flingster
Can I also please throw one more thing in here...slightly off topic but recently i saw a posting which really made me think...and the guy mentioned that in the real world you should not really use specular but reflection?

Hi flingster - it's true that specularity is just a fake to mimic the reflection of a bright object, but just using reflection is only really convincing if you've got an HDRI environment map.

The other option is to set all the lights in your scene to visible, and you then control falloff with reflection blur - this obviously isn't very practical.

Also - special thanks to MJV for the best glass I've seen in Cinema :applause:

Seeyou - C

JamesMK
08-09-2003, 12:56 PM
Originally posted by flingster
the guy mentioned that in the real world you should not really use specular but reflection? (as reflection is a true representation of the real world rather than faking it by specular) any chance someone can clear this up a bit...
Well, stricktly speaking, this is totally correct. Specularity as it is implemented in 3D software doesn't have a lot in common with the real world.

Specular highlights are reflections of the actual lightsources. Standard specularity is bogus, but most of the time it doesn't really matter because it looks OK anyway.

But the easiest way to see this is to check out your closest piece of reality, that empty sodabottle on your desk for instance. Look closely at what looks like specularity, and you will see that it is actually a reflection of your window or some lamp in your room.

The reason why you can't just use reflectivity instead, is because we lack the dynamic range. In reality, the reflected lightbulb is many hundred times brighter than the walls around your bottle, that's why you can only see the lightbulb reflecting clearly, creating a "specular highlight". If you do the same in 3D, the surrounding objects will reflect too clearly, since the difference in brightness between the bulb and the surroundings is not significant enough. Here's sort of where HDRI comes into the picture.... But that's another story :D

flingster
08-09-2003, 01:12 PM
thanks for the quick replies guys appreciated.
there is so so much to learn...i guess you never really stop learning but it would nice to feel like you know plenty and the rest is just tweaking!:rolleyes:
what i don't understand is why aren't developers on this basis developing reflection channels more and there influence on objects/environment...maybe this will come with the recent implementation of hdri files into cinema.

JamesMK
08-09-2003, 01:35 PM
One thing that would be fairly easy to do (I guess), is to add a threshold level in the reflection channel. If it could operate on unclamped color, sort of like the glow and highlight posteffects, then it should be possible to get reflection only where the reflected color is bright enough (i.e. a visible lightsource or similar). The threshold would probably need to be "soft" in order to avoid strange artifacts...

danb
08-09-2003, 04:51 PM
MJV, awesome glass. wow i have never seen anything like that with etching. Could anyone supply that as a pc format. i was hoping to study it further.

JamesMK
08-09-2003, 04:53 PM
Originally posted by danb
MJV, awesome glass. wow i have never seen anything like that with etching. Could anyone supply that as a pc format. i was hoping to study it further.
Just download stuffit expander for Windows. That'll unpack SIT's.

MJV
08-09-2003, 08:01 PM
Originally posted by JamesMK
Well, stricktly speaking, this is totally correct. Specularity as it is implemented in 3D software doesn't have a lot in common with the real world.

Specular highlights are reflections of the actual lightsources. Standard specularity is bogus, but most of the time it doesn't really matter because it looks OK anyway.

But the easiest way to see this is to check out your closest piece of reality, that empty sodabottle on your desk for instance. Look closely at what looks like specularity, and you will see that it is actually a reflection of your window or some lamp in your room.

The reason why you can't just use reflectivity instead, is because we lack the dynamic range. In reality, the reflected lightbulb is many hundred times brighter than the walls around your bottle, that's why you can only see the lightbulb reflecting clearly, creating a "specular highlight". If you do the same in 3D, the surrounding objects will reflect too clearly, since the difference in brightness between the bulb and the surroundings is not significant enough. Here's sort of where HDRI comes into the picture.... But that's another story :D

Actually, between the new light falloffs in 8.2 (which comes with BP2) and Arndt's translucency shader (which can produce backlit high dynamic range values), we now have all the tools necessary to build this kind of dynamic range into our scenes. This has been a crusade of mine for years, and I'm delighted that it's finally possible. Of course using reflections to produce specular highlights is the most realistic possible method, provided you model your light sources and use realistic falloffs, but requires that you also use blur in your reflection for most objects, which can cause a pretty big render hit.

CGTalk Moderation
01-15-2006, 08:00 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.