USA
Joined: Mar 25, 2015
Post Count: 153
Status:
Offline
Modified materials in furniture - not scaled?
Am I correct in assuming that when I modify the material of a furniture component -- say, the countertop of a kitchen cabinet -- if I select a texture, the texture image is mapped 1:1 on the component? In other words, is the stated size of the texture ignored? (I was trying to make a tiled countertop, and I kept getting a 3' x 2' top consisting of four 18" x 12" tiles....)
Joined: May 12, 2013
Post Count: 1545
Status:
Offline
Re: Modified materials in furniture - not scaled?
Sounds strange, where did the component model come from? There may be a difference in scaling depending on whether you apply a texture to an entire model or individual surfaces. Models can map textures differently (scale or not scale with the model). Could that be it?
USA
Joined: Mar 25, 2015
Post Count: 153
Status:
Offline
Re: Modified materials in furniture - not scaled?
ok -
Thanks for the quick reply. The cabinet in question is the wood lower cabinet by Pencilart.
If I apply a texture to the entire object, it works as expected. If I instead choose "Materials" from the "Color and texture" section of the "Modify furniture" page and then apply the same texture to just the countertop, I get something very different. My previous description of how the texture is mapped was wrong; experiments using a grid texture show the texture is mapped against the countertop with the center point of the texture mapped against the centerpoint of the countertop's top surface.
Oddly, if you consider the texture as running from {-1,-1} to {1,1}, the countertop's surface appears to run from approximately {-0.725,-0.35} to {0.725,0.35}. This suggests to me the textures are being applied to the model components before the model is resized to the object's final size.
This last experiment offers a possible workaround -- or, at least it would if I actually needed this object; instead, I have been trying to model an existing home to make sure I could do so before redesigning it, so I don't plan to lose any more sleep over this particular ugly kitchen. My main concern was to make sure I wasn't doing something wrong in the way I imported new textures or applied them to a model's materials.
Joined: May 12, 2013
Post Count: 1545
Status:
Offline
Re: Modified materials in furniture - not scaled?
Interesting. Looks as if the "problem" is in the model. Apparently the .obj file (Art of Illusion) maps marble2 to use a small part of the 200x200 px marble texture (2DoorLowerCabinet1.jpg). That is annoying, at least in your case. But at least it seems you have several options:
France
Joined: Nov 7, 2005
Post Count: 9426
Status:
Offline
Re: Modified materials in furniture - not scaled?
The rule about texturing is this: - if you change the texture of the whole object using the button beside the Texture radio button in the furniture modification dialog box, the texture is mapped on top, front, back and bottom sides of the object respecting the width and height of the texture. On the left and right sides, the result is most of the time not so nice because of the way automatic texture mapping works (like in the cube of the image below).
- if you change a texture of an object using the Modify button beside the Materials radio button in the furniture modification dialog box, it depends on whether the part of the object you change defines some texture coordinates or not. If the part you change defines some texture coordinates in its 3D model, then those coordinates will be used. If that part don't define any texture coordinates, default texture coordinates will be used according to the previous rule. Why keeping those coordinates if they exist since, in a way, it obliges to understand what texture coordinates are and how they are defined on the object you want to modify? At the moment, I prefer to keep them unchanged because users wouldn't be able to nicely change the texture of a cylinder and other not boxy shapes. Maybe, I could add an Ignore model texture coordinates check box in the Furniture materials dialog box, but fear it would confuse many users without always solving the problem as they wish...
See also this tip.
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D creator
USA
Joined: Mar 25, 2015
Post Count: 153
Status:
Offline
Re: Modified materials in furniture - not scaled?
ok - Thanks for the information! I hadn't looked at the object definition, yet, because attempts to map against another model had resulted in a similar 'mega-texture.' I'm doing my best to treat sh3d as a tool, not a lifestyle -- or at least to do so until I have fewer plates spinning.
use another worktop (box model) on top of the cabinet (and group). If you want to remove the existing worktop, just apply an invisible texture,
That's great! I'd actually tried that, but (a) the particular box solid I used exhibited the same texture-mapping oddity and (b) I couldn't figure out how to ensure the original component didn't show through. The tip on using an invisible texture is just what I needed.
Emmanuel -
First off, thanks for an amazing piece of software. I can already foresee it having a detrimental effect on my professional and social lives. I also like the way your mind works, based on what I've seen of the source. It's been ages since I've done any Java development (wow, even longer than I would have guessed: 16 years), but I think I may use sh3d as an excuse/text for relearning the language. (If only I'd stuck with French in college, I could use your actual text!)
And thanks for the info on how you handle texture vs material mapping. (I'd poked around a bit in the furniture catalog Javadoc, looking for a 'scale texture? y/n' toggle, but stopped once I couldn't find so felicitous a solution.) I agree with your rationale for when to follow model texture coordinates. Perhaps that toggle -- along with other, currently unused object attributes, could be accessed through an 'advanced' subpanel in the furniture editor, accompanied by appropriately dire warnings against fiddling with them untutored.
USA
Joined: Mar 25, 2015
Post Count: 153
Status:
Offline
Re: Modified materials in furniture - not scaled?
Oh, BTW, I had checked the tutorial on applying textures to a box, but the examples there are presumably from an earlier version on sh3d, as the texture import screen doesn't include the ability to define the texture size -- and I was concerned my problem may have been the result of my specifying the size incorrectly.
Joined: May 12, 2013
Post Count: 1545
Status:
Offline
Re: Modified materials in furniture - not scaled?
thanks for an amazing piece of software
I second that. What keeps surprising me is that SH3D seems to be the software of choice for very skilled users and amateurs at the same time. It must mean eTeks has done something very right. ok