3D Painting on objects with shaders?

cryan_1832017cryan_1832017 Posts: 0
edited December 1969 in Carrara Discussion

Hello all.

Is it possible to use Carrara 8 Pro's 3D Painting on objects that use shaders (as opposed to textures)?

I've got some nice complex shaders in effect on some objects, and want to add things like mud splatters and semi-transparent red circles to make ruddy cheeks on top of the existing shaders.

The 3D Painting works beautifully for getting the mud splatter and red cheek images into the right position on the objects, but it *replaces* the underlying shader with the texture generated by the 3D painting.

I've tried using the 3D Painter's eraser tool to eliminate the default texture it creates, and then painting the mud/cheek images onto the resulting transparent texture, saving it, and finally using the resulting texture image in a new shader layer on top of the primary shader, or in the color channel of the main shader attempting to blend the existing colors with the new texture map.

Alas, none of these are working -- I either don't get a suitable blending within the color channel, or the alpha in a second shader layer is affecting the entire object (making it transparent) instead of just affecting the second shader layer.

Is this possible, or is there a better approach?

Many thanks!

Comments

  • EleleElele Posts: 1,097
    edited June 2013

    You can layer shaders (change multi channel to complex shaders->layer list)
    Is that what you are looking for?

    Edit: Didn't read correctly did I :D
    Normally a shader list should work with your texture map in the "opacity mask"

    Post edited by Elele on
  • cryan_1832017cryan_1832017 Posts: 0
    edited December 1969

    I've been experimenting with the opacity mask in shader layers, jut finding that the various operators (like overlay and multiply, and transparency) don't generate the Photoshop-like blending I was hoping for. Either both shader layers become partially transparent, or the transparency applies to the entire object -- not just the second shader layer.

    This seems like an obvious thing, so there's got to be a working solution....

  • EleleElele Posts: 1,097
    edited December 1969

    Here's a setup of layered shaders with a texture map for opacity. Is this what you want? I'm not sure I understand correctly.

    tetet.JPG
    1971 x 960 - 175K
  • cryan_1832017cryan_1832017 Posts: 0
    edited December 1969

    That's what I was hoping to do -- and it works in theory.

    If I create a transparent image in Photoshop and paint a red dot on it, and create a black-and-white version for the opacity mask, the layering works. The red dot appears properly on the object, with the original shader intact.

    However, if I use 3D Painting to create the texture map image used in the second layer, it doesn't work. To do this, I start 3D Painting and use the eraser to remove the default color (white, in this case), leaving a transparent image. I then use the 3D paintbrush to put the red dot exactly where I want it on the object I'm painting. The resulting texture image should be functionally the same as the one created in Photoshop -- just with the red dot positioned exactly where needed.

    But something odd is happening with the texture-map image created by 3D Painting -- the opacity isn't being saved as expected, and it does not work as the color and/or opacity mask in a second shader layer. If I open the texture map image created by 3D Painting in Photoshop, it appears as a single all-white layer -- no sign of transparency or the red dot. So the question is what, exactly, 3D Painting is creating... Hmmm....

    ScreenCapture_3DPainting.png
    600 x 372 - 127K
    ScreenCapture_Photoshop.png
    600 x 372 - 104K
  • EleleElele Posts: 1,097
    edited December 1969

    Have you tried turning off "white is invisible"?

    cvghgh.JPG
    1520 x 779 - 120K
  • 3DAGE3DAGE Posts: 3,311
    edited December 1969

    Hi cryan :)

    just for the record,.

    A shader, is a collection of different setting which together describe the appearance of the surface of an object.

    The Diffuse,. or "Colour" channel of a shader,. can be a flat colour,. or a Procedural mixture of colours, or an image (texture map)

    whether a shader uses colours,. or images,. there's no difference,. it's still a "shader".

    As far as painting in 3D,. you can use texture maps or colours. but what you're doing is creating a New texture map,. which is created when you start painting,.

    You should be able to create another layer in the 3D paint options on the right,. then deselect the main layer, and paint into the new layer,. as in Photoshop,. it also may help to work in Photoshop PSD format.

    You can use multiple layers when you're painting,. and then save as a Jpeg, or continue working with your texture painting in Photoshop (or any other image editor) then Flatten, and save as a single layer image,. (normally jpeg)

    pic

    Also,.. in the 8.5 beta,. there's a new shader type,. called Multilayer,. and Multilayer element,. Each multilayer, can have several miltilayer elements,. and each layer has it#'s own blending mode options, and opacity slider.

    paint1.jpg
    922 x 763 - 122K
  • 3DAGE3DAGE Posts: 3,311
    edited December 1969

    Just to add....

    If you're doing something like a stamp of an icon / decal / logo,. then it's best to make that into a PNG with alpha channel,. or PSD with transparent background,. then you can paint your main surface texture,. then create a new layer,. and paint your logo where it's needed.

    Hope it helps :)


    Hi Elele :)

  • cryan_1832017cryan_1832017 Posts: 0
    edited December 1969

    Yes. And a bunch of other options on the color channel and opacity mask in the second layer.

    Here's the closest I could get.

    I wish there were documentation for 3D Painting -- but it's new in Carrara 8 and not covered in the "Basic User Guide" for version 8.

    Dunno what's going on in the TIFF file generated by the 3D Painter. It's pure white when opened in Photoshop.

    This could be a great alternative to UV mapping for quick projects, if we can get it to work....

    (I'd post the TIFF file created by 3D Painter, but the forum software is saying the filetype is not allowed.)

    ScreenCapture_Test3.png
    600 x 372 - 146K
  • evilproducerevilproducer Posts: 9,040
    edited December 1969

    cryan said:
    Yes. And a bunch of other options on the color channel and opacity mask in the second layer.

    Here's the closest I could get.

    I wish there were documentation for 3D Painting -- but it's new in Carrara 8 and not covered in the "Basic User Guide" for version 8.

    Dunno what's going on in the TIFF file generated by the 3D Painter. It's pure white when opened in Photoshop.

    This could be a great alternative to UV mapping for quick projects, if we can get it to work....

    (I'd post the TIFF file created by 3D Painter, but the forum software is saying the filetype is not allowed.)


    3D painting is in version 7 as well. The new functions 3Dage mentioned are in the Beta, but you should be able to layer as well. There are instructions in the manual under the Help Menu.


    Maybe I should ask- Did the C7 manual get included with C8 finally?

  • WendyLuvsCatzWendyLuvsCatz Posts: 37,667
    edited December 1969

    the tiff does not actually exist until the project is saved or perhaps just the shader
    it is a temporary file
    I create a new .tiff and open THAT in 3D paint new texture map
    then I can paint in realtime
    really cool using displacement enabled in 3D view!
    I have added a layer to an existing texture but used C8.5 so not sure if I used the new function?
    I think I did not actually as it works in C8.1 too
    will check when my current render finishes

  • 3DAGE3DAGE Posts: 3,311
    edited December 1969

    Dunno what’s going on in the TIFF file generated by the 3D Painter. It’s pure white when opened in Photoshop.

    Use the right click menu to Save the image,..


    As you're Painting in 3D, (You may want to undo something), so, you're actually painting into a temporary file,. you'll need to save the image before you can open it in Photoshop,. or another image editor.

    This could be a great alternative to UV mapping for quick projects, if we can get it to work…

    UVW Mapping defines the "projection method" for the shader (texture maps or colours) applied to the 3D object.

    All objects have some type of default UV mapping applied to them, as well as a default shader,.
    but,. depending on the object shape, and how you want to texture it,. you'll need to change, or redefine the UV Mapping to suit what you want,.

    if you're object has a basic UV mapping type applied,. and you start painting,. you can sometimes have colour appearing in parts of the model which you're not painting on,. simply because of the UV mapping overlapping at that point.

    Hope it helps


    UV projection Mapping,. is different from Painting a 3D model,. or creating a texture map.

    So,. 3D painting still requires the object to have UV Mapping, it's not an alternative to UV Mapping, it's an alternative to working with textures and colours in a 2D image editor, like photoshop,. to create your texture maps.

  • EleleElele Posts: 1,097
    edited June 2013

    cryan said:
    Yes. And a bunch of other options on the color channel and opacity mask in the second layer.

    Here's the closest I could get.

    I wish there were documentation for 3D Painting -- but it's new in Carrara 8 and not covered in the "Basic User Guide" for version 8.

    Dunno what's going on in the TIFF file generated by the 3D Painter. It's pure white when opened in Photoshop.

    This could be a great alternative to UV mapping for quick projects, if we can get it to work....

    (I'd post the TIFF file created by 3D Painter, but the forum software is saying the filetype is not allowed.)

    Do you have the same texture map for both the opacity map and as the color with "white is invisible" on for the color?
    I think that might be the problem. Did you try turning of white is invisible for all maps and switching the wood layer to the top?

    PS: the screenshots you post are really small, i can't read the text.

    Post edited by Elele on
  • 3DAGE3DAGE Posts: 3,311
    edited December 1969

    If you're using the "layers list" shader,. then you don't really need 3D painting,. you can create multiple layers using existing images,..
    or just create your final texture map using a multilayer 2D image editor.

    If you're using 3D painting,. then you don't need to use the "Layers list" shader,. since you can create multiple layers (like Photoshop) ithion the 3D painting options, and each layer can have different textures or logo's, or mud splatter, or whatever you want.

    When you're done,. (if you're making something to distribute) then you would "Flatten" that multilayer image, to a single (jpeg) to use as a final texture map.

    You would keep the PSD (multilayer) version, so that you can adjust it or change it if you need to.

  • stem_athomestem_athome Posts: 514
    edited December 1969

    cryan said:
    Hello all.

    Is it possible to use Carrara 8 Pro's 3D Painting on objects that use shaders (as opposed to textures)?

    Hi cryan,

    I am not sure as to what would be classed as the correct way to do that, but I have found 2 ways to work.

    First is to cheat and create the shader(Procedural) and Bake it to a 2d map. That does involve UV mapping the object and (as the export of procedurals via carrara export does not work very well) use a 3rd party baker. You can then load that baked image and 3d paint over with opacity.

    The second way, is to paint procedural textures directly onto the model. It can be slow if you create a large texture map, and is a little buggy(carrara always crashes on exit after using this method on my setup).
    To do that, you first need to setup the shaders in the shader room. You can drag and drop shaders from the browser if those are the ones you want to use. Once they are set, go back into the assemble room, enable 3d paint and create/name your texture map. In the top left options, select the "Reveal Brush". You will then find in the 3d paint "Tool" tab an option to "Select Shader", click on that which will give you a popup window to select a shader from a list (of the shaders current in scene), select the shader and paint. You can blend the various shaders by selecting a new shader from list, and using the opacity setting. If you just want to add (for example)a dirt type texture, you can switch back to the "Paint Brush" and paint over with a texture/color again using the opacity setting.


    Hope that is understandable. If not I will post more info with some screen grabs.

  • cryan_1832017cryan_1832017 Posts: 0
    edited December 1969

    Thanks so much, everyone! I'll explore these options, and will post the results shortly.

  • cryan_1832017cryan_1832017 Posts: 0
    edited December 1969

    Success!

    I'd really wanted to keep this as a shader approach, since it's so easy to animate shaders.

    The attached images show the result. Notice the difference in the brightness of the red cheeks.

    I did this by:

    * Making a copy of the existing shader on the head, and applying the copy to the head.

    * Using 3D Painting to get the position and gradiated opacity of the red cheeks as desired, using symmetry to make both cheeks match.

    * Right-clicking on the texture preview icon within the 3D Painter and saving the image externally. (That properly recorded the 3D painting in the exported file).

    * Duplicating the saved texture image file, so there would be a version for the color and a version for the opacity.

    * Opening the opacity version of texture image in Photoshop, converting it to black-and-white and then inverting it (so black becomes white, etc.)

    * Then within Carrara, re-applying a copy of the original shader to the figure head and editing it, by turning the shader into a layer list and creating a new basic layer with multi-channel (using either the color texture exported originally, or just a plain color), and using the opacity file created in Photoshop as a texture map in the Carrara Opacity Mask for the new layer.

    What's really nice about this, is that you can then adjust the brightness of the opacity mask to control the brightness of the red cheeks. It's normally set at 25%, but if I want the cheeks brighter, I can move it to 50% or 75% during an animation. Sweet...

    Thanks all!

    ToySoldier_Test_02.png
    243 x 246 - 56K
    ToySoldier_Test_01.png
    240 x 236 - 57K
Sign In or Register to comment.