By seurban
#326990
I'm wondering if there is any way to get UVs for odd shaped objects done in SolidWorks, whether it's through SW and Maxwell alone or with additional software.

As an example, my current project involves a cable the is straight for a portion (easy) then bends and does a few wraps around a cylinder (hard). I found an awesome material (Steel Rope by Kurt: http://resources.maxwellrender.com/sear ... v2=0&tipo= ), but don't have a way to map it properly. If you look at the sample picture in the material you see the cable wrap around a post, with the material following the model perfectly. I need a way to do that out of SolidWorks (again, with additional software if absolutely necessary).

And I don't know if this is the same issue, but the displacement of this material didn't work on my object (tried on a straight cylinder). Perhaps it again doesn't have the right UVs?
#327004
Hmm, regardless of UVs, I think that SolidWorks is almost surely not going to work very will with that material, due to the poor meshes (from a displacement standpoint) it creates. Let me try some tests to see what I can accomplish.
#327011
Thanks for your help. I think I understand what you mean - I think I saw somewhere that more triangles is better for displacement, and SW certainly isn't made for controlling triangles. Would an STL export work better?

If not, while getting the displacement to work would be great and would look better, I was able to get a decent (good enough?) result by removing the displacement and using the map for a global bump. I don't know if it will look as good on larger size cables (I have to do a few), but these aren't the centerpiece of the scene. So unless you find a way to make the displacement work well with SW, I might be OK just using global bump. But they can't look totally screwy, which is the way it looks now with an inappropriate UV. That's the part where I'm lost.
#327013
No, you'll get the same triangles in the STL that you would in an MXS. The type of triangle that is bad for displacement is the long/skinny type; best are square. Besides that, the triangle density should be designed such that the displacement can use the lowest acceptable precision that achieves a good look; of course, the control of triangle density in SolidWorks consists of a single slider in Document Properties > Image Quality.
#327038
Ah I see. Thanks for the explanation. Selecting triangles in Studio I certainly see what you mean.

So if I forget displacement then, which I can by using global bump instead (that's not affected by triangles, right?), is there a way to get UVs that will tell the texture to follow the cable as it wraps around a cylinder (or post, as the preview image in the material I cited does)? Is there some other software I can pass my files through? We've been talking about maybe getting Rhino for some other purposes, can that export UVs with the model?

*edit: The parts are fairly simple, so if I had to recreate them it wouldn't be the end of the world, but certainly not preferable.
By JDHill
#327046
Well, I've been playing with that material, and the key is in how you build the cable. If you extrude a circle along a curve or spline, then the UVs qppear to be generated in world space. However, if you extrude a straight pipe, then use Insert > Features > Flex > Bending, the UVs will follow along with the bend.

Image

Regarding Rhino or other software, Rhino texture mapping can handle this pretty well, actually there's a post regarding this material in the 1.x Rhino forum (here: http://www.maxwellrender.com/forum/view ... 13&t=33474) , so maybe you'd like to read through that to get the idea of how it works there.
#327126
JD – Many thanks for your help so far. I looked at the Rhino thread, it sounds pretty workable and I downloaded the Rhino demo. My boss is pretty on board with getting Rhino too.

For now, in SW, there are still a few quirky things, but the basic idea is working. I started out with a .125in extrusion (the size of my final cable) and had weird issues. Same thing doing a sweep of the same geometry. Then I tried a 1in diameter sweep and had instant good results with my global bump version of the cable material. It even worked when flexed! The original steel rope material with its displacement spazzed out, but it also took longer to render so I might not worry about that now, unless there’s an easy/obvious fix (maybe it’s SW’s bad triangles).

Thin, straight:
Image Image

Thin, curved:
Image Image

Thick (in), straight:
Image Image

Thick (in), curved:
Image


I then scaled it in Maxwell, and got good results:
Image Image


But then, just to see what would happen, I made the diameter 8 inches and got this:
Image


So I’m not sure what the deal is with scale from SW to Maxwell, but I guess I can just make everything 1in diameter then scale it in Maxwell. Certainly not the best solution, but it might do for now. Do you know what might be happening?
#327127
I would probably have to look at all the iterations of your scene to state anything conclusive. I do not recall off hand what size cable I made, but I did need to change all of the texture tile values from 4.0/4.0 to 40.0/40.0. Also, since I think a percentage-based displacement's height in Maxwell is based on the object's bounding box, that's not going to be a good strategy for something like a cable, so I switched the displacement into absolute height mode and used 0.1 cm or so for the displacement height.
#327137
Hmm, I just noticed something strange. With the straight 1in cable I seem to have tricked myself into thinking everything was ok, but it works fine after the flex operation.

The straight cable looked fine from the front, but from the side it becomes evident that the texture doesn't wrap around. It looks more like a planar projection.

Front:Image
Left:Image
Right:Image

Compare that to the same object, Left view, with a cylindrical projection:
Image


But if I flex the object in SW, the textures do wrap:
Image
Image

The only issues are a tiny seem that can be seen in the first image (I can live with that) and the texture is rotated 90degrees, which I can fix by pre-rotating the maps (wish there was a way to do this in the material editor). Changing the scale using the tile values worked fine.

I guess I'd put this under a "quirk" rather than a real "problem" (I'm thankful it works at all at this point), but it'd be nice if the UVs exported the way they do when flexed all the time. Just thought I'd pass this along, if you didn't already realize this yourself.

Thanks again for your help.

*edit: this has me wondering if I could make any shape export with good UVs just by doing an insignificant flex operation to it, or if it'd give a UVs that reflected the flex operation only. I'll have to look into this and post the results...
By JDHill
#327139
If you, for example, assigned the material to the pipe's Surface body, then you should be able to open the plugin's Object Properties tab, select that Surface Body, and adjust the texture rotation there.
Sketchup 2025 Released

Thank you Fernando!!!!!!!!!!!!!!!!!!!!!!!!!!! hwol[…]

I've noticed that "export all" creates l[…]

hmmm can you elaborate a bit about the the use of […]

render engines and Maxwell

Funny, I think, that when I check CG sites they ar[…]