Non UV options for mapping imported models? Planar, etc?

I’ve tried everything I could think of but I’m having zero luck importing non UV textures for models. What I’m after is being able to tile surfaces say on a wall for a building. Essentially doing at least planar mapping on models built in Modo. With Torque Constructor it was fairly easy to lay out tiling textures on models. I can easily do it in Modo but I can’t figure out anyway to import it into Unity with the layout intact. The surfaces come through so it looks like it’s trying to but they aren’t on the model the model is blank. I tried redoing the surfaces in Unity but had zero luck. I can never get a surface to read in Unity unless it’s UVed. It’s a major problem because it severely limits what I can do for textures. I find that the on line player tends to choke on textures greater than 512X512. I can deal with this for tiled textures but limiting a UV map for buildings and such to 512X512 means a really low res object. I can potentially I guess make walls that have a different UV for each surface but that still limits me to 512X512 for a wall. If I even used a 256X256 texture tiled I’d get far sharper detail. I can easily set up tiled textures of course on primitives made in Unity so it seems I should be able to do the same with models I import. I’m exporting all my models FBX so I’m not sure why it’s loosing the tiling information especially since the surfaces are still defined? When I click on “mesh” I can see each surface and each map but nothing is visible on the model. Very frustrating. There must be a way but after a day or two of trial and error I got nowhere. I checked over the documentation and there’s no mention of this it just refers to UV mapping or tiled textures on Unity primitives.

Thanks. Still really stunned with 2.0 I’m just trying to sort out a few issues like this that are holding me back. I don’t want to do a lot of modeling until I know the results I can get in Unity.

In the material’s Inspector you can click on the placement button and adjust the tiling of any texture associated with that material. No matter how your object is UVed in Modo the tiling in Unity can be set this way. You just have to make sure that your textures are set to repeat instead of clamp.

The other way to do this without having to fiddle with any tiling setting in Unity is to extend your UV maps beyond the 0-1 space and size them up to the proper tiling you desire. Again once imported into Unity make sure the textures used are set to repeat and not clamp.

Also 512x512 is definitely not the limit for a single texture in Unity or the webplayer. 2048x2048 is the limit for most modern GFX cards and some can even go up to 4096x4096.

Are you talking about models that you did not generate uvs for? Models without uvs do not get uvs in Unity and uvs cannot be generated on import.

I assume you are talking about a situation where you have not assigned the mesh’s uvs, therefore they are all at 0, 0. Because of that your model is fully colored by the pixel at 0,0 on the texture.

Not sure what you are getting at here, but I think basically you are saying that you want to tile your textures on your buildings. All you have to do for this is set your textures to repeat and your material’s texture tiling to a number greater than one. However if your object has no uvs, which I think it doesn’t from what you said, it will always end up as a single color.

You sound like you are after something like generating UVS on import. Unity doesn’t do this but you can roll your own with the MeshImporter class in 2.0, or you can get planar uv mapping on the graphics card with Texgen ObjectLinear in a shader and then SetMatrix on the material.

Possibly what you need to do is press something like “bake uvs” in modo or something before you export/import. And remember, Unity uses uv coordinates outside 0-1 just fine.

I think any mesh in any 3D app has to have some UVs stored by default… they don’t just get zeroed out. I guess I’m spoiled by Maya’s interoperability with Unity, but some 3D apps require a texture assigned to a mesh for the UVs to export properly to FBX.

I don’t think a custom shader or MeshImporter script is required here either… just some tweaking to your UV spaces (like Forest and I said, Unity supports UVs beyond the 0-1 space) or tweaking the Placement/tiling setting in the material.

If none of our suggestions help, please post some screenshots of what’s going wrong with your imported models and textures.

Ethan

Actually Yoggy is correct. It’s quite possible to save a mesh with no UVs, and they are in fact read as 0,0 if that happens. To repeat, you must have UVs on the models to have textures, and you can tile them just fine with UVs.

–Eric

Yep, certain 3D apps won’t export the UVs to FBX unless a texture is applied to the material ( but every 3D app stores UVs for whatever mesh you create no matter what). Already mentioned…

Nope. :slight_smile: Blender, for example, doesn’t do UVs unless you specifically ask it to…nothing to do with FBX. That has to be the default, because any sort of “standard” UVs are completely arbitrary.

–Eric

I was trying to avoid just creating a bunch of UVs. What I was getting at is I take it Unity only works with UV mapped objects. Whenever I try to import models using something like surfaces it seems to read the surfaces but can’t translate them into texture coordinates. It’s not a matter or repositioning the textures they aren’t even visible. I was just trying to figure out the simpliest way to use tiled textures for the surface of structures. Obviously with a complicated shape the only option is UVs but I was hoping there was another way.

I guess I’ll explore UV options. It is confusing that Unity can read surfaces and use much of the information but it can’t translate the information into texture layouts. It seems like it’s 90% there so I assumed I was doing something wrong.

Really??? So if you create a cube/plane/sphere in Blender no default UVs are created? Weird. In Maya even if you construct a mesh from scratch some sort of optimal planar UVs are created. I find it a little strange that a 3D app wouldn’t try to extrapolate at least some rudimentry UVs from the geometry created. Ok, the rule is to make sure that whatever sub par 3D app you’re using has created some sort of UVs for your meshes :wink:

