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 erick_weil · Feb 14, 2014 at 10:13 PM · meshcubevoxelpointerhighlight

highlight a portion of a mesh in runtime

I am making a voxel-based game, that uses Marching Cubes to generate the chunks, and the terrain is editable at runtime, allows to place or destroy "blocks", and exist a pointer to show which cube will be edited, but this is not nice to preview what really will be modified, I want a highlight in the position which is to be edited.

image that represents what I want : alt text

and a video of voxel farm engine thats represents the idea ( skip to 3:00 ) : Voxel Farm Engine: July 2013

what is the approach needed to achieve this?

(sorry for my too bad English,I from Brazil)

asnwer.jpg (152.2 kB)
Comment
Add comment · Show 4
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 getyour411 · Feb 15, 2014 at 12:35 AM 0
Share

Capture the material.color to temp, change the material.color to add some red on the cube that's currently active, when the widget moves off the cube set original color back to temp and do it again on the new cube. Have you tried something like that?

avatar image erick_weil · Feb 15, 2014 at 01:21 AM 0
Share

Capture the material.color to temp,

change the material.color to add some red on the cube that's currently active getyour411 this not works, if I change the material.color, all the chunk will be painted into red, which chunk contains 10x10x10 cubes; and each cube I place, is modified not one single chunk, but in some times( at the corners) 8 chunks!; I need something which works similar a shadow, or lighting, but only in the limits of the pointer;
avatar image getyour411 · Feb 15, 2014 at 01:29 AM 0
Share

Why would you change all the 'chunk' - when your pointer is on top of a cube, can't you access just that one cube's material.color?

avatar image erick_weil · Feb 15, 2014 at 01:56 AM 0
Share

the terrain is not made of single cubes with yours single meshs and each ones with yours material color to edit,is made of various chunks,containing 10x10x10 cubes!, see this image:alt text your aproach not works!

1 Reply

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

Answer by erick_weil · Feb 15, 2014 at 07:44 PM

ok, I solved for myself this problem, I Imported the projectors assets, and created a custom material using the asset multiply shader and asigned this material ( red ) in a ortographic projector, with your dimensions ( near cliping plane, far cliping plane, ortographic size) resized to agree the cube scale, the projector is child of the pointer.

Works very fine and the result is the same I expect, like the images above in the question.

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

18 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

Related Questions

Sphere made of cubes algorithm 4 Answers

Cube made out of many voxels 0 Answers

How to assign texture to a specific mesh in a chunk for a minecraft game? 1 Answer

Is it possible to surround a voxel model with an invisible sphere mesh? 1 Answer

How can I implement "3D voxel digging"? 2 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