Home Technical Talk

Lighting and Grass Textures on a Plane

polycounter lvl 8
Offline / Send Message
GabeLamas polycounter lvl 8
Hello Everyone,

Upon making texture maps for a model I’ve stumbled upon an issue regarding post-compositing. I used a simple BLINN shader, and I call it “MATERIAL_Turntable”, and my renderer is Mental Ray. My goal is to have light pass through the transparent areas of the planes that are NOT covered by the leaves and grass blades of the texture in MULTIPLE RENDER PASSES such as Ambient Occlusion, Diffuse Material Color, Shadows, Ambient Irradiance, etc. I also want the turntable to be visible when the grass overlaps with it and the grass blades appear to be in front of the edges of the platform. The three grass blades and the moss-covered platform are FOUR continuous meshes and they share the same texture-map. Now for some details. All four of these nodes that have a texture map have a “.tif” file being called as the texture. The Color map is a 32-bit Targa with an alpha channel, and both the COLOR and TRANSPARENCY nodes of the Turntable Material call the same file node that has the color map. Only the bump node has “Alpha is Luminance” checked. So is there any way I can achieve what I want for this shader? It seems like a pretty simple task. There has to be something I’m doing wrong! Is error displayed in the Script Editor the problem? Is “(Maya Scene) : output data type “rgba_h” not directly supported by image format tif” the main cause? Remember this is a BLINN shader and the color map is a .tga file. I just want to know if I can make light pass through the transparency of a BLINN shader or if this task is achievable ONLY through a “mia_” shader for mental ray. For some visuals I’ve included some test renders for my model that I want to render and take into post. They are attached below. Any advice will help on this matter.

Thanks.

Replies

  • Eric Chadwick
    It would help in the future to name your thread titles better, for example "Maya 2015/mental ray - grass rendering?" If you mention the particular software, and render method, you're more likely to get help.

    Personally, I don't know Maya's rendering all that well. I use mental ray in 3ds Max quite a bit. But this is primarily a game artist forum, not a rendering one.

    You could easily do this kind of scene in a game engine, and get proper masking, and nice AO.
  • GabeLamas
    Offline / Send Message
    GabeLamas polycounter lvl 8
    Alright then. I'll try to be clearer in future posts. I just needed some help with rendering textured planed with transparency/ alpha maps for post-compositing render passes in photoshop.
  • Eric Chadwick
    OK then why not use geometry for the grass, instead of transparency maps? That would solve all your problems right there.
  • GabeLamas
    Offline / Send Message
    GabeLamas polycounter lvl 8
    It's crossed my mind but that would defeat the purpose of my project. I feel like I wouldn't be learning anything new if I just resorted to using geometry to make grass. If I can learn to use transparency maps then it will help me in rendering hair for when I have to do another human or character model.
  • Eric Chadwick
    I get your point. However if you're rendering hair in Maya, you'll be using a dedicated hair rendering system, instead of transparency on planes. The latter method is needed for games because we have to render in real-time, at 30 fps or better each frame.

    If you want to learn how to render transparency for games, use a game engine.
  • GabeLamas
    Offline / Send Message
    GabeLamas polycounter lvl 8
    But shouldn't I be able to render grass/hair in Maya using planes as if I was to use them in a game. I understand using planes as a standard for rendering in games, but shouldn't I be able to use them in Maya for rendering and post-compositing purposes.
  • xillyriax
    Offline / Send Message
    xillyriax polycounter lvl 10
    Raytraced or Depthmap shadows?
    also, make sure "Alpha is Luminance" is check in your color map
  • GabeLamas
    Offline / Send Message
    GabeLamas polycounter lvl 8
    Raytraced Shadows! I always use raytraced shadows. But keep in mind I've already found a way to make the transparent parts of the alpha maps invisible in the beauty render. I just need to know I can get the transparent parts to BE transparent in different render passes so I can do some post-compositing with overlaying meshes within the scene. For more of a reference you can check out a post I wrote earlier today on another thread.

    http://www.polycount.com/forum/showpost.php?p=2334661&postcount=3

    I've already set the shadow attenuation for both texture shaders to 0. I even did the same for the translucency sliders.
  • GabeLamas
    Offline / Send Message
    GabeLamas polycounter lvl 8
    xillyriax, checking the "Alpha is Luminance Box" only makes the transparent parts of my alpha map visible with the green from the color map. I had them all unchecked in earlier versions to avoid this issue.

    btw, do you how to access the "Attenuate According to Transparency" option in the Render Pass Attribute Editor? I've been trying to look for it but I can't seem to get a straight answer from the internet.
  • xillyriax
    Offline / Send Message
    xillyriax polycounter lvl 10
    When you select the type of Scene Pass in the Render Options, you'll see it in the Attribute Editor

    Not all the passes have this option, however.
    http://i.imgur.com/DV2F6yX.png
Sign In or Register to comment.