Tiling and Scale

I’ve been trying to figure out the logic behind tiling and scale and model importing in Unity. The cube on the left is a Unity GameObject>Cube, the one on the right was exported from Sketchup as a 3DS, 1’x1’x1’ in size. The material tiling is set to 1.0 for each. Any idea why Maxie is tiling differently on each cube? Can’t figure it out…


What does the mesh look like on the model to the right? My guess is that the Sketchup model has 10 x 10 faces on each side while the Unity box only has one.

BTW, looks like a screenshot from “Max Headroom”, right?

looks like the sketchup model is taking up more then 1x1 uv space. Have you checked the import settings. Or can you bring it into another 3d app to check. Post it here and I’ll check it for you in Modo if you like.

Cheers.

SketchUp produces horrible UVs and almost always they go outside 0-1 range (and thus would tile).

If needs be you can change the scale of the imported model in the “Settings” for that asset.

Richard.

Has anyone managed to do that ??? I’ve been trying since yesterday night everything I could figure to have it work on some FBX, OBJ and 3DS exported from Sketchup pro : whatever size I give to the imported model (be it in the asset import settings or in the instantianted object’s properties) the tiles remain microscopic. This makes Sketchup models simply unuseable in my Unity projects. I asked the question on another thread but got no answer, so I resurrect this one with a little hope…

Ideally, you would need to set the texture’s tiles to values smaller than 1, but - unless I am missing something crucial - this doesn’t seem to be possible in Unity. Please tell me that I’m wrong ! :slight_smile:

EDIT : I just discovered that it can be achieved in Cheetah3D by simply lowering the “UV scale” of a given material (and not the tiles size) to values smaller than 1. Is there a way to acces this uv scale parameter in Unity ?

You can’t alter UVs in the import settings. You could do an importer script, but that’s not what you want to do either. What you could do besides fix the UVs in some 3D app is to select the applicable material, click the Placement button by the main texture, and change the Tiling X and Y values. Based on your screenshot the face is tiled 12 times in each direction, so if you want only one, set tiling in X and Y to 1/12.0 = 0.083333

Cheers,
-Jon

Which is precisely what I would like to do, but Unity (unlike Cheetah3D, for example) seems to refuse non-integer values in the tile settings. Example : if I copy/paste the value you suggest into the x and y tiling fields of any given material, 0.083333 is automatically converted to this rather confusing result :

82650--3203--$cm_capture_1_118.png

This said, Jonathan, you are right to mention the external fixing option : I just managed to do it in Cheetah, by saving an imported Sketchup model with all its materials’ UV scales manually lowered to a value of 0.1 - and TADA ! It works now in Unity, the imported material tiles being much bigger.

OK, so exported Sketchup models CAN definitely be used in Unity, but they first need this fix for the materials to behave correctly. Guess I’ll have to learn Cheetah scripting to automate this workaround :roll:

There must be some incompatibility with Unity and your language setting, seeing as your decimal point is represented by “,” instead of “.”. You probably should file a bug report on it. But maybe you can experiment with your language setting or typing “,” instead of pasting my “.” and see how that works.

-Jon

In fact, I had already tried switching languages and keyboard assignment : always the same result, including by typing “,” instead of a dot - in that case, the tile got bigger for a while, but was reset to its initial small size as soon as I selected another typing field. :?

But if I understand you well, on your system you can enter float numbers for tiles without problem. This is very interesting ! There must be some low-level language prefs that aren’t affected when switching OSX language, or something like that… anyway, I’ll follow your advice and file a bug.

Thanks a lot !

Weird. Yeah, this has worked just fine in Unity for me for as long as I can remember. It’s definitely some bug.

-Jon

OK, I investigated a bit further this morning : seems you can spare the intermediate UV fixing. For some reason, if you assign bitmap textures rather than simple colors to all the parts of your Sketchup model before exporting, it will come up with correct default tiling sizes in Unity :smile: :smile: :smile:

Note : there might be exceptions for complicated models (i.e. using Sketchup’s “follow me” tool), so I still need to check this point.