3 ms·
I would imagine you could benefit from a bit of thought about how to handle your coordinate system to avoid floating point precision problems. There are ways t
by radarsat1 10y ago
I would imagine you could benefit from a bit of thought about how to handle your coordinate system to avoid floating point precision problems. There are ways to avoid huge numerical precision ratio issues. It should only be a problem if you are simultaneously visualizing very large and very small objects, but in that case there are other methods (e.g. pre-rendering small objects that won't change much based on the viewing angle). If you are blindly throwing huge numerical ratios at your renderer you are bound to have problems.
It's not ideal, of course it would be better to ignore such issues and just find a system that can "handle it" but dealing with numerical issues and the need for "clever tricks" is simply a reality of dealing with numerical approximations of reality.
- david-given 10y agoWell, I am rendering very large and very small objects, many of which intersect. Planets are modelled as a single huge object (earlier versions of the project used a Povray isosurface, but I'm now generating a mesh for the area around the camera). That's pretty much unavoidable based on the goals of the project. What I'm currently doing is arranging things so that the camera's at (0, 0, 0) in world space, which means that precision loss caused by arithmetic is minimised. That solved the problem completely for me, by which I mean that I haven't noticed any more artifacting. But it does mean that I have to be aware of where each object is going to be in space rather than just creating them using local coordinates and translating them later. Some interestingly broken pictures here: http://stackoverflow.com/questions/20307441/is-this-a-povray-precision-loss-artifact http://stackoverflow.com/questions/20307441/is-this-a-povray...
- radarsat1 10y agoGreat, sounds like you found a solution then ;) I guess my point was more that you can't really expect another renderer to do much better, as it's a problem with what you (were) doing rather than a problem with the renderer per-se. Making things closer to the camera coordinates probably overall makes sense. But, I still think it's not a bad idea if you run into more trouble, you could also try rendering small and large objects separately and compose them afterwards. You'll still have to mess around with coordinate systems of course but separating the large and small objects might make it easier to do that. (e.g. make large objects smaller, camera closer, and render, make small objects bigger, camera same distance, overlay the two images.. it's to force the vector coordinates to be in ranges that are tractable for the rendering algorithms. Annoying, but possibly necessary in your case.) Nice pictures btw ;)