Jump to content


computing voxel normals


3 replies to this topic

#1 rouncer

    Senior Member

  • Members
  • PipPipPipPip
  • 2725 posts

Posted 01 August 2011 - 09:07 PM

i sorta read a bit of complex jargon on this i didnt quite understand, but i figure i get how people do it.
say i take the neighbourhood of a voxel and weight the final normal direction by the count of 90 degree faces in each direction.

how successful is this, and is there an example of it i could see somewhere?

im in a debate whether i should do this, or keep a floating position inside the voxel to compute normals, the latter being difficult enough for me to think twice about doing it.
you used to be able to fit a game on a disk, then you used to be able to fit a game on a cd, then you used to be able to fit a game on a dvd, now you can barely fit one on your harddrive.

#2 v71

    Valued Member

  • Members
  • PipPipPipPip
  • 355 posts

Posted 01 August 2011 - 11:00 PM

I fear that this might lead to some very concentrade normals along the edges , have you thought to compute the voxel normals, like ordinary small cubes and then averaging if they share an adjacent cube ?
Check my code in the c/c++ section :
http://www.binpress.com/browse/c

#3 tobeythorn

    Valued Member

  • Members
  • PipPipPip
  • 189 posts

Posted 02 August 2011 - 01:08 AM

Rouncer,
Since a voxel can stand on its own, or be out on a peninsula, and is a 3d object, not a surface, a voxel really must have a vector for each face, even if it is part of a "surface". v71's suggestion sounds good, per face.

edit,
you might also start by drawing difference configurations of nearest neighborhood configuration (in 2d) and figuring out what kind of normals make sense for each situation. Then, see if you can generalized (much better than writing out 2^9th cases manually).

#4 rouncer

    Senior Member

  • Members
  • PipPipPipPip
  • 2725 posts

Posted 02 August 2011 - 08:01 AM

points taken, yeh maybe youd lose detail.
im just colouring per cube, i dont have enough memory already.

my plan is i super sample the voxels and get a floating position inside the voxel (extra 3 bytes per voxel), then i can make proper directions, and might improve editing tools too.
you used to be able to fit a game on a disk, then you used to be able to fit a game on a cd, then you used to be able to fit a game on a dvd, now you can barely fit one on your harddrive.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users