Exporting UV mapps in Carrara??

2»

Comments

  • Design AcrobatDesign Acrobat Posts: 459
    edited December 1969

    If I have one UV (say a wall) that just uses the top half of its map, and a second UV (say a door) that only uses the bottom half, can I merge them into a single texture sheet? I know I can do it physically - combine the textures in Photoshop, and assign the same jpeg to both shaders. But is that an efficient thing to do? i.e. will it realise they are the same texture, or will there be 2 instances of the bitmap in memory?


    Just thinking about ways to be memory efficient... :)

    Sometimes overlapping UVs is the way to go because it is an efficient way to use textures. Most of the time, the object UV has regular (vs. irregular) edges and the same texture can be used.

    1. Two ends of a box, Top and bottom of a box, front and back of a box
    2. Most furniture-like objects can overlap UVs on the same texture

    The problem with using the same texture in objects that are irregular is that stretching of the texture can occur or the texture is not only mirrored but flipped upside down and there is not an efficient way to use the texture that would conform to the texture pattern.

  • evilproducerevilproducer Posts: 9,050
    edited December 1969

    good to know that :)

    meanwhile... I'm still working on my star uv map, resizing all the vertical parts of the steps!
    And I'm loving it!!!

    People always pointed out that I have this strange thing of loving to do very PITA, boring, repetitive things with such a big perfection that they can understand how I have patience... Of course, I don't need patience cause I love to do them!!
    Good that I'm becoming fan of UV mapping :)

    But now really have to stop for today. Have a dog that does not allow me to be up after a certain hour... I love it too, PITA that it is...
    Nice job!
    Couple of questions regarding UV mapping in Carrara - for this type of shape I prefer to unfold using seams and pins because it gives a single map, making it easy to have a continuous texture without having to try to align.

    This was done in UU3D - it does need some tidying up, but is only used as an example.

    My questions - is there a method of welding UV's in Carrara and does 8.5 have planar projection ? I'm still on 8.1

    Cheers :)

    8.1 has planar too. You need to use the custom setting and go to the Operations tab and select Planar from the drop-down, then select the axis of projection. Yeah... 8.5 has it too.
    I don't think we can weld though. Never tried it - but I haven't seen a function for it either - but I do get carried away.... ;)

    Hi Roygee!

    C7 has Planar as well. Don't know about weld, unless it's called something else in Carrara.

    Picture_5.png
    243 x 356 - 24K
  • DartanbeckDartanbeck Posts: 21,549
    edited December 1969

    If I have one UV (say a wall) that just uses the top half of its map, and a second UV (say a door) that only uses the bottom half, can I merge them into a single texture sheet? I know I can do it physically - combine the textures in Photoshop, and assign the same jpeg to both shaders. But is that an efficient thing to do? i.e. will it realise they are the same texture, or will there be 2 instances of the bitmap in memory?


    Just thinking about ways to be memory efficient... :)

    Sometimes overlapping UVs is the way to go because it is an efficient way to use textures. Most of the time, the object UV has regular (vs. irregular) edges and the same texture can be used.

    1. Two ends of a box, Top and bottom of a box, front and back of a box
    2. Most furniture-like objects can overlap UVs on the same texture

    The problem with using the same texture in objects that are irregular is that stretching of the texture can occur or the texture is not only mirrored but flipped upside down and there is not an efficient way to use the texture that would conform to the texture pattern.Right. This is where UV Mapping truly can become a tough prospect to tackle for highly detailed, high polygon models. One feature I'd love to see in a future version of Carrara is the ability to use more than one grid area, like most other UV Mapping solutions out there. Still, what Carrara has does work - especially since we can view each individual domain separately. I often map each domain to the entire grid, and then move on to the next - but that's for high poly models, too. The example on the first page, where he places all of the domains around in their own corners is a very good way to work, whenever you can. It is said that we should always try and use up the whole of the grid - getting as many domains mapped as possible on a single map. But we often need more precision that that. But that's why you'll see maps with the control panel buttons over here, and the shroud canopy over there, all on the same map.

  • TangoAlphaTangoAlpha Posts: 4,584
    edited December 1969

    Having a problem here with one of my UV maps.

    The object is a segment of wall, with a barred window sitting on top of it. It sits between two columns in my model (I've modelled each of the walls separately, so that they can be hidden for camera positioning and such.

    I've laid out the UV map in Carrara, and all seems to be fine (fig. 1), but when I export the map to make the texture, the walls are suddenly wrapping around and intersecting with other elements of the UV map (fig2). When I check in the Assemble Room, the model - as I'd probably expect - shows the texture with the wrapping problem.

    I've tried all sorts of things - different mapping modes, moving the walls on the sheet etc, but nothing seems to prevent this weird wraparound. Any ideas on how to solve it, anyone?

    Thx :)

    Screen_Shot_2014-03-11_at_21.47_.08_.jpg
    1335 x 796 - 228K
    TH_LowerWall_N.jpg
    1024 x 1024 - 91K
    Screen_Shot_2014-03-11_at_21.22_.17_.png
    979 x 915 - 29K
  • Design AcrobatDesign Acrobat Posts: 459
    edited December 1969

    Tim_A said:
    Having a problem here with one of my UV maps.

    The object is a segment of wall, with a barred window sitting on top of it. It sits between two columns in my model (I've modelled each of the walls separately, so that they can be hidden for camera positioning and such.

    I've laid out the UV map in Carrara, and all seems to be fine (fig. 1), but when I export the map to make the texture, the walls are suddenly wrapping around and intersecting with other elements of the UV map (fig2). When I check in the Assemble Room, the model - as I'd probably expect - shows the texture with the wrapping problem.

    I've tried all sorts of things - different mapping modes, moving the walls on the sheet etc, but nothing seems to prevent this weird wraparound. Any ideas on how to solve it, anyone?

    Thx :)

    Shading Domains would be the way to go IMO. That way you have complete control to isolate, export and apply textures.

  • DartanbeckDartanbeck Posts: 21,549
    edited December 1969

    I agree, but man... that's still weird.

  • RoygeeRoygee Posts: 2,247
    edited December 1969

    Can you identify what part of your model that line running down the left edge and across the bottom of the grid is? It seems to have no substance, so seems to be not correctly unwrapped. I'd say It is too close to the edge and I bet that is what is causing the rest of the map to shift to the right and wrap around.

    Carrara does strange things with UV's that are on the edge of or off the grid.

  • DartanbeckDartanbeck Posts: 21,549
    edited December 1969

    I saw that too. But I ended up dismissing it as a cropping line along the distance between the two windows.

  • RoygeeRoygee Posts: 2,247
    edited December 1969

    Dart, you are correct:) I just noticed mine also has that outline, which has nothing to do with the model or UV's !

    Funny I never took note of that before - excuse my ignorance :)

  • 3DAGE3DAGE Posts: 3,311
    edited December 1969

    HI all :)

    Q: What UV mapping mode is being used, ... cylindrical ? custom unwrap ?

    it should be Planar or Box for a wall panel like that,

    also, which shading domain is applied to the wall,. is it the same domain as the Column (cylindrical)
    if so, then that could explain the wrapping .

    Different objects should have different shading domains, so that they can have different UV mapping types without conflicting.

  • TangoAlphaTangoAlpha Posts: 4,584
    edited December 1969

    Shading Domains would be the way to go IMO. That way you have complete control to isolate, export and apply textures.

    Each element is already in its own domain - inside wall, outside wall, glass, wood frame...

    Maybe I'll just delete it and start again - it's only a box with 2 sides, after all. But it would have been nice to know what went wrong, in case it happens again with something more complex.

    Can you identify what part of your model that line running down the left edge and across the bottom of the grid is? It seems to have no substance, so seems to be not correctly unwrapped. I'd say It is too close to the edge and I bet that is what is causing the rest of the map to shift to the right and wrap around.

    Carrara does strange things with UV's that are on the edge of or off the grid.

    That's just how Carrara draws the UV map border - we used to call it a bevelled window frame effect back in the 90s!

  • TangoAlphaTangoAlpha Posts: 4,584
    edited December 1969

    3DAGE said:
    HI all :)

    Q: What UV mapping mode is being used, ... cylindrical ? custom unwrap ?

    it should be Planar or Box for a wall panel like that,

    also, which shading domain is applied to the wall,. is it the same domain as the Column (cylindrical)
    if so, then that could explain the wrapping .

    Different objects should have different shading domains, so that they can have different UV mapping types without conflicting.

    Box. But when it went wrong, I tried other types, with no effect on the problem. Each face is in its own shading domain - inside wall (will be painted plaster), outside wall (stucco)

  • 3DAGE3DAGE Posts: 3,311
    edited March 2014

    HI Tim A :)

    Each face is in its own shading domain - inside wall (will be painted plaster), outside wall (stucco)

    I may be misreading your UV maps, but it looks like there are two walls on the uv layout.
    If each object has a different shading domain, then only the selected domain should show in the uv layout, not both.

    when you say each face has it''s own shading domain,...
    you mean that each object (poly-mesh) has it's own shading domain, and that both walls are separate objects (poly-meshes)

    Edit : disregard all that,...

    Try Planar projection. instead of box. see if that works any better

    Post edited by 3DAGE on
  • SileneUKSileneUK Posts: 1,975
    edited December 1969

    Tania thanks for bringing this up....and Evil... seeing it applied to your complex terrain model that I am following, and combining that with Dart's Terrain Tut...I am making more progress than imagined.

    Cheers to all who contributed to this thread. We need more like it!

    xx :) SileneUK

  • TangoAlphaTangoAlpha Posts: 4,584
    edited December 1969

    3DAGE said:
    HI Tim A :)

    Each face is in its own shading domain - inside wall (will be painted plaster), outside wall (stucco)

    I may be misreading your UV maps, but it looks like there are two walls on the uv layout.
    If each object has a different shading domain, then only the selected domain should show in the uv layout, not both.

    when you say each face has it''s own shading domain,...
    you mean that each object (poly-mesh) has it's own shading domain, and that both walls are separate objects (poly-meshes)

    Edit : disregard all that,...

    Try Planar projection. instead of box. see if that works any better

    No. Both walls are part of a single polymesh (box, with 4 of the 6 faces deleted). Each face of the box is assigned to a shading domain.

    Why must only one shading domain show in the UV layout? I don't understand. Surely it just results in more maps for the same object, or is that more efficient (less whitespace maybe?) It doesn't affect the problem, anyhow. Planar projection makes no difference either.

  • 3DAGE3DAGE Posts: 3,311
    edited December 1969

    HI All :)

    Tim , i'm just trying to figure out what it is I'm looking at. :)
    Normally each wall would be a separate mesh object, and mapped specifically for that object, whether each wall has a separate Shader,(texture) or all of the walls have the same shader, is down to personal preference and how you want to work.

    I think the problem may be linked to the "single object" with deleted parts,. as a starting point.
    Each polymesh object you create should ideally have a unique Name, (this helps you identify and select objects) and each should have it's own UV mapping type.

    Try re-building the walls from rectangles, or use copy paste from what you have built, and name each wall, then UV map them.

    Hope it helps :)

    Hi Silene :)

    Apologies for not getting back to you, been tied up in other stuff, then couldn't find the tread again.

  • TangoAlphaTangoAlpha Posts: 4,584
    edited December 1969

    The really perplexing thing is that there are 4 walls, all of them similar - outer + inner + barred window on top, although the configurations vary from wall to wall - one is longer, one has a gap for a door and so on. But of the 4 walls, only this one has the UV wraparound problem.

    I tried using rectangles instead of a box, but the same thing happened.

    Ok, I'm still pretty new to this, so I'm quite happy to be told I'm going about it the wrong way. My rationale was to build walls that could be moved/hidden for purposes of getting the camera inside and so on, which I figured meant each wall needed to be in its own obj (same deal with doors). Since the wall is in fact an assembly - brick bit + window frame + window - each component was built as a separate polymesh within the vertex object, with its own mapping type.

    That seemed to work okay in other places.

    Maybe I should not worry about hiding the windows, and just make the brick wall into a separate obj?

  • 3DAGE3DAGE Posts: 3,311
    edited March 2014

    Hi Tim


    The really perplexing thing is that there are 4 walls, all of them similar - outer + inner + barred window on top, although the configurations vary from wall to wall - one is longer, one has a gap for a door and so on. But of the 4 walls, only this one has the UV wraparound problem.

    the easy solution is to duplicate one of the other's and deleye the mesed up one, but you don't learn much by doing that, so the issue could be repeated.

    it's certainly puzzling, partly because I tried to replicate it with a box but couldn't, so it could be a step of the process your doing, or just something you've clicked, even with the scene file, it's tricky to figure out what's been done differently.

    I tried using rectangles instead of a box, but the same thing happened.

    Well, that's even more curious,.. obviously,. if it's a different object, it shouldn't have the same issue.

    any chance you could PM me a Zip link, or Dropbox link, i'll have a quick peep at it.

    My rationale was to build walls that could be moved/hidden for purposes of getting the camera inside and so on, which I figured meant each wall needed to be in its own obj

    Yes, and ,.. not necessarily,...

    You can take a bunch of objects, and make them into either a "Group", or an "Animation group"
    Both of those "Groups" will have a Visibility option, for the entire group, but you can still open the group and use the visibility switches for each object.

    Maybe I should not worry about hiding the windows, and just make the brick wall into a separate obj?

    It depends on why you want to hide the windows, and what will be in it's place, eg: a gap or a solid brick wall,
    You can use some features of the shader room to create the effect of a Hole in the Wall, and have the Window object visible in that hole,. or have No hole, and no window.

    Like most things in 3D,. there are multiple ways to get the result you want,.

    For example,:
    I'd normally just open the vertex modeller and create the Wall, window, door etc as a single vertex object made of multiple Polymeshes, so the door, wall and window are named, and have separate shading domains and UV mapping,..

    Unless,..
    I wanted to allow the door and windows to be opened,. then I'd make them as separate vertex objects,. and assemble them into a group, and add constraints to allow some of the parts to be moved within their limits.

    Two tips,.
    You can Copy / Paste multiple vertex objects into a single vertex object.
    You can also Split a multiple into it's components (Edit / Split object )

    quick rough example of a wall/window/door, as a single object

    https://dl.dropboxusercontent.com/u/7907045/Wall_and_window.car
    (12 kb)

    Post edited by 3DAGE on
  • tbwoqtbwoq Posts: 238
    edited March 2014

    Hi Tim_A.

    In the UV editing mode Display tab, uncheck 'Show Wrapping' before you export an UV image. This should show if there are any parts of a UV mesh outside or partially outside of the main UV grid. If there are any UV mesh parts that cross over from inside to outside of the grid, the Export option may try to wrap the outside portion(s) to the image.

    Post edited by tbwoq on
  • TangoAlphaTangoAlpha Posts: 4,584
    edited December 1969

    I didn't change anything from lunchtime, but when I looked at it again tonight, it was mapping properly. This was with two rectangles instead of a box. I've attached a link to it anyway. I overlaid one of those numbered grids; one wall seems to be backwards, but otherwise it looks fine.

    https://www.dropbox.com/s/6mpvihezlmr6fw1/Wall_N.car

    There is another vertex object that shows the same problem. This one is is a barred cell wall, with a gap for a door. The bars and the vertical supports seem to be fine, but the horizontal supports have wrapped (fig 2). I untucked 'show mapping', but I couldn't see a difference. Anyhow, I've attached that file too.

    https://www.dropbox.com/s/2ea5pvdkvnznmsd/TH_CellBars.car

    Cheers :)

    TH_LowerWall_N.png
    1024 x 1024 - 6K
    TH_CellBars1.png
    1024 x 1024 - 7K
    Screen_Shot_2014-03-13_at_01.18_.33_.png
    1812 x 1229 - 966K
  • 3DAGE3DAGE Posts: 3,311
    edited December 1969

    HI Tim_A

    Sorry for the late reply, been busy.

    The wrapping issue was due to having the "Wrap U values" enabled for those parts.
    Switching that off for those, will export the map as you see it in the mapping view.


    The second issue was due to the direction of the surface normals for that wall.
    You can use the setting at the bottom of the "Interactive renderer" panel, to show the surface normal direction, at any point in the modelling process to check the direction is correct, and use Model / Reverse polygon normal to flip the direction,.


    What you've done is created a custom UV layout, where it's possible to export all of the shading domains together as a single UV map (wire-frame texturing guide map) (for those who don't know) :) which you can then load into an image editor, like photoshop, and a create texture map for.

    There's nothing wrong with that,. but you only really need a single shading domain if you have a single texture map.
    The drawback is that some parts of your model will have a smaller physical space on the UV map, and so the final texture for that part will be less detailed than if those parts had a separate texture map / shading domain and were UV mapped to the full size of the UV layout grid.

    You've done a good job of laying the parts out. but I think you could scale up a few parts to give them more texture area. (just my opinion) feel free to disregard it.

    One other thing is the Positioning in the vertex modeller and the Hotspot in the assembly room, it's just good practice to Zero the model in the vertex modeller and adjust the Hotspot position in the assembly room (caps lock) to lock / unlock the hotspot.
    it just makes it easier to work with.

    Hope it helps

    Here's the cell bars with the U wrap off
    https://dl.dropboxusercontent.com/u/7907045/TH_CellBars_uwrap_off.car

    and a pic to help you find the interactive renderer panel, to adjust the normals of the wall in your other scene.

    Normals_direction.jpg
    1200 x 695 - 394K
    maps_test_1.jpg
    1000 x 1000 - 160K
  • TangoAlphaTangoAlpha Posts: 4,584
    edited December 1969

    Thanks for there reply - I appreciate you looking at it. This is my first model, so I'm still making the mistakes and discoveries to learn from... :)

    Initially I built the whole model as a single vertex object, but then split the various components off later - that's why they retain their original displacements in the vertex modeller. Thanks for the info on moving the hot spot - I need to do it for the doors particularly, so they open correctly, but I was wondering how.

    I'm still figuring out the best design philosophy when it comes to UV maps and texture sheets - the tutorials I've seen all cover simple objects, basically just a cube or a single thing, but they don't really get into the methodologies behind mapping compound objects and more complex structures, particularly if you want to do it efficiently.

    Actually, I'm still figuring out the best way to group things together in general - as I mentioned earlier, I started off building everything within a single vertex object, which was easy; I could see how it all fitted together. The bars in the window for example, were copied & pasted within the vertex modeller. But I could equally have made a single bar vertex object, and copied & pasted it within the Assembly room. Is one way better then the other? Or more resource efficient? (I cut my computing teeth in an era when 16K was considered a lot, so efficient resource management is always nagging at the back of my mind. And too, my prime renderer is 32-bit Poser 10, and there are lots of models already out there that are too resource hungry for it to handle. I don't want to add my own to that list!)

  • 3DAGE3DAGE Posts: 3,311
    edited December 1969

    HI Tim :)

    For a first model, it looks pretty good.

    As far as resources, most phones have more memory and processing power than my first three computers. :)

    Creating a scene in carrara can be done really efficiently if you use replicators and duplicates, since both of those use a master object as the source, and either physically copy that master, (change the master object and all the duplicates change)
    or Virtual copies of the master object in the case of the replicators.

    The first issue is whether you want to render in poser, or Carrara.
    Carrara's renderer is one of the best and fastest, but you also have the plugins for Luxus (Lux renderer) and the Octane plugin is coming along really nicely.

    If you want to export the models to Poser then there's a few minor hoops to jump through.
    Loading and scaling the objects correctly , since both programs use a different unit scale,.
    Building shaders in Poser / DS to work better in those programs.

    Most texture map based shaders will transfer well, but Carrara has a powerful set of shading tools, and those would only work in carrara, and would need to be rebuilt in poser,.. if possible. ..or baked out of carrara to a texture map.

    I've found that importing your obj, into poser, then scaling it to something like 1%, then exporting it from poser, will give you the correct scale model to use in poser

    Any Constraints and limits you add in carrara, such as the Door's opening, will need to be redone in poser, since it uses a different method.

    I think if you experiment a little bit with Carrara's renderer, you may never go back to using poser.

    64bit will allow you bypass the 3 gig limit on 32 bit apps

    As for UV tutorials, yes, most of those cover the basics rather than complex models, but the main principles are the same, define a method of projecting the texture onto the model with as much detail as possible, and there are pre-defined methods for all the basic shapes, Box, Sphere, Cylinder, and planer, and those can be used on a wide variety of models.
    for more complex models, it's about pelt mapping or Unwrapping, like taking the skin from an animal and flattening it out like a pelt, and to do that, you'd define seams where the mesh is to be split.
    you'll also normally define different shading domains for the different parts of the model, the eyes / lashes and any other separate meshes would be Mapped and given their own shading domains, to allow you to get as much detail as possible in those parts, and for ease of use, when changing colours etc
    Sometimes, depending on the model, you'd also split off the face/head, and even the limbs/torso to get as much coverage as possible from your texture maps.

    All of the various possibilities, make it tricky to create a tutorial which covers mapping a seven legged alien hybrid :)

    Hope it helps
    Andy :)

  • DartanbeckDartanbeck Posts: 21,549
    edited December 1969

    Tim_A said:
    I started off building everything within a single vertex object, which was easy; I could see how it all fitted together. The bars in the window for example, were copied & pasted within the vertex modeller. But I could equally have made a single bar vertex object, and copied & pasted it within the Assembly room. Is one way better then the other?
    Instead of Copy/Paste, in the assempbly room, select the single cylinder (bar) you made and Edit > Duplicate (Ctrl D) which has many benefits. First, without changing the selection after duplicating, move it in the direction they need to run. Now Ctrl D again will place the next one down the line, and so on.

    But even better, the file size doesn't include the polygons of duplicated objects, keeping you working view happy and fast. Copy/Paste, on the other hand, makes a copy of all polygons and pastes them separately, each time. No need and becomes bulky in the file size.

  • TangoAlphaTangoAlpha Posts: 4,584
    edited December 1969

    Thanks for the tip, Dartanbeck :) I knew you could ctrl-D (cmd-D in my case) to duplicate, but I assumed it was just a shortcut for cmd-C+cmd-V - I didn't realise it created a reference rather than a new instance. Does that limit what you can do with them - assigning individual textures/shaders for instance?

Sign In or Register to comment.