3 ms·
If all pixels are squares in a grid, how could one represent a curved line? Answer is similar - approximation, and lots of tiny squares/cubes/voxels. E.g. htt
by Ygg2 8y ago
If all pixels are squares in a grid, how could one represent a curved line?
Answer is similar - approximation, and lots of tiny squares/cubes/voxels.
E.g. https://static1.squarespace.com/static/5aa5ba4b55b02ca2a2f3b593/t/5aa72daf9140b794ec5e990f/1520905671050/voxbun2.gif?format=500w https://static1.squarespace.com/static/5aa5ba4b55b02ca2a2f3b...
- amelius 8y agoThe problem is that no matter how small you make the voxels, the reflection will never converge to something accurate. You have this situation: * * * **** * <=== incoming light * ====> reflected light **** * * * Versus: \ | reflected light \ | \|______ incoming light \ \ \ PS: This makes me wonder how nature does it. Is the fact that photons are (in a sense) "bigger" than atoms responsible for the fact that we can have shiny surfaces?
- LoSboccacc 8y agophotons don't bounce, get absorbed and emitted from the materials at a specific frequency once the electron gets excited enough. metallic materials emit photon without absorbing much energy, while other material absorb more of the energy and radiate it later as infrared. the 'direction' of the emission depends on the interference with all the other incoming photons. that part is rooted in quantum mechanic and I've no idea how it works exactly.
- simias 8y agoThis is irrelevant to the way lighting is typically modeled in videogames.
- TremendousJudge 8y agohe was replying to the last sentence in grandparent
- simias 8y agoI missed the PS, my mistake. Thank you for pointing it out.
- Ygg2 8y agoSure, but then you don't use just Voxels, you use voxels organized in an octree. That way your voxels have information on their neighbors and can compute lighting and reflection for each such Voxel. http://lup.lub.lu.se/luur/download?func=downloadFile&recordOId=5384546&fileOId=5384547 http://lup.lub.lu.se/luur/download?func=downloadFile&recordO...
- Const-me 8y ago> That way your voxels have information on their neighbors and can compute lighting and reflection for each such Voxel. How many neighbors do you need to fetch from the tree for every pixel, to reconstruct a surface normal vector with good precision like 0.5-1% each axis? Without these normals, it’ll be very hard to implement stuff like specular lightning, and reflections/refraction/environment mapping. I think for this reason there’re no reflecting materials on the first video from that article (the one with the tank), and there’s high temporal noise on the second video “Voxel Surfaces with Materials”.
- Ygg2 8y agoI can't really say. This particular area isn't really my specialty, but cursory Google searches yielded some interesting links. From what I remember, there are techniques to cull voxels that aren't visible. So it's possible some of them don't even matter when doing calculation. See: https://tomcc.github.io/2014/08/31/visibility-1.html https://tomcc.github.io/2014/08/31/visibility-1.html https://tomcc.github.io/2014/08/31/visibility-2.html https://tomcc.github.io/2014/08/31/visibility-2.html From what I gather, the biggest issue with Voxel are lack of proper hardware support, forcing you to render more using software.
- Const-me 8y ago> there are techniques to cull voxels that aren't visible Culling invisible voxels is fine. But to reconstruct a normal with sufficient precision, I’d say you need to sample quite large area of nearby visible voxels. IMO the RAM bandwidth costs are prohibitive. As far as I understand it’s impossible to do in screen space because that would introduce artifacts near the edges of the objects. With traditional rasterizers, accurate per-pixel normals are very cheap to compute, i.e. some computations in the VS, then interpolation within triangle implemented in hardware, then a single lookup from the normal map in the PS. > lack of proper hardware support What hardware support would you need for them? GPUs are very efficient doing many kinds of general-purpose computing. For the storage, modern GPUs support volume tiled resources, at the first sight this feature in D3D 11.3 and 12.0 looks very suitable for these voxels: https://msdn.microsoft.com/en-us/library/windows/desktop/dn914605(v=vs.85).aspx https://msdn.microsoft.com/en-us/library/windows/desktop/dn9...
- avian 8y ago> Is the fact that photons are (in a sense) "bigger" than atoms responsible for the fact that we can have shiny surfaces? Yes, if you simplify things a bit, this is true. "size of the photons" is in this case their wavelength. Wavelength of visible light (~500 nm) is very much larger than the size of silver atoms in a mirror (~100 pm). This is why you can have a mirror even with surfaces that are not atomically flat.