Home Technical Talk

3DS Max: I want to make a "Normal-map-like" material, in editable world space.

polycounter lvl 6
Offline / Send Message
Stenrik polycounter lvl 6
Hi,

Forgive me if this is a noob question, but I AM a noob to Max materials, and wasn't able to google this. Also I hope this is the right site to ask at. (It's ultimately for a game, but it's a technique more for concept/pitch art...)

I am rendering elements of a scene that I intend to bring into Photoshop. I would then use channels to create layers based on the angle of the model's faces.

Like this: http://galaxycityradio.com/wp-content/uploads/2011/02/03_normals_sphere.png


So I need to be able to color all polygons of my objects based on where they're facing in the world.


For example...
Blue: All polygons completely perpendicular with the Z axis (facing into the sky or ground) would be pure blue.
Red: Same, except for red on the X axis.
Green: Same, except for green on the Y axis.

All polygons facing partially up or down would be a color blend.
(Ideally, I'd be able to customize the direction of colors, so that pure red is facing between X and Y somewhere, but I could just rotate the entire scene as a workaround.)

The closest I've been able to get with this is the "Falloff" map, applied to a standard material. I can set it to world space and select 2 colors. However, this only allows me to use the effect with 2 colors, and I need 3 to do what I'm trying to do properly.

I tried applying the "normal" map in the same fashion, but I know that's the wrong one to use since it needs, well, a MAP. It doesn't seem to generate. All I know is that I'm trying to do something similar in principle to how normal maps are generated.


The obvious suggestion would be to set up different colored lights from the proper directions, turn off all cast/object shadows and render away. However, my scene is devoid of all light sources. I want to stick to a self illumination map with an RGP tint on each of the 3 colors, which I'm currently doing with single color wireframe renders.

On top of that, using light sources would be very tedious, since I want to apply this "normal-like" map to each object separately, and it's a complex scene. I'd have to make exclusive lights for each object, no shadows, facing the right relative angle AND distance. Unless there's a macro to do this to every object quickly, I want to avoid that approach.


Any guidance on this would be very helpful. It seems like there must be a way to do this, obvious or not. Thanks!

Replies

  • Noors
    Offline / Send Message
    Noors greentooth
    Not sure why a light setup wouldn't work ?
    Don't have Max here, so i can't test but i assume it does.
    See the setup here.
    http://www.bencloward.com/tutorials_normal_maps11.shtml
    You'd prolly need a negative Z light aswell.
    Those are directional lights so their position doesnt change anything.
    Render the diffuse pass only, and it will be "self illuminated".
    Also there's a normal pass, never used that, but maybe it's a lead aswell.
    And also, looks like you can get a normal pass from mental ray ao shader aswell.
    "Open the render menu, assign mr as the active renderer, create a mr material, drop a AO shader into the color slot, change the output mode to 2 or 3."
  • huffer
    Offline / Send Message
    huffer interpolator
    There used to be a shader that did exactly this, but I think it's pretty outdated, and I can't find it anymore. But, I also remember a script that added the lights and setup everything in a square plane, so all you had to do was render a top view of your object, I'll try to find it.
  • xvampire
    Offline / Send Message
    xvampire polycounter lvl 14
  • Stenrik
    Offline / Send Message
    Stenrik polycounter lvl 6
    @Noors: I think I will give the lights a shot, actually. That setup looks pretty straightforard, as long as I don't have to deal with cast shadows. I admit I've been hesitant since I've never actually done any lighting in Max before and I'm on a deadline. Easy to get sucked into the lighting rabbit hole, so I'll probably try all the other suggestions first.

    @huffer: Yeah, I was fully expecting there to be some obscure material/shader specifically for this purpose. It seems like a really basic function with some demand. And yet we have to get "tricky" with it. The script sounds nice, but it seems like all of them are deigned for rendering the top of my object. The whole point of this is to render objects in full perspective, camera view.

    @xvampire: I downloaded that, and it isn't working. I've used the drag method as well as the "run" method, and checked for it under the "scripts" part of utilities. Nothing shows up. :-\ Of course, I'm on Max 2014 and this one says "Version Requirement: 6;5." I searched Scriptspot for a more up-to-date version of something like that, but haven't seen anything.
  • xvampire
    Offline / Send Message
    xvampire polycounter lvl 14
    have u try to put in ur plugin folder?

    I believe it just drag and drop it hmmm,

    try drag and drop it first, like usual then do this

    nPJtMSb.gif
  • Stenrik
    Offline / Send Message
    Stenrik polycounter lvl 6
    Got it working now, many thanks for the tutorial. (I'd been misled by a different tutorial, which showed a script being used in a different way.)
    Pretty similar effect to the other technique I described above, but more straightforward. Now if only I could get it faceted...
  • Noors
    Offline / Send Message
    Noors greentooth
    Faceted checkbox under the shader basic parameters doesn't work ?
    Else you could reset all smoothing groups on your objects or put an edit normal modifier and beak all normals.
Sign In or Register to comment.