Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 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 sparkzbarca · Dec 06, 2013 at 09:58 PM · texturemesh

running a texture across multiple objects/meshes?

basically i'm looking for some guidance on how to get started or a general idea of how to do this.

I want to basically be able to spawn a cube for example, then spawn another cube along side the first and have the texture not appear to break at the join.

I'm ok with restrictions like it just being cubes basically, I mean I think once I get something working I can understand enough to modify it for my particular needs.

I think perhaps marching cubes might help with this im not sure.

I'd like to be able to have an object composed of say 100 cubes and for the purposes of destroying and creating it in portions I don't want to make it one super mesh, then I couldn't do hit detection etc on one small piece.

However I want the outside to appear uniform so I think i want to perhaps have a seperate mesh/object wrapping around I guess the 100 cube object for the texture to be placed on, again i'm not sure here.

I know what I want to have as an end result, which is a 100 piece object which doesnt on the outside look like 100 joined pieces but looks uniform.

I don't mind if it's a bit difficult I know of course things like terrain deformation exist and look good so it's possible I just don't know where to start, so any guidance on how to do this?

Comment
Add comment · Show 6
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 robertbu · Dec 07, 2013 at 04:27 AM 0
Share

OP_toss outlines two ways to make it work, but there are a lot of posts concerning the issues of getting textures to align without any artifacts across multiple objects. Typically you see some lines between objects, or if using physics, you see objects catching on the edges between objects. You might be better off looking at other solutions. Since I don't know your game, it is difficult to make specific suggestions, but I'll bet there are other approaches to your problem.

avatar image OP_toss · Dec 10, 2013 at 06:30 PM 0
Share

Agreed, the solution I proposed is just the simplest and most efficient way I could think of. The other solutions require procedural meshes with procedural collision meshes. Not thaat difficult since you're dealing with cubes. But slow so you couldn't rebuild it every update.

Also if you could respond to your own question with an update or answer that'd be nice. Don't leave us hanging!

avatar image sparkzbarca · Dec 11, 2013 at 03:21 AM 0
Share

so i'm not just using cubes, though I am only using simple shapes.

cubes, triangles, 2 X 1 tri's 3 X 1 tris, maybe spheres half spehres.

I know how to join them "seamless" as far as exactly touchign, tahts done, but the painting the textures on only works on cubes it seems.

avatar image sparkzbarca · Dec 11, 2013 at 03:28 AM 0
Share

i think maybe I want to actually be able to paint a texture like if i coudl do that at runtime.

Does that seem possible?

The issue is like with a triangle joining a cube for example, a tri is no longer a square tileable texture so its edges and stuff are at different points of the edge of the actual uv map of the texture.

so it doesnt align nessacarily I DONT THIN$$anonymous$$.

Im not sure.

I feel like either I could texture the triangle in blender in such a way to make it join seamlessly or else I could in unity "paint" the texture on whereby I somehow take like the UV map of the cube the tri is beside. I look at where the edge of the cube is for example on the texture image. then I somehow define the face of the triangle to start at that same part of the texture image so that the edges match up.

I'm not sure if that makes sense reading, mentally I understand what im saying :P

avatar image sparkzbarca · Dec 11, 2013 at 03:31 AM 0
Share

Basically I want to be able to paint by laying the image over the top of the cube/triangle as it were and then wherever in the middle of this image the cube ends, the triangle begins.

I wonder if maybe I could also do this in blender by having all the shapes in the same scene and uv unpacking them all and trying to make them align that way i'm again not sure, I think if I had like a reference or some diea of how/ the best way to do it I could do it, I jsut dont know where to start really.

Show more comments

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by OP_toss · Dec 07, 2013 at 01:30 AM

Why not just make a bunch of cubes that are procedurally aligned to be exactly touching. That solves the model part easily enough. Simple is good and this should suffice. Marching cubes or terrain algorithms that use procedural mesh generation are slow and confusing to implement in my experience.

Then the seamless texture part, since its a cube, you can just use a tileable texture applied to each face of the cube. That way the sides will line up.

If you don't want it to be so obviously repeatable, you can offset the uvs based on the tile's position. So cube 1 has uvs(0-0.25) and cube 2 has uvs (0.25-0.5) etc repeating back to 0. Thus the image would repeat every 4 cubes instead of every 1.

Now you could also get fancy and use 3d textures, and have the shader use the vertex position (interpolated) to lookup the uv for the texture. This could be your most dynamic and efficient option, but 3d textures are procedural by nature, so you'd have to have a way to define one. I've only used them in modelling applications so I can't help you too much there.

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

17 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Multiple meshes vs single mesh (performance vice) 2 Answers

Texture type -> Advanced -> Mesh type: how it works? 1 Answer

Change texture of individual triangle on a mesh? 3 Answers

Repeat Texture instead of Stretching it all over? 4 Answers

Animating a texture on an FBX import from Maya 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