Advertisement Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

140 Neutral

About Unfadable

  • Rank
  1. Hi all, The subject says it all. I'd like to know at what distance a sphere is roughly subpixel. - First I calculate the screen size in world space: screenSize = nearPlane * tangent( fieldOfView / 2 ); - Then I determine the size of a pixel in world space: pixelWorldSize = screenWorld Size / ( screenResolution / 2.0f ); - Then I use the law of similar triangles to solve for distance: worldDistance = radius * near / pixelSize It seems to work well in my testing. I'm eyeballing it, plus multiplying transforming a sphere at this distance into screenSpace to check the extents are within a pixel. Does this all sound reasonable? Also, any tips for testing? Thanks, unfadable
  2. Unfadable

    General ray tracing timing question

    Quote:Original post by Samith ...Not exactly comparable to your situation, but it's a situation none-the-less. Thank you! That's exactly the kind of thing I was looking for. I wish there was something higher than "extremely helpful" that I could rate you with for answering my question. Anyways, I am not using any spatial partitioning scheme and pretty much the way the camera is oriented, every triangle is considered (no early outs). I'll get to the optimizations eventually.
  3. Unfadable

    General ray tracing timing question

    Quote:Original post by cignox1 IMHO, trying to guess those figures is close to useless. That really depends upon what features are implemented and how. I'm precisely interested in the features and the how. It's educational to me, therefore not useless. Timings from (say) a GPU based approach has value in this thread even though I'm doing a traditional CPU approach. Quote:Original post by cignox1 By the way, are there reasons why are you using 8 threads on a 2 core machine? Nope. I just kept bumping up the # of threads until I saw something close to a 2x speed-up. The 1024 spawned rays is arbitrary as well. My optimized SIMD line ray trace has a free register component that I need to take advantage of. There's obviously some room for improvement which I will get to eventually. But first, how about those timings? :) btw, thanks all for feedback. edit: a bit more clarity [Edited by - Unfadable on January 5, 2010 9:54:50 AM]
  4. Unfadable

    General ray tracing timing question

    Thanks for the suggestion, silvermace, it is a good one. I am still interested in general numbers.
  5. Unfadable

    General ray tracing timing question

    I was hoping for some actual figures. Again, its a general question so describing a specific situation would be helpful. Let me give an example. On my dual core 2.8GHz machine, my raytracer renders an 800x600 scene with 3969 triangles, 1 indirect bounce (spawning 1024 rays using stratified sampling), ambient occlusion, 8 threads, light SIMD optimizations in 2 hours 55 minutes. There's no hit caching or irradiance caching. All CPU line triangle traces. See, that wasn't too hard :) Anyways, my primary concern is how fast should I be able to get this. However, I'm also interested in general ray-tracing timings whether it be GPU based, 1 core, a zillion cores, 1080, a million triangles, etc.
  6. Just a really general question. How long does it take to trace a scene? At what resolutions? # and type CPUS? # tris? Its just a general question, so any parameters is appreciated. Thanks.
  7. Unfadable

    Math for adding attachments to an animated mesh

    Hi, Thats a good idea of course, but is just not an option for me in my situation. Let me simplify my question. I would like to find the relative offset of my attachment from a particular bone. Is the relative position: attachPosition - RefPoseBonePosition? Is the relative orientation: Inverse(RefPoseBoneOrientation) * attachOrientation? edit: After thinking about it, relative position should be attachPosition * Inverse(RefPoseBoneOrientation). Relative orientation shuold be attachOrientation * Inversed(RefPoseBoneOrientation) [Edited by - Unfadable on October 26, 2009 8:01:46 AM]
  8. Hi, So I have an attachment (say an arm shield) that I need to attach to an animated mesh (say offset from the wrist). The attach point is specified in model space according to the mesh's base pose. While the mesh is animating, I need to determine the model space's position and orientation of the attach point. My thought is to determine the relative offset and orientation of the attachment according to some bone (in model space). Then during the animation, I use the bone's model space position and orientation to come up with my attach point's model space position and orientation. Questions: #1. Coming up with my offsets according to the reference pose. Is the initial relative offset: attachPosition - RefPoseBonePosition? Is the relative orientation: Inverse(RefPoseBoneOrientation) * attachOrientation? #2. To determine my attachment's model space position and orientation, I should just multiply my attachment's relative offset by the model space bone matrix. Correct? #3. If I'm supplied a position and orientation, is it correct to just plug these straight into a matrix to create the proper transform? #4. I'm somewhat limited by the functions available to me, but is there other ways to do this? Is the reference pose even needed for what I'm trying to do? Thanks, - U edit: I was confusing two different approaches I was trying. I updated my 2nd question, so its just one approach now. [Edited by - Unfadable on October 24, 2009 11:45:13 AM]
  9. So lets say I have evenly spaced points along the X axis. What I'd like to do is have them "bunch up" around certain intervals. Like they may be more concentrated around -2,-1,0,1,2. Can anyone direct me in the proper direction?
  10. Unfadable

    Pruning a BFS Tree

    Thank you much, Sneftel. That got me on my way.
  11. Unfadable

    Pruning a BFS Tree

    Well I'm building the tree to solve a puzzle, children nodes represent the next possible states. What I'd like is to not have redundant states in the tree so as to not waste time and space.
  12. Hey all, I'm looking into methods to prune a breadth-first-search tree for duplicate nodes but am having trouble googling methods and tutorials. Can anyone help me get started? Thanks,
  13. Hi, I'd like to execute and if-state if any component of a float4 is less than some value. float4 someval; It seems executing if (someval > 65536.f) just checks the first component. From the docs, it looks like I could do something like: if (any(step(someval,65536.f)) or make use of some similar intrinsics. What do you guy's think?
  14. Unfadable

    Looking to one-shot a .x animation

    So its the proper way to have different animations is to use a different animation controller? I'm using a single animation controller and changing track. It works for the most part minus the bugs mentioned above. It'd be preferable to me to continue using this system if possible. Thanks for the input.
  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!