Lens Effects Glow - Distance From Camera


#21

This is what happens with a Falloff material:

Doesn’t look even close. Either that, or I’m using Falloff incorrectly…but this is the closest I ever came by tweaking the settings.


#22

I did a little experimenting, and I got something that is really, really, really close.

That’s a Directional Light with attenuation, then a Volume Light applied.
The only problem–the only problem!–is, if you see, the top is flat. If there were some way yo round that out, this would be exactly what I’m after.


#23

Okay, I see now where our opinions differ. Alright, let’s geek out a little here. When in doubt, check the source:

Clearly the glow spills out from the envelope of the physical blade itself. To beat a dead horse: the file that MGernot uploaded is the basis for what I used, and it is very customizable between the glare shader and the luminance and color of the Arch&Design material. Not to mention you can further tailor it in post. I believe your photoshop work on my image proves my point. The ACTUAL glare of the purple saber at the back is narrower than the green in front of it, which is narrower than the purple in front of it - don’t you see a pyramid of glow? What you clipped to was the envelope of the effect, which is the spread parameter. Spread is adjustable. This envelope is only visible because this is rendered over pure black. Composite this over an image and it’ll barely be perceptible, in which case you can feather the alpha to tune it further.

Sorry, to push a round peg through a square hole with you, and for wasting our time, but because Star Wars is one of my all-time faves :buttrock: I just wanted to illustrate that the lightsaber effect is possible, but you’ve definitely got your own unique take on how a lightsaber should look, which is cool, too. :cool:


#24

Yes, well, that’s what I need help achieving, and it seems like everything I try to do in MAX has something that gets in the way of being right.

As I say, the Volume Light seems really, really close…but no cigar. Once, again, the problem seems to be that what I need exists on one option, but loses something else that another option has…but which lacks the first thing on the other option. :banghead:

A Spotlight has the rounded end for the Volume Light effect, but it has a cone shape. The Directional Light is cylindrical for the blade shape, but doesn’t have the rounded end. Damned if I do, damned if I don’t.

Is there another option? Some way to achieve that glowing volume with, say, geometry? I’ve been looking and I can’t find one. Is there a way to make a spotlight not be a cone?
I mean, seriously…I need hints here! Please! :frowning:


#25

If you are compositing at all in your workflow, then a geometry will give you a hard edge that probably won’t look right.


#26

Well, as I said, this Volume Light is really, really close…if I could just find some way to make the end rounded…or some other method that achieves this look.

It’s just sooooo close. There has to be a solution here, there’z just gotta!


#27

Is there a way to make a piece of geometry into a light source to which the Volume Light can be applied, maybe? You know…like a fluorescent light bulb sort of thing (which MAX seems to really not like to allow for some reason…)


#28

