Help with 3D paint in Carrara 7 & 8 Pro

evilproducerevilproducer Posts: 9,050
edited April 2013 in Carrara Discussion

Okay, I've looked at the manual and in the past when C7 Pro first came out, I experimented with the 3D paint feature. It's been a couple years since I tried anything with it, and I seem to forgotten or am remembering something wrong.


My poblem is that I have a terrain (still editable in the terrain editor). I want to keep the terrain shader that I have for most of the terrain, but I wish to add some dirt and mud textures to some specific areas. I know the manual says that it's a simple texture system, but you can load maps. My problem is that no matter what I do, it wants to replace the entire terrain's map with the texture I'm loading.

My first question is: Is what I want to do possible?

My second question is, if it is possible, what are the steps I need to take to get there?


Thanks in advance!

Post edited by evilproducer on

Comments

  • HeadwaxHeadwax Posts: 9,987
    edited April 2013

    hya evil

    this is the second time I have t yped this gah...
    forum bugs!

    try export the terrain as an object, and i n doing so convert the procedural to textures
    then reimport the resulting texture map and apply it to the old terrain (forget about the exported obj)
    then you can paint on the imported map.

    Post edited by Headwax on
  • evilproducerevilproducer Posts: 9,050
    edited December 1969

    head wax said:
    hya evil

    this is the second time I have t yped this gah...
    forum bugs!

    try export the terrain as an object, and i n doing so convert the procedural to textures
    then reimport the resulting texture map and apply it to the old terrain (forget about the exported obj)
    then you can paint on the imported map.


    Thanks! I'll give it a try! I may not be able to mess around with Carrara 'til Tues. as Mon. looks pretty busy in the real world!

  • WendyLuvsCatzWendyLuvsCatz Posts: 38,200
    edited December 1969

    unless you have one of those plugins you cannot bake the proceedural shader to a map.
    I would render a top view of the terrain for a texture map myself.

  • HeadwaxHeadwax Posts: 9,987
    edited April 2013

    hya Wendy, I have baker but I'm pretty sure that is not being involved

    it's just a choice when you export an obj you get a choice of converting procedurals to bmp I think

    (i'm using C8 but I think it was around in c7)

    Post edited by Headwax on
  • RoguePilotRoguePilot Posts: 239
    edited December 1969

    You're overcomplicating things a bit.

    Just save your terrain shader to the browser then get rid of it and create a greyscale control map in the painting room.
    You can then load up your original shader and use the created control map to use in any of the blending modes. Much simpler.
    Also works for making replicator distribution maps.

  • evilproducerevilproducer Posts: 9,050
    edited December 1969

    You're overcomplicating things a bit.

    Just save your terrain shader to the browser then get rid of it and create a greyscale control map in the painting room.
    You can then load up your original shader and use the created control map to use in any of the blending modes. Much simpler.
    Also works for making replicator distribution maps.


    Hi RoguePilot. I don't know if a terrain shader will work for painting as the documentation said only simple shaders or textures would work. Or do I apply the original terrain shader after I paint?

  • evilproducerevilproducer Posts: 9,050
    edited December 1969

    head wax said:
    hya Wendy, I have baker but I'm pretty sure that is not being involved

    it's just a choice when you export an obj you get a choice of converting procedurals to bmp I think

    (i'm using C8 but I think it was around in c7)


    You are correct sir! I can convert procedurals to an image map if I export the terrain as an object. The only caveat is that a terrain shader uses elevation to generate some effects and that is not baked into the texture map. It's just how a terrain shader applied to a plane would look.


    Okay, back on topic, I'm not grasping how to get one texture to paint on top of another texture. I can load a texture into the color channel for instance and the whole terrain takes on that texture, I can then select a simple color on the brush- White for instance, and I can paint white onto the texture. What I would like is to have a grass like terrain texture and paint patches of a dirt texture.


    I can use RoguePilot's method to create a new texture and have the base color a neutral gray and paint on it, but how do I get my other shader data into it? Do I have to edit externally in Photoshop or something?


    The first image shows the terrain shader I would like. The second is the shader converted to a texture map- Jaggies and all- But, I can now paint it!


    The third image is the terrain a neutral gray and painted on in white.

    Thanks for the help so far guys! I'm not trying to be thick, really I'm not!

    Picture_5.png
    665 x 453 - 45K
    Picture_4.png
    639 x 412 - 291K
    Picture_2.png
    750 x 479 - 509K
  • RoguePilotRoguePilot Posts: 239
    edited December 1969

    Hi,

    While you're painting don't have the terrain shader applied. That's why you save it to the browser.
    When you have your maps sorted then re-apply the terrain shader but use the painted maps either as part of a multi layer set-up or use them as blenders and multipliers in each component of the terrain shader layers. That way you'll get the effect of your painting while still having the flexibility of a terrain shader.

    To re-iterate. Get rid of the terrain shader. Load up a flat map. Paint. (You can build up in layers if you choose to use a PSD file).
    Now use that map in your original shader to apply your effects.

    For your mud effects the most effective way would be to build a mud shader and then apply that as a layer over your terrain shader using your painted greyscale map as the blender. It doesn't even have to be a procedural mud shader, a tiled image should work just as well.

  • RoguePilotRoguePilot Posts: 239
    edited December 1969

    Cross posting,

    Use white on black instead. When used in a mixer channel black lets one channel through and white the other channel, the blending happens in the grey areas.

  • evilproducerevilproducer Posts: 9,050
    edited December 1969

    Thanks Rogue! I'll give it a try!

  • evilproducerevilproducer Posts: 9,050
    edited December 1969

    Thanks to everybody for their help! RoguePilot, your suggestion worked wonderfully. I'm doing a test render now to see what refinements I need to do, but so far it looks good.

  • RoguePilotRoguePilot Posts: 239
    edited December 1969

    Happy to help, looking forward to the result.

  • evilproducerevilproducer Posts: 9,050
    edited December 1969

    I'll post something tomorrow as it will take awhile to render! It will still be a WIP though!

  • evilproducerevilproducer Posts: 9,050
    edited December 1969

    A bit of insomnia tonight, so here is the WIP of my Renaissance village that I've been working on. I used what I learned in this thread to add the "road" and some bare spots around some of the buildings. One of the other areas has a tournament grounds with bare earth, so hopefully that will look good as well. Thanks so much everybody!

    Village-2.jpg
    2000 x 1500 - 1M
  • DartanbeckDartanbeck Posts: 21,549
    edited December 1969

    Okay, the title of the thread made it seam like a C7 thing. This a very useful topic. That is a very nice effect, EP!
    Well now that you're digging around inside those terrain shaders, don't you think they're cool? You can replace any of those individual shaders with Multi channel and use texture, bump and spec maps, etc.,
    I think those things are great!

  • evilproducerevilproducer Posts: 9,050
    edited December 1969

    Okay, the title of the thread made it seam like a C7 thing. This a very useful topic. That is a very nice effect, EP!
    Well now that you're digging around inside those terrain shaders, don't you think they're cool? You can replace any of those individual shaders with Multi channel and use texture, bump and spec maps, etc.,
    I think those things are great!


    Hello Dart, I agree this topic is most useful to all versions of Carrara that have 3D paint. The only reason I specified C7 is because I wasn't sure if any features were added to the 3D paint function in C8 and I didn't want to bang my head against the wall looking for a function that wasn't in C7 if it were to come up.


    Yeah, the whole shader system is pretty cool. I've played with terrain shaders quite a bit. Just not the 3D paint functions as I never had a real need until now. Or maybe I should say, I never realized I could have a need of the feature.

  • RoygeeRoygee Posts: 2,247
    edited December 1969

    I have used the method explained by head wax and got reasonable results for a middle-distance shot. Need to have the terrain set at a high resolution and export the procedural shaders at least at 2048 to get good results - which takes like forever::)

    Also works pretty well using a preset brush - question 1- anyone know how to set a texture as a brush?

    EP, your result is really good - better than what I've had using the above method. Question 2 - any chance of an easy step-by-step, please?

  • evilproducerevilproducer Posts: 9,050
    edited December 1969

    I'll do what I can. The method was described by RoguePilot but I can show the shader tree and explain the steps I used to get there. I'll have to open the scene so it may be a little bit as I'm working on other elements for the scene at the moment.

  • evilproducerevilproducer Posts: 9,050
    edited December 1969

    Following RoguePilot's advice, I chose to create a new color texture. Carrara gave me the dire warnings about the current shader instance being lost, etc. I clicked okay to get through those dialogues, since I used the Complex Green terrain shader from the Carrara native content. I Chose the image map size that would be created and chose Photoshop for the format. I then painted my terrain and left the houses where they were so I would have a reference for the wheel tracks. The brush size will depend on the terrain so I won't go into that.


    After the terrain was painted, I reloaded the original terrain shader from the browser. Looking at the shader and all it's terrain layers etc. I clicked the little plus sign at bottom of the list which gave me the option to create a new Terrain Layer node. I clicked the Shader tab next to the Instances and found the thumbnail representing the painted terrain shader and force- dropped it in the new terrain node's Distribution channel which created a multi-channel shader within the terrain layer. Under the new Terrain Layer's Shader channel which was currently empty I decided to drop in another preset terrain shader and chose Rocks. The result is what you see.


    It's possible I was just lucky, so your mileage may vary!

    Picture_8.png
    846 x 919 - 252K
    Picture_1.png
    885 x 896 - 92K
    Picture_5.png
    550 x 108 - 14K
    Picture_4.png
    226 x 316 - 28K
    Picture_3.png
    408 x 129 - 12K
  • RoguePilotRoguePilot Posts: 239
    edited April 2013

    Roygee said:

    Also works pretty well using a preset brush - question 1- anyone know how to set a texture as a brush?

    Setting up a post, hang on.

    The suit isn't important here, I just happened to be working on it when I read your question.

    To set an image brush click on the little patchwork icon, then click on the {...} button to bring up the file selector.

    You can select any image as the brush. In this case I'll be painting on the bump channel so I'll choose my high-tech texture chip.

    You can set the brush to use fall-off or not. You can also set the degree of fall-off as well as the repeat frequency for the image.

    Just a point to note, the brush is effected by the settings in the colour chip. In the case of the bump channel, which would always be greyscale, the white colour puts the brush at maximum intensity with the brush colour modulating the output. Essentially the brush always works as a mask on the bump channel.

    Personally I wouldn't use the texture brush for a perfectly regular pattern, it's too variable, but for a more organic feel it is very useful and it works brilliantly for those blast marks in any space battle. Loading an image into the stamp tool is also useful for putting a logo onto a complicated UV map with morphs applied. (see my New52Supergirl renders).

    Image5.jpg
    1280 x 960 - 174K
    Image4.jpg
    1920 x 1200 - 292K
    Image3.jpg
    1920 x 1200 - 244K
    Image2.jpg
    1920 x 1200 - 266K
    Image1.jpg
    1920 x 1200 - 204K
    Post edited by RoguePilot on
  • evilproducerevilproducer Posts: 9,050
    edited December 1969

    Can't wait to read your post RoguePilot!


    Does anybody object if I edit the title of the thread to be version generic?

  • evilproducerevilproducer Posts: 9,050
    edited December 1969

    Roygee said:

    Also works pretty well using a preset brush - question 1- anyone know how to set a texture as a brush?

    Setting up a post, hang on.

    The suit isn't important here, I just happened to be working on it when I read your question.

    To set an image brush click on the little patchwork icon, then click on the {...} button to bring up the file selector.

    You can select any image as the brush. In this case I'll be painting on the bump channel so I'll choose my high-tech texture chip.

    You can set the brush to use fall-off or not. You can also set the degree of fall-off as well as the repeat frequency for the image.

    Just a point to note, the brush is effected by the settings in the colour chip. In the case of the bump channel, which would always be greyscale, the white colour puts the brush at maximum intensity with the brush colour modulating the output. Essentially the brush always works as a mask on the bump channel.

    Personally I wouldn't use the texture brush for a perfectly regular pattern, it's too variable, but for a more organic feel it is very useful and it works brilliantly for those blast marks in any space battle. Loading an image into the stamp tool is also useful for putting a logo onto a complicated UV map with morphs applied. (see my New52Supergirl renders).


    So I'm assuming you put blue in the color channel and are restricting your painting by shading domains?

  • RoguePilotRoguePilot Posts: 239
    edited April 2013

    I'm restricting by both shading domains (avoiding the El symbol which is it's own set of domains) and by channel. When you set up a new texture in the paint room you get the option of which shading domains it will be applied to. You also have the option of which shader channels you are painting on (or viewing). There is a restriction on which channels you can view in combination but you could paint on all of them at once or any combination of them.

    Just so you know, the final image is not the result of the rough painting shown in the previous screenshots. That's a much more careful set of applications with a stamp and a larger image brush which has been layered in paintshop. For me the paint room is the start point to build up solid reference images and then the end point to make corrections and add a bit of detailing work. I couldn't produce the textures that I do without it but in order to produce the quality that I want for myself (and for distribution) I still need paintshop to do the heavy lifting. (I work with masks and vectors to produce the maps that I'm known for but they all start in Carrara)

    Post edited by RoguePilot on
  • evilproducerevilproducer Posts: 9,050
    edited December 1969

    That is all very helpful. Thank you!

  • HeadwaxHeadwax Posts: 9,987
    edited April 2013

    thanks RoguePilot for expalining that,

    and thanks for sharing the method EvilProducer.

    the scene is starting to look very promising,

    I cam yesterday and posted something but after four tries at getting the forum to work I gave up.

    Mark Bremmer has a tut which is interesting as well. see Roads on Terrains

    http://www.markbremmer.com/3Bpages/darkarts.html

    oh I don't mind if yoiu change the name of the thread ;)

    Post edited by Headwax on
  • RoygeeRoygee Posts: 2,247
    edited December 1969

    Thanks for the explanations, EP and RoguePilot - very much appreciated:)

  • DartanbeckDartanbeck Posts: 21,549
    edited December 1969

    I still need paintshop to do the heavy lifting.
    I haven't used Paintshop in a bazillion years! I have an older version in my software disc folder. The first real editing software I've ever owned. Anyways, I wanted to say that you did an amazing job in that example... truly marvelous. Both in work and explanation.

    Still cutting my teeth slowly in Dogwaffle Pro: Howler in between working and sleeping. Most of which is watching tutorial shows made by those wonderful developers. If this function is available in anything else, I've never known about it:
    In all Dogwaffle versions, the Alpha is mainly a layer. A layer that you can do anything into that you can do in any other layer. But in Dogwaffle, you use the Alpha as a layer for which to create a selection. Any selection. You can use any brush or filter in the alpha to better enable sophisticated selections. For example, I could create a mask around the needles of a pine by using a small brush and painting away. Is that rare? Just wondering. So you set left mouse to white (paints selected area) and right mouse to black. It's not picking up a single stroke only... I can paint all I want in there. I mean it has "Grow Region", invert, subtract, replace, I mean... anything...

  • HeadwaxHeadwax Posts: 9,987
    edited December 1969

    what a great thread, so glad I found it again, would love to see more people using the 3d paint part of carrara

  • StezzaStezza Posts: 8,050
    edited December 1969

    yep... very good indeed :-)

  • HeadwaxHeadwax Posts: 9,987
    edited December 1969

    Stezza said:
    yep... very good indeed :-)

    yes I am looking forward to using to help paint my wave :)

Sign In or Register to comment.