It is currently Mon Dec 09, 2019 6:52 pm

 All times are UTC

 Page 1 of 1 [ 4 posts ]
 Print view Previous topic | Next topic
Author Message
 Post subject: How to get the nearest voxel from a 3d point ?Posted: Sat Aug 11, 2012 1:18 pm

Joined: Tue Jul 24, 2012 1:02 pm
Posts: 11
Location: France
Hello all

I have a problem with PolyVox : How to get the nearest voxel position from a 3d point ?

I want to remove voxel density in a symbolic sphere (for example: create a crater). To calculate which voxel to remove, I need to know the center of this sphere.

I can get the center from the 3d environnement, but i must convert it to the volume position.

Can someone help me ?
Thx.

Top

 Post subject: Re: How to get the nearest voxel from a 3d point ?Posted: Sat Aug 11, 2012 6:52 pm

Joined: Tue Jul 24, 2012 1:02 pm
Posts: 11
Location: France
It seems to be the same coordinations... It will be easier so
=> resolved

Top

 Post subject: Re: How to get the nearest voxel from a 3d point ?Posted: Sun Aug 12, 2012 10:12 am
 Developer

Joined: Sun May 04, 2008 6:35 pm
Posts: 1827
Glad you solved it. Be aware that there is also an offset involved if you extract a region which does not correspond to the whole volume. I.e. if you have a volumeof dimensions 128x128x128 and you extract region (32,32,32) to (96, 96, 96) then a vertex with position (0,0,0) in the mesh actually corresponds to (32,32,32).

Also, watch out for offsets of 0.5. The voxel is at the centre of a cube whereas the faces surround it and are not at integer positions.

Top

 Post subject: Re: How to get the nearest voxel from a 3d point ?Posted: Mon Aug 13, 2012 6:10 pm

Joined: Tue Jul 24, 2012 1:02 pm
Posts: 11
Location: France

Top

 Display posts from previous: All posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost timeSubject AscendingDescending
 Page 1 of 1 [ 4 posts ]

 All times are UTC

#### Who is online

Users browsing this forum: No registered users and 2 guests

 You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot post attachments in this forum

Search for:
 Jump to:  Select a forum ------------------ General Discussion Forums    General Discussion PolyVox Forums    PolyVox Discussion    PolyVox Bugs    Showcase Cubiquity Forums    Cubiquity Discussion Voxeliens Forums    Voxeliens Discussion    Voxeliens Support