Volumes Of Fun
http://www.volumesoffun.com/phpBB3/

Copying surface normals from "voxel painting tool"
http://www.volumesoffun.com/phpBB3/viewtopic.php?f=14&t=567
Page 1 of 1

Author:  suncore [ Fri Jan 17, 2014 9:56 am ]
Post subject:  Copying surface normals from "voxel painting tool"

Hi!
Is it possible to manually set surface normals of an added voxel?
For example, let's say I'm "painting" voxels with a sphere. I set voxels inside the sphere. For each voxel I would like to be able to specify a normal, which should then be used in the generated mesh. This way, the mesh surface will "copy" the normals from tha painting tool (sphere) and when combined with marching cubes, the surface will look really smooth.
What do you think?

(I have tried it in my own software and it works really nice but it would be neat in Polyvox too).

BR,
-- Henrik

Author:  David Williams [ Sat Jan 18, 2014 1:55 pm ]
Post subject:  Re: Copying surface normals from "voxel painting tool"

I don't think that what you describe is possible in PolyVox using the current setup, because PolyVox does not store the normals with the volume data. Generally we are only storing a density field as input for the Marching Cubes algorithm, and normals are computed on demand from this density field. It is possible to get smooth surfaces (e.g. a sphere) as long as the density values are continuous and not just on/off.

That said, Matt has recently been working with the Dual Contouring algorithm and one of the characteristics of this is that the surface normal is indeed stored with the voxel data. Perhaps this is closer to what you are trying to achieve?

Page 1 of 1 All times are UTC
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/