Yeah I’m having no luck here. I’m hardly new to CG I started out with Playmation/Animation Master and moved to Lightwave when it was ported to PC. Since then I’ve used Maya and my favorite App for modeling is Modo. This said game engines have their own way of doing things and I’m still getting used to the approach. I may be missing something fundimental here to UVs, I’m largely self taught so there are knowledge gaps, but my only option seems to be a single map for the whole object. That’s where I keep running into the road block. Modo does generate UVs if you want but I usually section them myself because if you are making a model they turn to a rat’s nest in a matter of minutes, adding and subtracting to a mesh screws them up. Making a single UV of an object isn’t the issue. What I was trying to figure out is a process where say you have a box, six sides. I want to have a separate tiled texture for the top, bottom and each of the sides, I’m talking basic planar mapping. How would it be best to go about this? If there’s method for doing this I can adapt it for any shape I just don’t have a clue how to do this in Unity. I can do it easy enough with Constructor in Torque but I haven’t a clue how to do this in Unity.

I thought it was completely normal to do this in the process of modelling in your 3d app? Given the nature of uvs, youd have to have some manipulation on them, or your guaranteed a mess…

I think the six sided method is “cubic” mapping. For fail safe texture paintable uvs, do “automatic” mapping (in your 3d app). UV’ing is just part of the deal Im afraid.

I wouldnt like to do anything automated at this point, why spend time modelling something cool and trust a machine to guess how the surfaces look.

There is uvmapper.com which hosts a free unwrapping tool.

This is a little over my head but looks relevant:

It looks like there is some support for assigning UV’s

AC

Definitely not after cubic mapping. You get one good side when you do a wall. I did some gate walls that way and the opposite side is flipped and the narrow sides are just squeezed textures. I rarely use cube mapping for CG work. There are times it works well but usually I wind up with planar, cylindrical, spherical or UV.

I seriously seem to be missing something here. There has to be a better way of doing it than what I’m doing? The only option I can see is sectioning a model into dozens of pieces, importing them separately then grouping them together so you end up with a bunch of separate UV mapped sections. Seems like an insane amount of work and very clunky when it could be avoided with simple surface support. Like I say I’m new to gaming. There are multiple ways of handling this issue with animation software but options seem limited in the game engine world and I’m not seeing many options with Unity for controlling textures. Just seems like a basic thing planar mapping a tiling texture onto a surface. I’m saying treating each side of a model as a different surface.

Yep. :slight_smile: If you go into UV mode for the first time and back out again it basically does a “reset” on the UVs (0,1 for all quads)…otherwise there is nothing. Realistically, there’s no way for any 3D app to know what you’re going to do with UVs, so anything the app creates is going to be arbitrary, like I said. Since you might not want UVs at all, there’s no point using up memory with them unless it’s necessary. Blender does, of course, have a number of typical projections (sphere, cylinder, etc.) that you can apply if you want, or else you use the more advanced stuff.

I started out in 3D with POV-Ray, so I actually never dealt with UVs for quite a while. (You can do UV mapping in POV-Ray, but that was too advanced for me at the time.) So I can relate somewhat to what you’re saying I think. However, with 3D hardware (not game engines per se), the only option for texturing is UVs.

Anyway, you can in fact texture each side of a cube separately, and give them a different material in Unity. I’m not familiar with Modo, so I don’t really know how you’d do it there. From a performance standpoint, it’s not a lot different from having separate objects, so it’s mostly a matter of convenience when working with models. The trees for the terrain in Unity 2.0, for example, have two materials–one for the leaves and one for the trunk/branches–but are one object.

Tiling is simple…with the material selected, you can click on the “Placement” button and set the offset and tiling parameters.

–Eric

Real time renderers basically take an image, cut it into a triangle based on UV coordinates, then position that triangle on screen based on vertex positions. They don’t do much else and I’m suspecting that either (a: modo is doing something funky that is not designed for real time, or b: modo is automatically generating uvs for itself but being selfish and not exporting them).

I don’t know what UV mapping looks like in modo but in most 3D programs it is something that you can both do quickly with an unwrap or other calculation and control on a small or large scale afterwards. Usually it is a matter of putting in seams, unwrapping, then dragging some parts around to lay it out optimally. Sure it takes time but thats how it goes with all 3D work.

Something is definitely getting lost in translation. Modo is very high end and I have a lot of control with how objects are mapped. It’s not a Modo issue. I could use anyone of a half dozen softwares to model but the results would be the same. Modo does generate UVs if you choose the option but it’s generally better to make them later.

Including surfaces definitely seems to confuse Unity so I’m finding you need to avoid them entirely which leaves only UVs. I’ve never had to generate separate UVs for different sections of a model so I need to research that one. It’s easy enough to do multiple UVs but they cover the entire model when I make them. It just seems like there should be a more straight forward way.

I’d love to see a more comprehensive tutorial on texturing. I’ve worked with two other game engines and this is the first time I’ve had this much trouble with texturing. It’s extreme simple to apply textures to UVs or to texture primitives made in Unity but I’m not having any luck beyond that. There has to be a straight forward way to texture sides of an object with tiling textures?

Maybe pics would help. :slight_smile: I use Blender, as I mentioned, where the process is extremely simple. But in theory this should apply to any 3D app, even if the exact steps are different.

First, I make a cube, then go into UV mode and select a face (also as I mentioned, this automatically assigns UVs of (0,0), (1,1) to all quads to start with, which is what I want in this case, so I don’t actually have to do any UV mapping). I then go to the UV editor and load a texture for that face. I repeat this process for two other faces, loading different textures. I then save this model, and drag it into the scene in Unity. And…well, that’s it; everything is automatic. (Except I’ve changed the tiling for a couple of the textures, as you can see.)

–Eric