Ok, scratch that. Didn`t work.


#29

Errr…'kay.

Well, I’ll definitely be grateful for any more advice. :slight_smile:


#30

I know how to do it, i just need to get to it :smiley: I will try to make a quick video guide as soon as i get home from work :slight_smile:


#31

Ooh, thank you!

…though, hrm, no offense meant whatsoever, but please tell me you read the thread first. I’ve had far too many experiences where someone read the OP, misunderstood, didn’t see the clarification that came later, and then replied.
I mean, you say you’re going to make a video…as a YouTuber myself, I know what goes into building one, and I’d really hate for you to waste your time putting together a video that doesn’t quite answer the question. I know I’d be grouchy if our positions were reversed.

Just, you know…trying to help.
Regardless, thank you. :slight_smile:


#32

It’s gonna be quick one.

Basically you want to have laser/plasma (or whatever) effect lightsaber has that properly scaled relative to the blade as it gets further from the camera, and you want to avoid that weird surface shading artifact near the top of the blade.

It will be quick video without commentary, mostly because it saves some trouble and time trying to explain it all through text only :slight_smile:


#33

I should have trusted you. :slight_smile:


#34

Ok, so here’s the video:

https://www.youtube.com/watch?v=vSkoP2WKGCI
And here’s what’s going on in the video:

First, you use Mental Ray which is unfortunately only renderer that does not have proper volume shader. It has one simple improper volume shader that serves as an example for shader writers, but it will suffice in your case.

So I first went to my 3ds Max install directory, into NVIDIA\shaders_standard\mentalray\include subdirectory, and opened base_max.mi file in Wordpad. Then searched for “volume” and found mib_volume entry. There is line saying “hidden”, which you need to put hashtag sign in front of, so that it’s ignored when parsing the file.

Once change is made, file is saved, you can launch Max.

You can see me messing with MR render settings. You can ignore the string option i wrote or that i disabled FG, but you need to enable Autovolume checkbox as i did, because Volume shader doesn’t work without it.

The i just modeled simple shape to represent lightsaber. Once that was done, i grabbed arch&design material (which is THE material to use if you use mental ray). I disabled diffuse contribution, set transparency to full (1.0) and set IOR to 1.0 so that no refraction occurs. This is because volume is considered sort of refraction effect, and if I used opacity instead, it would mask out everything, including volume.

Once that was done, i added volume shader into volume slot of Arch&Design material. I adjusted color and set Max value. Max value is basically density of the volume. Higher the value, the thinner and less dense that volume is.

Then i plugged RGB multiply as color map of Volume shader. The reason i use RGB multiply is because there is no node in 3ds Max that simply outputs color, so RGB multiply is the simplest one to output simple color, as if the other color slot remains white, color in first slot is multiplied by white and remains the same.

I used the node so that i can plug another node between the two. (You can see me stupidly trying to plug it between volume and material first, which does not work since Volume input expect shader, not map) Then i plugged the node between color and volume shader, and increased RGB level so that we get brighter than white color, and therefore glow.

You can see me messing with ratio between density and color of volume.

Then i created another material and assigned it to the saber handle. I did it just so that when i attach object together, handle won’t adapt volume material of the handle but instead retains it’s own. (If i you attach object with unassigned material, it will adapt material of the object you are attaching it to). I did this because i wanted sabre to be one object. I guess for you, this is pretty much irrelevant step.

I duplicated a few sabres to see that they indeed remain scaled properly with distance.

Then i browsed for lens effects, but i decided to use lens shader insted, cause i am more familiar with it. I browsed to the maps folder in max directory where stock glare images are stored.

This glare effect will do what you do not want. It will create glow effect around the saber that won’t relate to the distance of the sabre. But that’s okay. If you look at the pictures posted above, lightsabers on those shots have two effect. The main plasma/laser tube, but also subtle glow around them. The tubes indeed remain proportional with distance, but the glow does not. To get good looking saber, you need both. Of course you can always add other one in post.

I just spent few seconds tweaking the effect so it looks subtle. I then played a little with intensity and color.

Then I checked out the images again, and noticed that on the movie pictures, glow was little bit stronger in the center, so i mapped the blades with gradient map, which i multiplied over the volume color. This way i was able to tweak heat center of the sabre blade. I then tweaked RGB offset of the gradient so that hotspot effect is just subtle, not obvious.

And that’s about it… :slight_smile:


#35

I’m afraid this does not work.

I don’t know whether something has changed between your version of MAX and mine, but the Volume Shader does nothing.


#36

One thing I notice…when you set Diffuse Level to 0, the sample goes black, and so does mine.
But then when you set Transparency to 1, you got a funky black ring, like a circle with a hole in the center.

I don’t get that. I just get nothingness. I get the background checker pattern and nothing else.

Could that be the problem? What are we doing differently, here?


#37

The black ring is refraction. But you actually want to get rid of refraction, you want to have nothingness basically, so that refraction does not bend the volume effect.

Have you set correct Max value? This value is scene scale dependent, so if your lightsaber is small, you may need very small values, like 0.01 or even smaller. Or if scene is large, then you may need larger values, etc…

Also did you enable autovolume checkbox?


#38

Right, well, then I have nothingness.

I did a little just-in-case experimenting, and I’ve discovered that I get a bright-ass white effect if the normals are all facing inward, and I get nothing at all if they’re facing out.

Have you set correct Max value? This value is scene scale dependent, so if your lightsaber is small, you may need very small values, like 0.01 or even smaller. Or if scene is large, then you may need larger values, etc…

Everything should be to scale, as in, life-sized.
But I’ve tried everything… 0.001 is the smallest it will give me, and with the normals facing out, I see nothing. With the normals facing in, it’s solid white. I’ve tried numbers as high as 20000 with the same exact effect.

Also did you enable autovolume checkbox?

Yes.


#39

Here’s working scene resaved to Max 2013, I use 2015. Hopefully it will retain all the data correctly.


#40

It won’t open.