Manta Interactive Ray Tracer Development Mailing List

Text archives Help


Re: [Manta] discussion time


Chronological Thread 
  • From: Carson Brownlee <brownlee@cs.utah.edu>
  • To: Roni Choudhury <roni@cs.utah.edu>
  • Cc: manta@sci.utah.edu
  • Subject: Re: [Manta] discussion time
  • Date: Mon, 15 Oct 2007 12:06:11 -0600

Hey Roni,
I am doing the exact same thing as you are and I used the exact same fix. Thankfully it's simple once you know how... until someone changes preprocess contexts again which happened to me a little while ago. It would certainly be nice to have some sort of check if the object is dirty and needs to be preprocessed again though that might entail going through every object in Manta and writing additional code into their rendering and preprocessing functions given the way manta is currently set up. Let me know if you find a better way,
Carson


On Oct 15, 2007, at 11:53 AM, Roni Choudhury wrote:

So I ran into some trouble yesterday, and Abe helped me resolve the problem, but it left some questions on my mind.

I'm embedding Manta in a Qt application (so that it can do OpenGL rendering as well), and I'm looking at particle data that comes in several timesteps. For each timestep I build a Group that contains primitives representing its data. I create an acceleration structure that controls that group, and then I have my Scene own the AS for the first timestep. When I generate a Qt signal to "go to next timestep", I call Scene::setObject() with the appropriate AS pointer. (Don't worry, I do that in a transaction...more on that later).

The problem was that after the transaction posted, the rendering threads would crash due to a null LightSet, which Abe finally helped me figure out was happening because the timestep Group I had just switched to had never called preprocess(). I fixed this by hacking up an appropriate PreprocessContext and calling preprocess() explicitly on each Group before launching the raytracer itself.

Here's my question: shouldn't things like Groups know that they haven't been preprocessed and do it automatically before they get rendered? I only ask this because for a long while this scene I've been describing just worked, and last night it took me two hours of debugging, plus another hour with Abe, to find and fix the problem. Did something change recently? Or was I just lucky before?

My other issue is with transactions. To reduce programmer burden, I think it would make sense if "transactable" methods were made private, and then the few methods/functions where it makes sense to call those methods directly were friended to the class. That way there would be compile-time protection against committing what is essentially a fatal error that causes byzantine failure. Is this possible from a practical standpoint? Would it complicate the lives of millions of users/developers?

Thanks guys!

roni






Archive powered by MHonArc 2.6.16.

Top of page