How do I make a transparency map?

FrankTheTankFrankTheTank Posts: 1,131
edited June 2016 in New Users

I'm kit-bashing and need to put an inground swimming pool into a backyard scene with an existing ground plane. Right now I have a pool with a nice layer of green algae, thanks to the ground plane intersecting my pool.

I've read somewhere about making a "transparency map", but I have no idea how to do this, and I can't find the thread that originally discussed this. It was some time ago and I never bookmarked it.

Post edited by FrankTheTank on

Comments

  • fixmypcmikefixmypcmike Posts: 19,583

    You want a black-and-white jpg which is white where you want the ground plane to show and black where you want it invisible.

  • FrankTheTankFrankTheTank Posts: 1,131

    Ok, and then I don't see where I would map that, is it under Cutout Opacity or somewhere else?

  • kaotkblisskaotkbliss Posts: 2,914

    Yes, you would put that in your cutout opacity for your ground :)

  • FrankTheTankFrankTheTank Posts: 1,131

    Thank you!

  • jestmartjestmart Posts: 4,449

    When making grey scale maps I prefer to save them as .tif instead of .jpg, that way you don't get compression artifacts ruining the effect.

  • FrankTheTankFrankTheTank Posts: 1,131
    jestmart said:

    When making grey scale maps I prefer to save them as .tif instead of .jpg, that way you don't get compression artifacts ruining the effect.

    Good to know, thanks for the tip.

  • ArtIsHardArtIsHard Posts: 7

    I would rather edit the geometry and cut out a hole for the pool in the ground in a 3d suite (Maya, 3d Max and so on) rather than fiddle around with a opacity map. 

  • frank0314frank0314 Posts: 14,049

    If you have the experience to do that without screwing up things that is an option. The best thing for new users and the inexperienced is to just make a transmap. It's very easy to do and you can get almost as good of results if you do it right.

  • Roman_K2Roman_K2 Posts: 1,239

    I asked this elsewhere but I don't think I got a response: what about anti-aliasing? If you include it, then I think it will cause a faint gray line around the edge of the area in question... I was wondering if a two-color TIFF is a good idea, and a big one at that so that the result is smoother edges. Hope this makes sense.

  • jestmartjestmart Posts: 4,449

    A 16 bit gray-scale TIFF is the best option.  Actual resolution is not as important as palette depth.  A normal TIFF would just give you 8 bit 256 shades ranging from black to white while 16 bit has 65,536 shades for smoother gradients.

  • Ken OBanionKen OBanion Posts: 1,447
    ArtIsHard said:

    I would rather edit the geometry and cut out a hole for the pool in the ground in a 3d suite (Maya, 3d Max and so on) rather than fiddle around with a opacity map. 

    Modifying the geometry is definitely not for the faint-of-heart.  And it still requires you to create a new texture map for the modified geometry.  A transmap is really the best approach; it's faster, simpler to implement, and avoids a lot of unnecessary hassles.

    Also, it should be mentioned that your transparency map should be based on the texture map used for your ground surface (better yet, if you have the texture template, use that instead; that way, you can see exactly which polys will be affected by the transparency).  That will make sure your UVs match up.

  • FrankTheTankFrankTheTank Posts: 1,131

    Well, I wound up just going with an above ground pool because it was more complicated than I was able to handle with the inground pool.

    There was actual polygon grass involved as well and I couldn't figure out how to deal with that. (I was trying to use FirstBastion's inground pool with C3D's Modern Home Deluxe, but instead just went with his above ground). So it worked out in the end, but I would like to figure out how to do for future use combining those 2 elements.

     

     

  • 3delinquent3delinquent Posts: 355

    Once you know how to make tranparency/opacity maps, you can create all sorts of effects. I recommend giving it a go.

  • Ken OBanionKen OBanion Posts: 1,447

    I've had to do some pretty creative stuff with transparency maps, and even had to hack the geometry of an environment prop to create a doorway in one of Jack Tomalin's West Park scenes.  (Which meant that I could no longer use the original textures; I had to dial in a procedural shader.)

    There is also a third alternative: the Geometry Editor in DAZ Studio.

    You can use the Geometry Editor to create a new material zone on your object, and assign whatever surface you want to it -- or none at all (i.e., make it invisible).

    Call it yet another "DAZ Hack"....

  • FrankTheTankFrankTheTank Posts: 1,131

    Once you know how to make tranparency/opacity maps, you can create all sorts of effects. I recommend giving it a go.

    I would like to give it a go if I knew where to begin. I thought initially it would just be a matter of opening up a texture map for the backyard, converting it to black and white and then making the cutout for the pool where i want it and mapping it in opacity cutout. Sounds easy enough if I'm understanding things correctly.

    The trouble is, I can't find the map I need to alter. If I go to surfaces, click on the lot, the lawn, the grass, etc. everthing just shows me seamless tiles. I think I've been through every node. I don't see a map outline of the backyard anywhere, the way I have seen with other backyards that I have, for example the Dream House pool lot. Thats an easy one to figure out. you can clearly see an outline of the backyard. So I think I know what I'm looking for, but I have no clue what to do with this one.

  • Ken OBanionKen OBanion Posts: 1,447

    Once you know how to make tranparency/opacity maps, you can create all sorts of effects. I recommend giving it a go.

    I would like to give it a go if I knew where to begin. I thought initially it would just be a matter of opening up a texture map for the backyard, converting it to black and white and then making the cutout for the pool where i want it and mapping it in opacity cutout. Sounds easy enough if I'm understanding things correctly.

    The trouble is, I can't find the map I need to alter. If I go to surfaces, click on the lot, the lawn, the grass, etc. everthing just shows me seamless tiles. I think I've been through every node. I don't see a map outline of the backyard anywhere, the way I have seen with other backyards that I have, for example the Dream House pool lot. Thats an easy one to figure out. you can clearly see an outline of the backyard. So I think I know what I'm looking for, but I have no clue what to do with this one.

    It's entirely possible that the 'back yard' prop you're using doesn't have a texture map; it could be using a tiled texture as a procedural shader, where a thumbnail-sized image is copied repeatedly to create a seamless texture.  (It sure sounds like that is the case.)  In that case, as the situation sits right now, you're kinda screwed.

    If, however, your environment (or scene) includes a set of texture templates, then all is not yet lost; just download the templates, unzip them, and locate the template for the back yard.  Assuming that there is one, which, the way you describe what you are seeing in the surfaces tab, seems increasingly unlikely.

    There is also another possibility, and that is to import the back yard geometry into a 3-D modeler (I use Blender), and use the UV-unwrapping functions to create a UV map of that geometry, and build your transparency map from that.  It is possible to use a tiled procedural shader for the diffuse channel, and also apply a UV-mapped transparency map to the opacity channel.  (I have done this in Poser, but I've never tried it in DAZ Studio.)

    The way you've described everything, that is starting to sound like your only option.

     

  • FrankTheTankFrankTheTank Posts: 1,131

    Unfortunately, there are no templates included with this item, so yes it sounds like my only option is that last method you mention.

  • gederixgederix Posts: 390

    Maybe you could drop in a ground from a different outdoor scene that has a texture in place of the ground you are currently using?

  • FrankTheTankFrankTheTank Posts: 1,131

    I did I try that, it works of course, but then I lose the polygon grass obviously, which looks so much better than a ground plane. Plus the original ground is not perfectly flat, it slopes slightly as it gets closer to the front of the house, so then that causes problems with other geometry like the driveway, sidewalk, etc.

  • Im still waiting to see someone explain how to make a transparency map. Telling someone oh just black this and white that doesn't do much. Ive searched all over and Im finding nothing. Daz is becoming extremely disappointing because its clear THEY dont care enough about their product to make sure there are adequate and up to date and easy to find tutorials in the very specific issues at hand. Perhaps they should take a que from second life!

  • L'AdairL'Adair Posts: 9,479
    edited August 2019

    Im still waiting to see someone explain how to make a transparency map. Telling someone oh just black this and white that doesn't do much.

    You'll need access to a graphics editor. I use Photoshop CS6, other "paint" programs should work fine as long as they allow layers. Gimp is full-featured but free, if you don't already have a favorite program. (It's full-featured, with a learning curve to match, though. Just a heads up.)

    Because your post isn't specific to your needs, I'll work with a plane primitive.

    Let's say you want to create the eyes and grin of a "Cheshire cat" once the rest of the cat has disappeared; Something that's up in a tree and not so close to the camera as to be obvious it's a flat plane.

    • You'll need the image of the cat, of course, either a render you created yourself, or a stock image.
    • Open your graphic editor and load the image of the cat. The finished size and shape of this map will be 2048 pixels square, but you can load a larger image and it doesn't have to be square. Now crop the image to keep all of the cats' face, maybe a little more, and size the cropped image to 2048 x 2048 pixels. Scale down, not up, for the best results.
    • Using the tools of your graphics editor, create a mask that consists of three rounded areas: one for each eye and one for the mouth. The mask around the mouth should follow the lines of the mouth. To create the mask, you don't want to use any feathering, as you will need to add and subtract from the mask until you have shapes that work for these three areas. Make the masks a bit overlarge, though, to allow for feathering in the next step.
    • Once you have the shape of all three areas to you liking, use the options within your graphics editor to feather the mask. For this example, you don't want a sharp edge between what is visible and what is not visible. With an image this size, feathering 10 to 20 pixels should be plenty. But you don't want the feathering to actually overlap the eyes or the mouth, just the area around them.
    • Save your mask. In Photoshop, for example, you would Save Selection.
    • Create a new layer of solid white and apply your new mask. You may need to remove your selection from the window, fill the layer with color and then load the selection.
    • Or you may be able to create a new layer of white with the mask already applied, eliminating the need to save the mask first. In Photoshop, you would go to Layer > New Fill Layer and select Solid Color…in the Main Menu. When prompted, name the layer, when the color picker pops up, select white, (cursor all the way to the upper left corner.) This is the part of the mask that allows the object to be visible.
    • Create a new layer below the layer of white. Fill this layer with black.
    • All that should be visible now is a black and white representation of the eyes and mouth of your cat.
    • Save a copy of the file as either a PNG or JPG image.
    • Hide the black and white layers.
    • Save a copy of the file, (the cat's face,) as a JPG image.
    • The two images you have just created are the Diffuse, (3DL) or Base Color, (Iray) image of the cat's face and the transparency map for Opacity Strength, (3DL,) or Cutout Opacity, (Iray.)

    Now to create your cat in Daz Studio:

    • Select "Create" a "New Primitive…" from the Main Menu.
    • In the popup dialog, select Plane from the drop-down menu, and set Primary Axis to Z Positive. (this orients the plane correctly for a vertical image.) Under Options: set the Size to 1 Ft and Divisions to 1. To create the plane, click on the accept button. (One foot should be plenty big enough for a cat's face, but scaling the plane up or down won't hurt anything.)
    • The plane should automatically use the materials for the active Render Engine, which is Iray be default. (This is a recent behavior. If you're using an older version of DS, you may need to apply the Iray Uber Base if you want to render in Iray.)
    • Select your new plane and open the Surfaces > Editor. There will be only one material zone for the plane, Default.
    • Apply the full cat image to the Diffuse or Base Color parameter. Your plane should now show the full face of the cat.
    • Apply the black and white image to the Opacity Strength or Cutout Opacity. Your plane should now show only the eyes and smile of the cat.
    • From here, you'll need to build your scene and move the plane into place. You'll also need to make sure the plane is facing the camera full-on for best results.

    While creating a Cheshire Cat may not be something you'd ever use, the steps here should translate well for creating a mask for anything—Although with more complex objects, you'll need to work with the UVs to make sure your "cutouts," (the black area of the map,) are in right place for the object, and the image you'll use for a reference may well be the existing texture of an item.

    I hope this helps.

     

    Post edited by L'Adair on
Sign In or Register to comment.