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
1
Question by IPI · May 29, 2013 at 03:27 PM · meshcubespaceice

Visualizing space between three or more objects

I have been trying to visualize the space either within objects or between objects. I would appreciate any input here.

  1. The simplest case is, let say i have an empty cup. You fill up the cub with water, let it ice and remove the cup. In this case you have the ice formation which is the space inside the cub. How can I create a mesh the represents space inside the cup?

  2. I am also trying to visualize the negative space between four cubes (picutre below) or three cubes and one sphere. If there was a way to fill them with water and freez it for example, you would be able to see what that looks like.

alt text Fig1: four cubes

alt text Fig2: three cubes and one sphere

Any ideas on how I can achieve this?

screen shot 2013-05-29 at 9.15.00 am.png (170.6 kB)
screen shot 2013-05-29 at 9.18.01 am.png (193.5 kB)
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 · May 29, 2013 at 03:57 PM 3
Share

I'm not sure what the goal here is nor how good you have to be or how fast. But if the situations "real" world, you could use small spheres and rigidbodies and pour them into the cavity and freeze them. You might have to shake them around with a bit of AddForce() to get them to settle into more complex shapes.

You could also run a "probe" down into the cavity systematically ray casting to generate points to produce a point cloud. You could place a small sphere at these points, or could place a small disc or plane at each hit point using the normal (or inverse normal) at that point.

avatar image IPI · May 29, 2013 at 04:10 PM 0
Share

Thanks robertbu for your input. The first approach you have suggested works for static objects and also depends on physics engine contraints in terms of how many of those spheres can be simulated. It is a great suggestion.

In terms of ray casting, thats a very interesting approach too. $$anonymous$$aybe find the center point between all parties and start sending rays at random directions. If there is a hit, place a sphere or some sort of representation there and see what the point cloud looks like. This should visualize the outer space (edge) and outline the space. I am going to give this a try.

What would be great if there was a way to generate a mesh from this space. This is why I am trying to figure out. Although with the ray tracing if I can come up with enough points, maybe can use it as vertices and see what that mesh looks like.

Great suggestions. Appreciate your input :-)

avatar image robertbu · May 29, 2013 at 04:14 PM 0
Share

Rather than casting from a central point, how about moving the point downward from the top of the cavity to the bottom, casting in a circular plane. It might be easier to build a mesh from the results.

avatar image IPI · May 29, 2013 at 05:30 PM 0
Share

Sure casting from bottom would definitely work as well. I will be doing this for moving objects. Lets say 4 humanoid moving and are positioned in a circular position. In terms of raycasting my 4 animated humanoid don't have ridget bodies.

As far as I could find, raycasting requires colliders. Is there a way to raycast and detect the collision between a given ray and mesh vertices?

I prefer to not get physics involved. Below is a screen shot of an acutal space I am interested in. As these guys move, the mesh collider I added to each one doesn't get updated because there is a skinned mesh renderer. So trying to see if I can do this just by using some sort of raycasting to detect collision of the ray with mesh vertices.

alt text

screen shot 2013-05-29 at 11.25.21 am.png (363.9 kB)
avatar image robertbu · May 29, 2013 at 05:45 PM 0
Share

Your pictured didn't post. You don't need a rigidbody for raycasting, but you do need a collider. You can use layers to isolate the the colliders and raycasts from the rest of your game logic. As for verticies, you can easily get them from the mesh and convert them into world coordinates, but I don't know how you do the occlusion culling. That is, telling if a particular vertex can be seen from the stat point or if it is occluded by another part of the mesh (or even another mesh).

Show more comments

0 Replies

· Add your reply
  • Sort: 

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

14 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

Related Questions

Adjusting strange Vector3.Normalize behaviour 2 Answers

Game Object's Vector3 changing threw script without reason 1 Answer

Incorrect cube subdivision mesh 1 Answer

Help with generating dynamic mesh 0 Answers

Round edges of cubes? 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