# mahendragr

Members

25

100 Neutral

• Rank
Member
1. ## Scale values from one range to another, but seems tricky

Awesome, thanks for the reply, i solved it! [quote name='Kian' timestamp='1315425357' post='4858780'] You can see that 256*256 = 65536. So to scale your values, first multiply the index by 256, to get the new locations for the actual values you are certain about. So your value at position 3 in the first array ends at position 768 in the second array. This leaves rather large gaps between the values, however. How to fill them depends on how much computational power you want to spend, and what appearance you want the output to have. I'll give an example with smaller sets below: first array (size 4) -> resulting array (size 8) We multiply the indices by 2 array[0]= 0.5 -> 0*2 -> newarray[0]= 0.5 array[1]= 0.3 -> 1*2 -> newarray[2]= 0.3 array[2]= 0.7 -> 2*2 -> newarray[4]= 0.7 array[3]= 0.1 -> 3*2 -> newarray[6]= 0.1 We know the positions of the original values, but we have gaps for the values newarray[1,3,5,7]. The quickest method would be to use the value of the previous element in the array. So newarray[1]=0.5, newarray[3]=0.3 and in general newarray[x]=newarray[x-1], when x is odd. You can also do linear interpolation, where the value at each point is the midpoint of the values at each side. So for x=odd, newarray[x]=(newarray[x-1]+newarray[x+1])/2. Depending on how smooth you want the output to look, you can go with quadratic or higher order interpolations. You should look up interpolation of you're not sure how to do it. [/quote]
2. ## Scale values from one range to another, but seems tricky

I have an array, whose size is 256. This array has elements which are in 0 to 1 range. Now, i need an array whose size should be 65536, where each element should be interpolated or scaled from the original array of 256 values. Some kind of mapping where, lets say, 10 values from the original image should match to more number values in the bigger array. Is it doable?
3. ## kd-tree in volume rendering

Hi all, I have a weird situation with kd-trees. I have implemented a kd-tree for volume rendering, which is also used for load balancing in a cluster-like environment. For example if there are two machines, each machine gets a part of the tree starting from the root and renders its portion. However, when i detect a load imbalance, i move the subdivision plane in the kdtree so that the machine which is slower gets less number of leaves(which contain the data), the problem now is, when i move the sub-division plane, i have two new bboxes, which are inturn divided again(which i dont want to happen as i save the old leaves based in its bbox and reuse them to prevent data reloading). My question is, how should i stop my tree from being subdivided again into smaller chunks, which are less than the leaf size
4. ## Regarding my thesis

Hey, thanks for the link tachikoma, looks interesting.
5. ## Regarding my thesis

Hello guys, Thanks for your suggestions, i'm actually reading some papers and found out global illumination in the voulmetric lighting to be interesting. Is there any work done on out of core rendering of large medical data sets, say like 8gb or more size??, and is there any research on compression/de compression algorithms for these huge data sets??, it would be really nice if someone with volume rendering experience replies.
6. ## Regarding my thesis

Hello all, I'm a student studying in a university in germany, i'm about to start my thesis and thinking about volume rendering domain. Can one tell me where i can find the latest research topics on volume rendering?, my professor wants some ''new'' work in the field, i already proposed him a GPU cluster based volume rendering, but he isnt happy with that, so it would be really nice if somebody points me to new-latest topics in volume rendering, Thanks and regards
7. ## BRDF implementation problem

@cignox1 well actually i want to have a distribution (whose variance is known) around the view direction, this is what i wanted to know, how to center this distribution around my view direction
8. ## BRDF implementation problem

Hello guys, I have a weird situation now, i'm trying to implement BRDF for my raytracer. This is my situation : Given : outgoing direction of ray incoming direction of ray normal color at that point variance of the gaussian lobe and I want to : implement BRDF by centering a gaussian normal distribution around the reflection direction for perfectly specular reflection question is : how to center the gaussian distribution!
9. ## How to generate rays in a simple ray tracer/pin hole camera

@superVGA Yes i got you. The reason why i dont want to generate all the rays at once is that i'm trying to write a function which is then called inside a loop in some other function.
10. ## How to generate rays in a simple ray tracer/pin hole camera

sorry, my intention of pasting the code was to make myself clear. I dont see a reason to interpolate. I JUST want to return a single ray (knowing camera properties and knowing the pixel co-ordinates etc).
11. ## How to generate rays in a simple ray tracer/pin hole camera

CRay CPinholeCamera::GenerateRay(RealType x, RealType y, RealType rWidth, RealType rHeight) const { /* (right, up, view) vectors are given m_rFocalLength contains the distance from the eye point to the image */ double pi = 3.14159265; CRay ray; RealType fovx,fovy; VectorType3 dir; ray.SetOrigin(m_v3Eye); fovx = pi/4; fovy = rHeight/rWidth * fovx; u = ((2 * x) - rWidth) / width * tan(fovx); v = ((2 * y) - rHeight) / height * tan(fovy); dir = (); // what should dir have here dir.normalize(); ray.SetDir(dir); return ray; }; Thanks for your reply..here is my code..
12. ## How to generate rays in a simple ray tracer/pin hole camera

Hello guys, Sorry if this is a repost. But i didnt find a proper solution/answer for my question. I want generate rays for my ray tracer. I have the following in hand : 1.Up/right/view vectors of my camera 2.origin of my camera 3.(x,y) - the pixel co ordinates. 4.width and height of my image plane. 5. distance from camera to image plane. I know i shud use field of view, but i'm not able to figure it out. i can set the origin of the ray ray.origin(cam_origin); but i have to set the direction of my camera (how to do it?!)
13. ## Book suggestion for sub-divsion/sub-division surfaces

Thank you, I'll try that book!
14. ## Book suggestion for sub-divsion/sub-division surfaces

Hello guys, any good literature/good book suggestions for sub-division concepts (including surfaces)..the siggraph material is good, but its not in detail..any other suggestions??
15. ## school choices

hmm..so u say i'm on a right path if'm willing to get into the programming aspect of game development?