Digital Art Zone

 
   
2 of 2
2
Shader trouble
Posted: 04 July 2013 06:03 PM   [ Ignore ]   [ # 16 ]
Power Member
Avatar
RankRankRank
Total Posts:  1818
Joined  2004-08-24

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.  smile

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 smile

Image Attachments
UV_example.jpg
Profile
 
 
Posted: 04 July 2013 09:28 PM   [ Ignore ]   [ # 17 ]
New Member
Total Posts:  21
Joined  2007-06-21

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.

Profile
 
 
Posted: 05 July 2013 03:22 AM   [ Ignore ]   [ # 18 ]
Power Member
Avatar
RankRankRank
Total Posts:  1818
Joined  2004-08-24

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

Image Attachments
Hex_UV_options.jpg
Profile
 
 
Posted: 05 July 2013 05:07 PM   [ Ignore ]   [ # 19 ]
New Member
Total Posts:  21
Joined  2007-06-21

Ok I’ll keep that in mind

Profile
 
 
   
2 of 2
2