Shader Creating & Settings for Carrara - Q&A - Come One, Come All

2456

Comments

  • 3DAGE3DAGE Posts: 3,311

    Feel free to change and re post,. :)

     

  • wgdjohnwgdjohn Posts: 2,634
    3DAGE said:

    Lighting models were developed to help create different types of surface materials.

    [cut - see above for great explanations]

    The default lighting model can be used to create a wide range of materials, from plastics to skin.  Phong and Anisotropic extend the options to create more materials.

    Great explanations... thanks very much.  So I can create a shader in say multi-channel and then extend/change it further by using Phong and Anisotropic?

    3DAGE said:

    Head Wax :)

    that's why a  plugin that would let us click on a texture in the shader room and have it load up in (eg) photoshop would be a blessing

    I normally just hover the mouse over the texture map, to get the Pop-up which shows the location of the image,. then browse to that folder

    I think the main issue with loading texture maps directly into an editor, is the possibility of editing and overwriting the original texture,. it's better to open / edit in PS, /save as new, /update in Carrara.

    I tried hovering over the image with no luck... so me thinks to myself... what if instead hover over the image name. Hooray that worked.

    Hadn't considered the overwrite issue... but could be solved when transferring the image or after loading. Plugin would either rename the file to filename_appendme.jpg in-transit or after loading into said program PS, PSP or GIMP etc... while keeping the path of course.

    3DAGE said:

    Here's a quick still life scene,. using procedural shaders,.  ...feel free to change and experiment with different colours or settings in any of the channels of any shader

    since there may be some people here who are used to loading and rendering a pre-made "thing",. which is set up,  ready to render,. it's worth starting out with basic shader creation.

    Appears that Mission 1 is getting underway. Thanks for uploading a full scene to work on.
    Glad you pointed out the sneaky Bump settings at the top level... even though I knew it is there I've been overlooking it.

  • PhilWPhilW Posts: 5,145

    Just a note before anyone gets too excited about the Phong lighting model - it is the default for shaders, so it doesn't actually do anything different to just using the normal Multi-Channel Shader. And I don't think you can mix lighting modes within the same shader tree.

  • 3DAGE3DAGE Posts: 3,311
    edited September 2016

    Mmm...

     not sure about that,. i thought the default was blinn,.  maybe i'm wrong

    You could have a multichannel mixer,. that way you can have two different multichannels ,. with different lighting models

    The Layers list shader, also allows different lighting models on different layers.

     

    John,. yes,. you should be able to change the lighting model of any shader without destroying the rest of the shaders channels,.

    but ideally,. you'd create the shader for the model you're working on. and choose the lighting model you need for that specific surface,

    that's probably why it's a Top level shader option.

    Also,. My bad,. :(   Mouse over image name,. that's the thing...

    It's a nice idea to have an auto rename,. but it would need to know that once renamed,. you may want to edit that version several times while working,. without creating multiple renamed versions. ..anythings possible

    easier to copy / paste the images you want to edit or paint over, into a new folder,. then work on those without worrying

     

    Post edited by 3DAGE on
  • FifthElementFifthElement Posts: 569
    edited September 2016
    3DAGE said:

    Mmm...

     not sure about that,. i thought the default was blinn,.  maybe i'm wrong

     

    Yep, default in Carrara is Blinn-Phong (or just shorter, Blinn) model...

    There is subtle difference in how specular looks like (some what sharper), Blinn is just a bit faster with reflective surfaces though.

    That is a reason why it's on default in pretty much all of the renderers out there smiley

    Post edited by FifthElement on
  • HeadwaxHeadwax Posts: 9,985
    diomede said:

    This may already be covered in one of the linked tutorials.  However, I have created a few terrain shaders based entirely upon mixers and gradients. 

    The base default terrain shader uses single colors for rock (global), land, grass, and snow layers.  Here, I simply replaced each single color with a mixer of two similar gradients.  The drivers of the gradients and the mixers are any of (a) fractal noise, (b) natural spots, (c) natural marble, (d) natural cellular, and (e) natural lumber yard.  Marble and lumber yard are better for rock to get the streak layers of exposed rock sediments.  Spots and fractal noise can be better for grass and weeds. 

    Here is the default terrain (with a zero edge filer applied) with the default texture.

    Here is the same terrain with the shader layers replaced with mixers of gradients.  To my eye, the second would be better for relativel fertile land.

    that looks pretty good thanks for sharing that ;)

     

  • wgdjohnwgdjohn Posts: 2,634

    PhilW,  Cool glad you liked it. Thanks for pointing out that highlight and shininess are generally equal etc. I do have a possible OT question... it appears that the open room was created from a cube in the vertex room, I recreated it just for kicks, and the normals are facing outwards, not into the room, will this cause a problem in the future?

    If anyone needs/wants to reverse normals just select the room or anything else to be reversed and under Model choose Reverse Polygons Normals.

    Dionede,  Nice looking settings and render looks good to my eye also. Thanks for the settings... I'll have to give them a go.

    Andy,  Yes ... that's the safest way. I experimented both with mousing ove the image as well as filename and find it a bit odd that a copy/paste/etc dialoge pops up but when copy is used neither the image or filename are copied. :(

  • PhilWPhilW Posts: 5,145
    wgdjohn said:

    PhilW,  Cool glad you liked it. Thanks for pointing out that highlight and shininess are generally equal etc. I do have a possible OT question... it appears that the open room was created from a cube in the vertex room, I recreated it just for kicks, and the normals are facing outwards, not into the room, will this cause a problem in the future?

    In general Carrara is a lot less fussy than some 3D programs about the normal direction. It can cause issues where the normals are not consistent (in which case the Reverse Normals command sorts that out) but I don't think it will cause any issues for the Open Room that I posted - good spot though, that is exactly how I made it!

  • DUDUDUDU Posts: 1,945

    Newbie's question: could you explain what is a "Normal", and why is it important for a shader ?

    Thanks. smiley

  • MarkIsSleepyMarkIsSleepy Posts: 1,496
    edited September 2016
    DUDU said:

    Newbie's question: could you explain what is a "Normal", and why is it important for a shader ?

    Thanks. smiley

    I'm sure there is some more complex mathematical explanation, but I always think of it like this: each polygon has a front and a back and the normal tells the program which is which. 

    Some programs will not display (or can be set to not display) the back of the polygon, but Carrara shows both sides.  

    Even in Carrara it can cause some issues, especially in the case @PhilW mentions above where they are not all unified.  Attached are two images: the first shows a vertex object with one of the ploy's having a normal going the opposite direction to the others and the second shows what happens when I try to extrude a section that includes that "flipped"polygon.  Even with "Link Polygons" checked, Carrara doesn't quite know what to do with that one going in the wrong direction. But that is more of a modeling issue than a shader issue.

    For Carrara shaders it mostly matters in two cases (in my experience, there may be others):

    1. For bump maps it tells Carrara which way is "in" and which way is "out"
    2. For refraction it tells Carrara which way is "inside the object" and which way is "outside the object."

     

     

    NormalsNotUnified01.JPG
    1623 x 950 - 95K
    NormalsNotUnified02.JPG
    1625 x 952 - 101K
    Post edited by MarkIsSleepy on
  • wgdjohnwgdjohn Posts: 2,634
    edited November 2016

    I know I'm not normal. :)  Seriously if I undestand this correctly a Normal should point in direction of the face you wish to use. It is possible, I've done it, to make a vertex object whis has mixed normals as in a wall or you would have an inside and outside, the normals should point in those directions, in and out. If you copy or dupliate an object like a plane then the copy will have normals facing the same direction. Acccording to the manul smoothing is calculated by using the normals...possibly other stuff. As for the importance for a shader I do not know.

     

    Normals.png
    1192 x 870 - 173K
    Post edited by wgdjohn on
  • DUDUDUDU Posts: 1,945

    Very interresting explanations, thanks !

    I know now why I had some problems in modeling and texturing.

    Q: how are the normals when we add thickness to an object (negative and positive values)?

  • When you add thickness, Carrara will flip the normals of the new sides so that they are all pointing outward regardless of whether you use a positive or negative thickness.  One thing to be aware of though: if you add a negative thickness, although all the normals of the new object are pointing outward, the normals of the original surface will end up pointing in the opposite direction they originally did.

  • 3DAGE3DAGE Posts: 3,311
    edited September 2016

    Hi Dudu :)

    The direction of the surface normals can be seen in the viewports,. (Interactive Rendering Settings) ..(see pic)

    They show up as little lines from a tiny spherical base, the base is positioned on the model surface, and the line points out from that to show the direction of the surface normals .

    You can switch the "show normals" on or off as needed,  it's good practice to check this at least once, while you're modelling in the Vertex modeller.

    When you add thickness,. Carrara uses the models existing surface normals,. and creates the correct normal direction for either the internal or external geometry being added.

    Any modelling tools which add new geometry, such as dynamic extrusion,.  will also use the existing surface normal direction when creating new geometry.

     

    MDO2010

    :)  Nice explanation.

    normal dir IRS.jpg
    1668 x 940 - 279K
    Post edited by 3DAGE on
  • DUDUDUDU Posts: 1,945

    I learn a good thing today, I will use this feature from now.

    Thank you both, have a nice Sunday !

  • 3DAGE3DAGE Posts: 3,311

    quick update,. changed some shaders,.

    https://dl.dropboxusercontent.com/u/7907045/Life21_.car

    NOTE: this scene needs to be simulated to drop the cloth objects, which may take a couple of minutes. (it's a much smaller file without the sim data) ( 928kb )

    life21.png
    1280 x 720 - 816K
  • wgdjohnwgdjohn Posts: 2,634
    edited September 2016

    Below is the latest OpenRoom.car in the zip, a pic of a render and the shader settings for the floor. The problem I'm having is with the "marble" shader settings... I've tried various scale opts and Direction for mapping with no luck. Instead of playing around anymore I decided to leave it as is to see if anyone knows what to do or just wants to trash the idea.

    Note that I've added Team A for 3DAGE's "HAlf Life" and Team B for PhilW's "OpenRoom". But of course any and everyone can work on either scene.

    Change anything in the scene, repalce shaders, modify shaders etc!

    OpenRoom_FloorShdr.png
    1024 x 768 - 740K
    FloorSettings_problem.png
    830 x 788 - 143K
    zip
    zip
    BAS_M1_TeamB_01.zip
    5K
    Post edited by wgdjohn on
  • DUDUDUDU Posts: 1,945

    Hi John !

    I don't know exactly what is your problem with the floor, but you could take a look on this one.

    http://www.sharecg.com/v/85427/browse/5/3D-Model/Display-rack-for-wine

     

     

    Présentoir à vins.jpg
    640 x 480 - 257K
  • wgdjohnwgdjohn Posts: 2,634

     Dudu,  The entire shader needs to be rebuilt from scratch. I'd started with one that used Enhance C: Tiles, from DCG. Figured everyone would not have that so replaced with checkers, I overlooked Carrara Tiles, and started playing around. Everything was going welll until I added a marble to give it some design.

    Grabbed your wine rack on ShareCG... nice looking.

  • FifthElementFifthElement Posts: 569
    edited September 2016

    Here is my "famous" ICE shader, just in case someone needs some ice cubes in that glass of brandy, lol smiley

    zip
    zip
    Ice.zip
    6K
    Ice.jpg
    640 x 360 - 48K
    Post edited by FifthElement on
  • wgdjohnwgdjohn Posts: 2,634

    Hit me with some ./~ Ice Ice Baby ./~   :)

  • 3DAGE3DAGE Posts: 3,311

    Here's my OpenRoom,. with some wallpaper-ish shaders,. a marble tiled floor, and i've modelled a quick little Bike,. (I needed something to build shaders for) and made some distressed shaders.

    https://dl.dropboxusercontent.com/u/7907045/OpenRoom_bike.car

    I've changed the background colour, so that it adds some light to the scene,. and duplicated and repositioned the Light, and changed the colour to a light blue for sky.

     

    Feel free to re-model the bike, (it's very basic , with smoothing) (2000polys)   if you want to do something more accurate with the shaders.

     

    John ,. the Marble shader works best as the blend in a mix of two different procedural effects,. such as a colour gradient and fractal noise

    bike1.jpg
    960 x 720 - 53K
    bike2.jpg
    960 x 720 - 65K
  • PhilWPhilW Posts: 5,145

    Great work 3dage!  I really like the marble floor on this.

  • 3DAGE3DAGE Posts: 3,311
    edited September 2016

    Thanks Phil :) I was going for Carrara marble :) ..not there yet.

    the bump isn't quite right,.. yet,. I want deeper grout and less marble,. but yeah mixing two fractals with the marble as the blend to drive a colour gradient seems to work.

    quick postworked in ExposureX

    bike2x.jpg
    960 x 720 - 424K
    Post edited by 3DAGE on
  • wgdjohnwgdjohn Posts: 2,634
    edited September 2016

    Andy, Bike looks fine as all you basic designs do. Thanks your showing me my error messing with marble. The tile looks great. Wonder if there is a way to not have the marble run into/over the grout?

    Post edited by wgdjohn on
  • PhilWPhilW Posts: 5,145

    Yes there is.... smiley

  • 3DAGE3DAGE Posts: 3,311
    bike_tiles.jpg
    960 x 720 - 381K
  • wgdjohnwgdjohn Posts: 2,634

    Great...very strange/interesting looking wall. I do notice that a) most pronounced at left side is the double mortar line... intentional? I see that the "% Mortar" values in Bump/Blender/Tile is set to 1 so set it to 3 to match others but no luck.  b) the horizontal mortar lines look a bit dotted... wonder if this is due to camera or light angle, bump or what.

    I had to look closer at the wall shader... amazing that it is mostly accomplished by adding scan lines in various ways to create the unusual effect. Cool.

  • PhilWPhilW Posts: 5,145

    Great work Andy, I see you have improved the wallpaper too!

  • 3DAGE3DAGE Posts: 3,311

    John ,. is the double mortar line Intentional ? ,

    ... nah,. just lazy,. i like to take the,... change that and see what happens,..  approach.

    On the horizontal tile lines being dotty,. that's the render and image settings,. a bigger image,. or finer settings for render and shadow acuracy should make that go away.

    the wallpaper was an interesting accident,. and only happened when I changed the mixer to gradients,.

    it's one of the interesting and unexpected results of procedural effects being three dimentional, (like real wood grain through a log),. sometines if you change the direction, something interesting can happen.

    I also did a little more modeling on the glasses and peaches thing,. I wanted a better look to the split halves,. and the stone,. so i did a little displacement painting, and played with some different fractal noises to get a better look.

    https://dl.dropboxusercontent.com/u/7907045/Half_life_3.car

    peaches new1.png
    1280 x 720 - 1M
Sign In or Register to comment.