Jump to content


Granting normals to voxels.


  • You cannot reply to this topic
9 replies to this topic

#1 rouncer

    Senior Member

  • Members
  • PipPipPipPip
  • 2325 posts

Posted 15 February 2009 - 10:45 AM

Im thinking about putting together a voxel model editor, but there seems to be a problem, how do you get a light to light them up when they have no normals?
You can give them a texture, but how do you make them diffuse light?

I was thinking maybe you give them floating positions inside the voxel compartment - and you use this to develop a smooth surface but is there a better way than this?

thanks for any replies...

#2 Rubicon

    Member

  • Members
  • PipPip
  • 90 posts

Posted 15 February 2009 - 11:03 AM

Make some using a sobel filter ?
Regards, Paul Johnson
www.rubicondev.com
My Free 3D Tower Defence Game

#3 kusma

    Valued Member

  • Members
  • PipPipPip
  • 163 posts

Posted 15 February 2009 - 11:09 AM

rouncer: I did a voxel-renderer with a friend that did something like that. We took the gradient over a large area, with gaussian weighting. It worked out quite well, but there were quite some banding in the normals for almost-axis-aligned slopes.

#4 rouncer

    Senior Member

  • Members
  • PipPipPipPip
  • 2325 posts

Posted 15 February 2009 - 06:13 PM

kusma said:

rouncer: I did a voxel-renderer with a friend that did something like that. We took the gradient over a large area, with gaussian weighting. It worked out quite well, but there were quite some banding in the normals for almost-axis-aligned slopes.

Wouldnt that destroy high frequencies tho?

#5 Rubicon

    Member

  • Members
  • PipPip
  • 90 posts

Posted 15 February 2009 - 06:19 PM

Seeing as I seem to be invisible, here it is from someone else
Regards, Paul Johnson
www.rubicondev.com
My Free 3D Tower Defence Game

#6 rouncer

    Senior Member

  • Members
  • PipPipPipPip
  • 2325 posts

Posted 16 February 2009 - 05:27 AM

Sorry Rubicon, so Its similar to converting a heightmap to a normal map.
Can you still use a 3x3 kernel and it would work?

I doubt it, because heightmaps have 256 positions and voxels only displace from each other in units, it would produce harsh angles.

#7 Rubicon

    Member

  • Members
  • PipPip
  • 90 posts

Posted 16 February 2009 - 09:40 AM

Yes, you can use it in any dimension.

Your're right about it not being mega smooth, but that's not a voxel speciality
Regards, Paul Johnson
www.rubicondev.com
My Free 3D Tower Defence Game

#8 rouncer

    Senior Member

  • Members
  • PipPipPipPip
  • 2325 posts

Posted 16 February 2009 - 12:30 PM

the only way would be to increase the kernal size and lose hi frequency components.

#9 kusma

    Valued Member

  • Members
  • PipPipPip
  • 163 posts

Posted 16 February 2009 - 02:51 PM

rouncer: No, high frequencies worked out quite OK. It's a matter of tweaking the filter, though.

#10 rouncer

    Senior Member

  • Members
  • PipPipPipPip
  • 2325 posts

Posted 16 February 2009 - 11:37 PM

Ok, thanksalot for the input.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users