Flat mapping texture

edited December 1969 in Carrara Discussion

I've got a problem with adding an image to a bent object. The image is the correct size and add to one side of the bent object.
When I render my image is smeared out on the object. Transforming the image won't help, is there any other way to adapt my image
in Carrara?

Comments

  • ghastlycomicghastlycomic Posts: 2,460
    edited November 2013

    I take it this is an object/figure that is bending either because it's rigged or it's morphing and wasn't UV unwrapped with the bend?

    Anytime you bend a model some polygons will contract and some polygons will expand. This causes crunching and stretching of the texture map. There's nothing really to be done about it.

    If you only need to render this model in the bent position then you can bend it, export it, re-UV Map the bend model and then create a new texture for the bent model. Other than that I don't think there's much to be done.

    Post edited by ghastlycomic on
  • edited December 1969

    Thanks for your answer, I already tried it and it didn't work.. So I guess I need to photoshop my renders when I use the bent objects..

  • ChoholeChohole Posts: 31,511
    edited November 2013

    You could try asking the question in the Carrara forum. THe Carrara experts are there, and don't often venture over here.

    Would you like me to move this thread to that forum for you ?

    Post edited by Chohole on
  • edited December 1969

    If you could do that for me, maybe they've got a solution for my problem. Thanks!

  • ChoholeChohole Posts: 31,511
    edited December 1969

    Moved to the Carrara forum, hopefully to get some more feedback for the OP

  • wetcircuitwetcircuit Posts: 0
    edited December 1969

    I've got a problem with adding an image to a bent object. The image is the correct size and add to one side of the bent object.
    When I render my image is smeared out on the object. Transforming the image won't help, is there any other way to adapt my image
    in Carrara?

    There are probably a bunch of ways, but I am just throwing things out in the air without knowing more about your specific case…

    At the top of the Shader tree you can change the mapping method to PROJECTION MAPPING. This bumps the whole shader down one notch and you have some new controls on how you apply a texture to the object…. You can even use a combination of these to assign one methode to one side, and another to another side….

    You can also take the object into the modeling room (double click it) and change it's UV mapping….

    You can use a 3D "global" shader that ignores the polys on your model to keep the pattern consistent….

    There are probably more options.... If you feel you can fix it in photoshop, that is a valid solution too.

  • edited December 1969

    I've got a problem with adding an image to a bent object. The image is the correct size and add to one side of the bent object.
    When I render my image is smeared out on the object. Transforming the image won't help, is there any other way to adapt my image
    in Carrara?

    There are probably a bunch of ways, but I am just throwing things out in the air without knowing more about your specific case…

    At the top of the Shader tree you can change the mapping method to PROJECTION MAPPING. This bumps the whole shader down one notch and you have some new controls on how you apply a texture to the object…. You can even use a combination of these to assign one methode to one side, and another to another side….

    You can also take the object into the modeling room (double click it) and change it's UV mapping….

    You can use a 3D "global" shader that ignores the polys on your model to keep the pattern consistent….

    There are probably more options.... If you feel you can fix it in photoshop, that is a valid solution too.

    Thanks for al your options, I've tried a lot of things but nothing works.. What do you exactly mean whit using a 3D global shader?

    I'll try to explain my problem, first I've made a normal cube in the modeling room and bent it with bent and twist. I added the UV mapping to the right sides of the object. Then I converted the object to 3Ds. and imported it back so the bent and twist option disappeared of the object and my object is bent in the modeling room.

    I also tried without converting the model, not adding the UV Mapping, just a primitive object, different visuals, different sizes of the visual.

    And then added the shaders, my visual shader has on all the different way's the strange smeared effect like it's stretched at one side of the visual and pushed at the other side..

    My shader is a simple shader, Projection Mapping - Flat Mapping - Texture Map whit the visual in it. There are also some effects from the Highlight, Shininess and Reflection option. In the shader I've tried Transforming, different Projection Mapping settings...

    I use Carrara for a year or two and learned it myself, so maybe there are a lot of options I don't know about. And I prefer a solution in Carrara than in Photoshop.

    I attached an print-screen of my shader and my object. Maybe you can see what my problem is?

    Schermafbeelding_2013-11-06_om_19.01_.44_.jpg
    1134 x 660 - 444K
    Schermafbeelding_2013-11-06_om_18.33_.24_.jpg
    1134 x 607 - 496K
  • evilproducerevilproducer Posts: 9,021
    edited December 1969

    Maybe convert to quads, and clean up the mesh. The middle of the mesh has very dense polygons and the outer edges aren't as dense. When it comes to UV mapping and vertex modeling I'm pretty much a rank amateur (with the emphasis on rank ;-) ), but I notice stretching and distortions on my own simple works when I have big variations in my polygon sizes in the same shading domain.

    The other thing that came to mind is to make sure that the aspect of the picture and the aspect of the shading domain are the same to avoid distortion of the image.

  • edited December 1969

    Maybe convert to quads, and clean up the mesh. The middle of the mesh has very dense polygons and the outer edges aren't as dense. When it comes to UV mapping and vertex modeling I'm pretty much a rank amateur (with the emphasis on rank ;-) ), but I notice stretching and distortions on my own simple works when I have big variations in my polygon sizes in the same shading domain.

    The other thing that came to mind is to make sure that the aspect of the picture and the aspect of the shading domain are the same to avoid distortion of the image.


    What do you exactly mean with convert to quads? I've never heard of it.. But what you say sounds very logic
    I tried it with a plane polygon and it gave me the same effect.. And I'm very sure that the aspect of the picture and the shading domain are the same. Also tried multiply times with different sizes of the image, but it needs to be the right size not only because I think that's right to fit. But it also needs to be correct because everything I draw in Carrara is going to be build up in real life and I'm just a little bit of an perfectionist ;)

  • evilproducerevilproducer Posts: 9,021
    edited December 1969

    I'm no expert in the vertex modeler or UV mapping. A quad is a polygon with four sides. The images you posted looks like the object is built out triangles. There's room for both, but from what I've read, triangles can cause artifacts in the mesh of the object.

    The other thing I was mentioning is that the polygons on the outer right and outer left sides of your screen shot look much larger and less dense than the the polygons towards the center of the model. From my own personal experience, I can say that sometimes this can make the texture look distorted or stretched. But I suck at UV mapping so it's probably something that can be compensated for, but for me, the easiest way to compensate was to make the polys fairly uniform in size for the shading domain I was having the issue with.

    The aspect was just a shot in the dark. Figured it was worth looking at.

  • tbwoqtbwoq Posts: 238
    edited November 2013

    Scale the UV selection that will contain the photo a little past the picture size in the UV editor view, then use the Operations tab->Fit UVs. One other thing I see is(in above UV editor screenshot), it appears there are relaxed UVs(points etc.) near some edges. This will cause image stretching in some areas.

    Post edited by tbwoq on
  • dot_batdot_bat Posts: 373
    edited December 1969

    Try using a primitve bent as you have here and maybe map it as a cylinder. or just redo that mesh or untriangulate what you have and remap it in the uv editor, dont know why there are so many vertices in that simple object should be all quads and a minimum

  • HeadwaxHeadwax Posts: 7,831
    edited December 1969

    could try this

    1) dump what you have
    2) go into vertyex room and add a cylinder
    #0 hold down plus sign to increase number of verticies
    3) look at it from the side, delete all polys above the first row
    select the top line of egdes and move them straight up till you get the height you want
    4) look at it from the top
    5) delete all verticies etc you don't neew so yu are left with the approx. shape you t want
    6) go to shader room apply your texture
    7) in vertex room go to uv window and select box face

    8) you will get a little bit of strectching but not much because your shape is pretty flat


    I recently modelled the curve façade of a building similar to this and added tiles - worked like a charm without screwing around

    if you want to you can select checks in the shader room and this will let you see how much stcetching you have

    sorry about the typos I type with my nose

  • DartanbeckDartanbeck Posts: 15,281
    edited December 1969

    In the bottom image in your above post, the selection in red. See where half of them are off the map space? That may be the culprit. You might want to try "Detaching" those UVs in that map editor and put it above the other, non selected polygons. Or if they share the same space might work too.

  • edited December 1969

    tbwoq said:
    Scale the UV selection that will contain the photo a little past the picture size in the UV editor view, then use the Operations tab->Fit UVs. One other thing I see is(in above UV editor screenshot), it appears there are relaxed UVs(points etc.) near some edges. This will cause image stretching in some areas.

    How can I scale the UV selection? Or it just doesn't work haha tried all of the tips now but still my shader won't fit normal on the object..
    Even made the object like 10 times in new file's, primitive, spline and vertex objects with more polygons with less polygons, squared polygons, triangle polygons. Made shader in different sizes, options.. Made an image with blocks so I could see what changes, but nothing changes...

    Drives me a little bit crazy.. Need this object and shader for longterm use. I'm building my own library for the systems we use for booth building. And we need to use that object and shader daily for are standard designs..

    Isn't there a way like stretching the image in Carrara. Really don't want to use Photoshop for every rendering I make...

    Hope someone has a solution that works :)

  • tbwoqtbwoq Posts: 238
    edited November 2013

    Hi Verel Expo.

    I created a similar vertex cube scaled and bent into a shape using the bend and twist modifier. There are other modeling methods to create the shape, but I used a similar one for testing and it worked OK. After setting up shading domains and loading the image in the shader(etc.), here is a very brief description of steps for further UV adjustments.

    At this point, the image should be showing on the model shape but there may be distortion from the default mapping. To change the mapping;

    -In the Model room, select the 'UV Editing Mode' icon to enter the UV editor.
    -In the Model tab, change the Mapping: to Box Face.
    -Use the Textured mode window preview(small icon at the top right of the main window title bar), then switch to the Display tab and uncheck Show All and set the Display Mode to Texture. The image should now be showing in the UV View window.

    From here you can use the UV View window to select polygons/points and then scale/rotate/move the selections to fit the image. In my above reply I based the scaling method on the UV View screenshot, but you may not have to use that method if your image is already the same size as the polygons. My Carrara setup may be different than others, let me know if you need more info.

    Post edited by tbwoq on
  • edited December 1969

    tbwoq said:
    Hi Verel Expo.

    I created a similar vertex cube scaled and bent into a shape using the bend and twist modifier. There are other modeling methods to create the shape, but I used a similar one for testing and it worked OK. After setting up shading domains and loading the image in the shader(etc.), here is a very brief description of steps for further UV adjustments.

    At this point, the image should be showing on the model shape but there may be distortion from the default mapping. To change the mapping;

    -In the Model room, select the 'UV Editing Mode' icon to enter the UV editor.
    -In the Model tab, change the Mapping: to Box Face.
    -Use the Textured mode window preview(small icon at the top right of the main window title bar), then switch to the Display tab and uncheck Show All and set the Display Mode to Texture. The image should now be showing in the UV View window.

    From here you can use the UV View window to select polygons/points and then scale/rotate/move the selections to fit the image. In my above reply I based the scaling method on the UV View screenshot, but you may not have to use that method if your image is already the same size as the polygons. My Carrara setup may be different than others, let me know if you need more info.


    Hi!

    Finally I thought to have to solution after your tip.. I see the changes in the textured preview mode in de modeling room. But when
    I render the object the image on it remains the same... So still no solution.. Learned more how to change shaders, thats positive!

    Maybe there is something I need to do when I render to keep the shader the same as in preview mode?

  • McGuiverMcGuiver Posts: 203
    edited December 1969

    Verel,

    It seems to me that the complexity of your curved surface is making things more difficult than they need to be.
    In your screenshot it looks like some of the vertices on the back side of the curve are selected on the mapping of the front side.

    Simplifying the curve can make this project a breeze.

    Make a simple curve....as Headwax posted.

    Map the curve with box face mapping. (may need to rotate or flip the image map in the shader editor)

    scale the vertex object in the z- direction to get the aspect ratio you desire.

    Done...unless you need thickness on your object. This can easily be done (after mapping) in the vertex modeler by selecting the object, then "model"....then "add thickness".

    Vertex_obj.jpg
    667 x 681 - 32K
  • McGuiverMcGuiver Posts: 203
    edited December 1969

    A custom curved surface can be easily made in the vertex modeler by using the "Interpolated Curve" tool.

    In the vertex modeler, select "Interpolated Curve"
    1.Click on the floor of the modeling box where you want the curve to start.
    2. Click where you want the center
    3. Click where you want the end of the curve.
    4. press enter.
    (you can add more points in the middle to create more complex curves).....experiment.

    Now that you have your curved polyline, select it, then "copy", then "paste"
    Move the copy up in Z-direction to your desired height.

    Use the ruled surface tool to create a mesh between the curves by selecting "ruled Surface", then the top curve, then the bottom curve.
    Wha-laa, now you have a low poly custom curved surface.

    Add your texture map

    UV edit-----box face mapping

    add thickness...if desired.

    Screenshot.jpg
    667 x 952 - 51K
  • edited December 1969

    I'll try this one! Didn't used that option! The object in my screenshot is one of many also got an object similar like yours.
    Everything I tried just doesn't work.. Maybe its a bug or something in my Carrara. Well will try this one, hope it works!
    Thanks :D

    Schermafbeelding_2013-11-12_om_09.36_.39_.jpg
    988 x 791 - 84K
  • edited December 1969

    Nope doesn't work.. Thinks it's my Carrara.. Which version are you using? I'm using 8.5.
    Everything I try the image stays the same when I render...

  • McGuiverMcGuiver Posts: 203
    edited December 1969

    Verel,
    I am using Carrara version 8.1.0.135 on a PC and it works fine.

    It may be an issue with 8.5??

  • edited December 1969

    That could be.. I work with a Mac maybe it will work on a windows PC. I will try that one haha
    Hope it's gonna work! Thanks for your tip anyway! Learning a lot with all the answers here.

  • evilproducerevilproducer Posts: 9,021
    edited December 1969

    The only other thought I have is to perhaps put up the object or scene file for others to download and look to see if they can find the issue, correct the issue, or reproduce the issue. Perfectly understandable if you're not able to do this.

  • tbwoqtbwoq Posts: 238
    edited December 1969

    I'm using 8.1. There were a few shader features added in 8.5 which could be causing UV or other issues. 8.5 texture maps default to using Filtering: ->Fast Mip Map. Maybe changing this to Sampling might work(?). If it is a bug, other 8.5 users should be able to easily test to confirm.

  • edited December 1969

    Evilproducer had a very good idea :D So I attached a zip. with the carrara file and the visual. Maybe someone can help me
    with my file! Maybe I do something very wrong, i'm hoping that a little bit..

    Also tried it to fix it on a Windows PC but its also the Carrara 8.5 and it still didn't work so it isn't my Mac that causing the problem..

    Pompompom.. Well hope somebody can fix it! If the file doesn't work let me know! I'll upload another :)

    Can't attach my file, so.. V

    http://we.tl/yMgtQshxwc (Wetransfer Download link)

Sign In or Register to comment.