Shader trouble

jeht01_11f062ec46jeht01_11f062ec46 Posts: 18
edited December 1969 in Carrara Discussion

I'm using hexagon to model then opening the model in carrara. going into the vertex modeler to make shader locations. then adding shaders to the locations, But the shaders that i add some have patterns such as tiles or squares. but when i add them to the model they wont show up, even after i render the model only shows the color and none of the patterns. is there something that i missed? is there a way to fix this?

Comments

  • SockrateaseSockratease Posts: 813
    edited December 1969

    Assuming those patterns are image based, and not procedural, is the model UV Mapped?

  • jeht01_11f062ec46jeht01_11f062ec46 Posts: 18
    edited December 1969

    No its not UV mapped.

  • SockrateaseSockratease Posts: 813
    edited December 1969

    If those patterns are image based, it has to be.

    If not... maybe reversed normals?

  • jeht01_11f062ec46jeht01_11f062ec46 Posts: 18
    edited December 1969

    The patterns that I'm attempting to use are the standard ones in the list on the shaders. also if i try any kind of texture map or mapping it only shows as black after the render and before.

  • DartanbeckDartanbeck Posts: 21,549
    edited December 1969

    Would certainly need some details before trying to help with this - very broad statements there. Perhaps some screen shots of your shader settings?

  • SockrateaseSockratease Posts: 813
    edited December 1969

    Are you using the beta?

    Sounds like mip-mapping from 8.5 trying to be opened in 8.1.

    Only time I ever saw things render black.

    Check the "Sampling" in the shader too.

  • jeht01_11f062ec46jeht01_11f062ec46 Posts: 18
    edited December 1969

    one picture is the render and the other is the shader

    shader.jpg
    933 x 509 - 145K
    render.jpg
    577 x 554 - 17K
  • evilproducerevilproducer Posts: 9,050
    edited December 1969

    Maybe a screen shot of the underlying mesh would help? Also maybe the UV map?

  • jeht01_11f062ec46jeht01_11f062ec46 Posts: 18
    edited December 1969

    There isn't a UV map. i just opened the file in carrara and am trying to use the shaders. Do i need to lay in a UV map before attempting this?

  • WendyLuvsCatzWendyLuvsCatz Posts: 38,200
    edited December 1969

    quick simple mapping just to get everything textured

    texture.jpg
    1465 x 776 - 258K
    sdomains.jpg
    1446 x 793 - 252K
    planar.jpg
    1452 x 777 - 242K
    no_uv.jpg
    1434 x 800 - 245K
  • WendyLuvsCatzWendyLuvsCatz Posts: 38,200
    edited July 2013

    a better example
    the vertices I select and where they appaer in map
    if you select all of one side of house and create a new shading domain you can fit a texture to it
    or move vertices to fit a texture

    better_example.jpg
    1377 x 748 - 213K
    better_example.jpg
    1442 x 773 - 255K
    Post edited by WendyLuvsCatz on
  • jeht01_11f062ec46jeht01_11f062ec46 Posts: 18
    edited December 1969

    i did whats in the bottom picture to make different shader domains but the patterns applyed are not showing up.

  • jeht01_11f062ec46jeht01_11f062ec46 Posts: 18
    edited December 1969

    using the UV mapping i was able to add a normal map that worked great. Thanks

  • 3DAGE3DAGE Posts: 3,311
    edited December 1969

    HI Runman

    Selecting polygons and defining shading domains is only one step of the process,.

    Shading domains tell the program which part of your model get applied with the shaders you've made (you'll normally need to create shaders after you've defined the "shading domain" area's, and then apply your new shaders to those parts,. before you can actually see the textures on the model.

    You need to tell the program "How" to "project" the 2D images (from your shaders or texture maps) onto the 3D surface of the model.
    that's called UV Mapping,. and all object need to have some form of basic UV, to allow textures to be applied correctly.

    You select, define, or change the UV Mapping, for the entire the model, or individual shading domains. in the Vertex Modeller.

    for example : Box UV mapping,. will project the texture map from the top, left, right, front, back, and bottom of the object so that the 2D texture is applied to all parts of the 3D mesh.

    UV Unwrapping, or pelf mapping uses a process where you define a seam, (or several seams and pins) like a tailor cutting seams on a cloth pattern,. and the program flattens the 3D model out,. into a 2D UV grid area,. where you can then choose to export that layout as a texturing template (black and white wire-frame)

    The shader you've posted,.. (the "bricks" shader) is a "procedural" shader,. rather than an image of bricks,. this allows you to change the values of the procedural shader, to create different sizes or quantities of the brick pattern.

    at the moment,. it'll be white bricks with black mortar,. but you can create a better effect by using the Bricks pattern as the Blender for two different colours in a mixer shader. (pic)

    Procedural shaders also use the objects UV mapping,. but you can also bypass that, and use a basic "forced" mapping from within the shaders.

    here's some pages which may help you,...

    https://dl.dropboxusercontent.com/u/7907045/Carrara_first_steps.zip

    hope it helps :)

    basic_bricks.jpg
    932 x 690 - 144K
  • jeht01_11f062ec46jeht01_11f062ec46 Posts: 18
    edited December 1969

    I followed what you did but in this picture the vertex object only retains part of the shader were as the cube retained the entire shader. is there a way to make the vertex object retain all of the shader as well?

    difference.jpg
    708 x 532 - 49K
  • 3DAGE3DAGE Posts: 3,311
    edited December 1969

    HI Runman

    Yes,.. UV Mapping ,. is the way to get the bricks (procedural shader), or any other material, onto your Vertex object,. and it's the same way that the cube is using,.. let me try to explain..

    When you create a vertex model,. and you want to add a texture, like wood, or metal, to the surface of that model,. you'll need to tell the program "how" to apply that flat 2D photo ( X, Y ) of the wood, or metal image ,. onto the three dimensional model ( X, Y, Z )

    This is done by telling the program to "virtually" flatten out the 3D model,. so that it's flat 2D,. then the program can "project" to 2D photo image of wood or metal,. onto the flattened 3D model.
    ( none of the objects used in this process are harmed in any way)
    Your object remains the same shape,. but now it looks like it's made of wood or metal when you render it.

    This process of selecting a method of "projecting" an image, onto a 3D model,. is called "UV mapping" or, ( UVW projection mapping ) to give it it's correct title. ..most of the time it's simply called... UV's ( the mapping coordinates are named UVW,. rather than XYZ, which are already used by the 3D object)... to avoid confusion. :)

    When you add a "primitive" object, like a Cube, Sphere or Cone,. then these objects already have a default UV mapping method applied to them,. that's why the texture works correctly on the Cube primitive, which has UV's,.. but doesn't work the same way on the vertex model, which probably has the wrong UV mapping method applied to it, for the shape of the model.

    There are several simple "pre-set" methods of UV mapping,. such as Box,. Spherical,. Cylindrical,.. Which can be used on most simple objects,. and on many complex models,....or you can use UV Unwrapping, to selects and create seams and then split the object using your own "custom" mapping method,.. ...all of the UV Mapping,. is done in the Vertex Modeller.

    In the Top Right, section of the Vertex modeller,. there are three blue Icon buttons,. the one on the right is the UV mapping button, which changes the screen to a split view of your model, and the UV "grid" area, with a wire-frame version of your flattened out model. (See pic)

    You can apply Box UV mapping to an object,. then render to see how it looks,. then change the UV mapping to Spherical, Cylindrical, or whatever you want,. and render each time to see the differences in each projection method.

    You can also define separate "shading domains" (a selection of polygons) on a model, so that you can apply different materials to different parts of your model, each shading domain, can have it's own material, and each shading domain can have a different UV mapping type applied to it.

    Defining shading domains is an additional step, and depends on how you want to work with your model,.

    UV mapping MUST be defined on every model,. before it can be properly textured and rendered with a pattern or image based shader.

    So,. for any object you make,. you need to decide which is the best UV mapping method to use to apply a texture, or multiple shaders,. to that object.

    Sometimes, with objects like the cube,. or a simple building,. it's an easy choice,. and you just select .."box" mapping
    but sometimes, your object is a more complex shape, or has multiple parts,. and then you need to decide what areas you want to define as separate shading domains, and what method of UV mapping you're going to use on those parts.

    Hope it helps :)

    UV_example.jpg
    1280 x 1024 - 296K
  • jeht01_11f062ec46jeht01_11f062ec46 Posts: 18
    edited December 1969

    i found why this was happening. i made the model in hexagon and saved it as an object file instead of a carrara file this was giving me all the trouble. i looked at the files i was using and check over the types and noticed my error. Thanks for the help towards fixing this everyone.

  • 3DAGE3DAGE Posts: 3,311
    edited December 1969

    Hi Runman

    In Hexagon,. or any other modeller,. you'll still need to define some basic form of UV 's.
    there's a UV Mapping section in hexagon,. and windows for Shading domains, and materials (pic)

    you do know that Carrara has a vertex modeller which can make any objects you want, ..so you can avoid any issues with import / export from another application.

    You can use whatever modeller you prefer, but working in one program is usually less troublesome. than importing files from other programs.

    OBJ export from Hex should still retain any UV Mapping applied to the object,. and any shading domains you've created.
    Carrara files should also keep the same info

    If the object doesn't have any UV Mapping,, then it should be simple enough to jump into the Vertex modeller and apply a mapping type. but you shouldn't have to do that,. the model format should hold the UV mapping information for that model.

    if it isn't,.. then that's an issue,. but I just ran a couple of tests,. and the UV mapping appears to be correct, on both OBJ and CAR files, although there are some importation / scale / orientation issues,. ....but that's a different issue.

    Hope it helps

    Hex_UV_options.jpg
    1274 x 746 - 196K
  • jeht01_11f062ec46jeht01_11f062ec46 Posts: 18
    edited December 1969

    Ok I'll keep that in mind

Sign In or Register to comment.