Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by roamcel · Aug 30, 2011 at 08:15 AM · uvrangedetailmesh

The UVs of the detail mesh objects need to be in the 0-1 range?

I'm trying to create a simple rock mesh as a detail mesh, following instructions here.

http://unity3d.com/support/documentation/Components/terrain-DetailMeshes.html

Needless to say, if I use the standard assets rock, I am perfectly able to add the rock to the terrain mesh details list, and then I'm able to paint the rock into the terrain.

However if I use a mesh created by me, a simple mesh with a simple texture correctly mapped upon it, upon placing my rock detail mesh will get the first texture of the terrain details list. I am aware that the object needs be added as 'vertex lit' so that's not the issue. It's actually plain obvious that the texture is the first of the atlas. Besides, If I manually place the mesh into the scene, it will be rendered correctly instead.

My conclusion after several hours wasted upon this retarded issue, is that there's a problem with UVs... but I can't figure out what on earth the documentation means.

Where do I set the UVs range? In the 3d editor? I've checked out with blender and even if I perfectly know how to set and map an image into the 3d model, I am unable to understand what are these UVs the documentation speaks of.

Please help me understand what are these UVs the documentation speak of, and where or how am I supposed to set their range into "0-1".

Thanks.

Comment
Add comment · Show 2
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image roamcel · Sep 06, 2011 at 09:57 AM 0
Share

sigh. I still don't understand how to fix this.

avatar image CHPedersen · Sep 06, 2011 at 10:52 AM 1
Share

UVs are texture coordinates. They map vertices in the mesh to pixels in the texture, so that the system knows which parts of the texture belong to which parts of the mesh. It's like wrapping an object in gift paper and putting needles through the gift paper to pin some specific coordinate of it to some specific point on the object.

Take a look at this page:

http://www.rozengain.com/blog/2007/08/26/uv-coordinate-basics/

It explains how to set the UV coordinates to correctly wrap a texture around a cube; it $$anonymous$$ches you what UVs do in further detail. Don't read too much into the code samples, it's for a different graphics system and not relevant to Unity. But the underlying principle is the same.

2 Replies

· Add your reply
  • Sort: 
avatar image
0
Best Answer

Answer by roamcel · Sep 06, 2011 at 06:47 PM

Thanks for the help. With your explanations about uvs I got to understand that the range unity speaks of is the actual POSITIONING of the UV UNWRAP of the mesh, into the texture space.

More precisely: if you unwrap an uv map of a mesh, you can position the uv map OUTSIDE of the texture space, which for example in blender is very easy to see, since you'll have the image, and outside of its bounds, you'll have the uv map's polygons.

The texture mapping performs all the same, since the texture is tiled, but the uv unwrap clearly gets a mapping index which is not in the 0-1 range, which belongs to the "image on the center".

I accessed my mesh, repositioned all of my uv unwrap polygons inside of the texture area, and reimported and voila, textures are mapped correctly in my rock detail mesh.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
1

Answer by garrus · Sep 06, 2011 at 12:04 PM

I'm not an expert on this but 0-1 range means pixel values must be converted to 0-1 so a pixel coordinate of 0,512 on a 512x512 texture would be 0,1 on a 0-1 range. So 256,512 would become 0.5,1 etc.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

4 People are following this question.

avatar image avatar image avatar image avatar image

Related Questions

Assigning UV Map to model at runtime 0 Answers

Problems with Textures, Cinema4D to Unity 3 Answers

Voxel texturing with single texture instead of texturesheet? 0 Answers

Error in ONE PARTICULAR scene: "Mesh doesn't have albedo UVs. Please create them in your modelling package." 1 Answer

Can I feed ShaderGraph a UV map? 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges