It is currently Sat Aug 22, 2020 4:27 am


All times are UTC




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Copying surface normals from "voxel painting tool"
PostPosted: Fri Jan 17, 2014 9:56 am 

Joined: Fri Jan 17, 2014 9:46 am
Posts: 1
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


Top
Offline Profile  
Reply with quote  
 Post subject: Re: Copying surface normals from "voxel painting tool"
PostPosted: Sat Jan 18, 2014 1:55 pm 
Developer
User avatar

Joined: Sun May 04, 2008 6:35 pm
Posts: 1827
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?


Top
Offline Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 3 guests


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

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Theme created StylerBB.net