Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 14 Next capture
2021 2022 2023
2 captures
12 Jun 22 - 14 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 /
  • Help Room /
avatar image
0
Question by Assfur · Feb 03, 2017 at 07:47 AM · shadercubevoxelminecraftvoxels

How to make a Tovel like cube (edge smooth?)

Hi, i'm trying make a voxel game.

and i'm no idea on how to make a cube like this one

Trove

what i do now is create a cube in scene and change the color, but how could i make the cube look like more smooth?


also like the second image, you can see the tree (purple part) is made by 3 cube,

so if i made a cube prefab which have a smooth edge( in mesh) , when i use that cube to build the tree , there should be some groove between each cube .

apparently that's not right.

so any idea how to do it?

thanks

alt text

1.jpg (29.3 kB)
3.jpg (49.2 kB)
Comment
Add comment · Show 3
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 hexagonius · Feb 03, 2017 at 08:26 AM 0
Share

smoothing edges is called beveling in 3D modelling tools. Unless you want to write a shader somehow clamping the surface normal on most parts of the surface, creating one in a modelling tool is the way to go.
and sadly I don't understand your groovy part since I'm no native speaker.

avatar image Assfur hexagonius · Feb 03, 2017 at 08:55 AM 0
Share

Hi, thanks for reply. i'm also not a native speaker :(

i aslo found the technology use in $$anonymous$$agicVoxel.

alt text

Normal Cube

if i just use the cube(in unity) and change the color , i will get the same result in Unity.

RE:Rounded Edges

this is the result i want to achieve, same as Trove.

RG:Rounded Grids

this is the groovy part i was mention. and i think if i use the right shader or normal map, will achieve this result. but this is not what i want.


also i found out some relate topic , but i don't know how to use it in Unity. Link1 Link2

b1.jpg (171.1 kB)
avatar image hexagonius Assfur · Feb 03, 2017 at 10:53 AM 0
Share

I don't think it's possible for cubes to be rounded on their cluster edges without knowledge of each other. I think this is going to be a lot of work getting this done programmatically if you want that as a general behaviour throughout your game.

2 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by peter226 · Mar 19, 2019 at 06:31 PM

You could calculate smooth normals for the mesh, but input them as vertex colors, and use a gradient to shift between that and the original normals. Or another way is to create a normal atlas texture with all possible normal combinations based on neighbour cubes for faces, and make a script figure out which part of it to use and input it as uv, but this I don't recommend, simply for it's complexity.

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
0

Answer by Danixadem · Aug 28, 2020 at 10:58 PM

"Or another way is to create a normal atlas texture with all possible normal combinations based on neighbour cubes for faces, and make a script figure out which part of it to use and input it as uv" That is what I'm trying to do for my own project. But I must ask if it is any different than entering UV coordinates for albedo texture. Because built-in materials does not provide any sprite-sheet functionality for normal maps.,"Or another way is to create a normal atlas texture with all possible normal combinations based on neighbour cubes for faces, and make a script figure out which part of it to use and input it as uv" that's what exactly I need to achieve for my project. Any ideas how to do that?

@peter226

Comment
Add comment · Show 1 · 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 peter226 · Aug 29, 2020 at 01:21 PM 0
Share

It's the same as normal UV mapping, just use the second UV buffer if you also need textures, and keep in $$anonymous$$d that if you use filtering on your atlas texture you need to give each texture part a larger area (safezone) to avoid different parts blending together / bleeding into eachother. I'm not sure how to select the proper UV and also do it fast. You could look up the 16 cube "solidity" states surrounding the current mesh face, store them in a "short" value and use it as an index in an array, but this seems a bit slow to me, you could try to implement this and make it BurstCompile-able to get some usable results.

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

123 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 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 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 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 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 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 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 avatar image avatar image avatar image avatar image

Related Questions

Looking at a Chunk from Straight Down will not Render Blocks, but Looking at it from the Side does? 1 Answer

Cubic Voxel World 0 Answers

How to get blocks to Drop something when hit 1 Answer

FindObjectsOfType giving out null 1 Answer

Network Sync 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