Most Popular

1500 questions
8
votes
1 answer

Human Readable/Writable 3D Representation Formats/Languages?

My goal is to create 3D meshes without the use of a 3D editor. So I want to know what representation languages and formats there are that are designed for this or otherwise that would be good for this. I would prefer one that is open and widely…
Aardbei
  • 181
  • 4
8
votes
1 answer

Maximum number of vertices after clipping a triangle against an AABB

I clip a 3D triangle against a 3D Axis-Aligned Bounding Box (AABB) to obtain the largest planar polygon of the triangle contained in the AABB. My clipping algorithm is a (slightly modified) version of the robust (e.g. clipping planes have a small…
Matthias
  • 1,074
  • 9
  • 25
8
votes
2 answers

Overlaying graphics on particle simulation

How can I overlay graphics on particle simulations? For instance if I am representing a liquid or gas with tons of little points how can I make those points look like a liquid or gas? Take Nvidia Flex for instance, they simulate liquids and gases…
Andrew Wilson
  • 828
  • 7
  • 15
8
votes
1 answer

How to invert an affine matrix with small values?

I'm using an affine transformation matrix to transform 2D coordinates from screen (magnitude 10e3) to small parts of fractal sets (magnitude as little as 10e-15). I also need to map the other way round, so I simply invert the matrix. It works when…
solendil
  • 251
  • 1
  • 5
8
votes
1 answer

Do modern GPUs contain barrel shifters?

I'm aware that most modern GPUs, although designed for floating point, are more or less equivalent in integer performance these days, with a few caveats like the lack of a fused multiply add. I'm not sure how this applies to shift operations though.…
russ
  • 2,392
  • 9
  • 18
8
votes
1 answer

Conserving Mass in Liquid Simulation

I am trying to implement a 2D version of Foster and Fedkiw's paper, "Practical Animation of Liquids" here: http://physbam.stanford.edu/~fedkiw/papers/stanford2001-02.pdf Mostly everything works, except for section 8: "Conservation of Mass." There,…
8
votes
2 answers

Raytracing Problem - Casting Shadows

So I was tasked to create a model of the Cornell Box. I've managed to do everything up until casting shadows, in which case some shadows are cast when there should not be any. Here are pictures of what it looks like now and a larger picture of what…
8
votes
2 answers

Am I missing something for ambient occlusion?

I'm trying to implement ambient occlusion in Python 3 and I'm seeing shadows beneath my reflective spheres but they seem very faint. I'm not sure if that means I've missed something, or if I just have a false impression of how much shadow results…
8
votes
2 answers

Ray tracing with thin lens camera

I'm reading Cook's paper "Stochastic Sampling and Distributed Ray Tracing", I don't understand how the rays are generated. He says: Determine the focal point by constructing a ray from the eye point (center of the lens) through the screen…
arcollector
  • 151
  • 2
8
votes
1 answer

Explicit vs Automatic Attribute Binding

I'm a beginner in OpenGL and I've been doing some research on the topic of shaders and attributes. Most places I go say that explicit attribute binding (whether it be in the shader itself with layout(location=x) or with glBindAttribLocation) is…
Chara
  • 283
  • 1
  • 11
8
votes
1 answer

Finding a color perceptually similar to an image

I'm working on a program to use randomly-selected images as a desktop background. Now, not all images are the same shape as a computer monitor. One idea I had for dealing with this is to set a background color that is perceptually similar to the…
Mark
  • 1,612
  • 16
  • 22
8
votes
1 answer

Cost of parameter passing in webgl pixel shaders?

In a webgl pixel shader, all functions are inlined as i understand it, however you can have parameters that are marked as in versus being inout meaning that their value can change but the value won't persist outside of the function call. Does this…
Alan Wolfe
  • 7,801
  • 3
  • 30
  • 76
8
votes
1 answer

How to implement a realtime 2D light renderer with fog/colored light on the GPU?

Since long ago I wanted to implement a 2D lightning algorithm based on an idea I saw on YouTube. The video is realtime, but it runs on the CPU and the resolution is pretty low. I'm curious if anyone has an idea how to do this on the GPU. The…
sydd
  • 253
  • 1
  • 4
8
votes
1 answer

The meaning of early ray termination and front-to-back traversal in ray tracing

I'm new to computer graphics. These days I've been trying to understand how ray tracing using an acceleration data structure works. I came across the term "early ray termination" several times, I looked it over the internet several times too, but I…
S.E.K.
  • 141
  • 1
  • 5
8
votes
2 answers

Real-time translucency effect

While rendering my scene with OpenGL, I sometimes add an overlay which contains information, settings and a few draggable items. Currently, the overlay has a slightly transparent background to make text easily readable while still allowing the scene…
Nero
  • 1,320
  • 3
  • 15
  • 31