WarAmp

Member

318

750 Good

• Rank
Member
1. photo renderer for unreal engine3

Well, what exactly do you need help with? What area are you having problems in?   It looks fantastic, btw.    edit: Prematurely submitted.
2. OpenGL SNES Like 5 Layer 320x240 Graphics Library

The problem is that we DON'T understand what you wrote. Is this something you made? Is this just something you found and thought was cool and wanted to share? What's the purpose? Is it supposed to be a SNES emulator running on the GPU? Etc?
3. Moving Sphere vs Triangle Collision - Misunderstanding concepts!

If it's a moving sphere, you can just do ray->triangle intersections, and all you have to do is for each triangle, move the origin of the ray along the normal of the triangle by -radius.   Like this:   Sphere s(center, radius)   foreach(T in Triangles) {    if (s.touching(T))    {        // Already touching the triangle...do whatever.    }    else    {       Ray ray(s.center - (T.normal * s.radius), sphereDirection);       if (ray.Intersect(T))       {          CollisionPosition = ray.intersection;          SpherePositionAtCollision = CollisionPosition + (T.normal * s.radius);       }    } }   edit: I thought about this some more and I am wrong. This *does* do some of the work, but you still need to test the sphere against the triangle edges.
4. How did 2D games handle this collision in antiquity?

Well, you could have the collision shape actually just be half the width of the sprite, but "slide" based on the direction the sprite is moving.   ie: For ground collisions, the collision shape is width/2, but one side is always at the center of the sprite, and the other side is opposite the direction of motion. If no ground collision is detected, expand the shape to full width and test again, this way you can still handle edge cases when jumping/falling properly.   Does that sound like it should work?
5. Give an example of specific values for b_1,b_2 and b_3 so that there is no solution

b_2 = 2*b_1 + b_3?   as for 'specific values', just pick anything that doesn't work....   b_2 = 0 or any negative number ( <= 0)...   b_1 = any positive (> 0) number.... b_3 = any positive (> 0) number....   Maybe I don't understand the question?
6. Digits of Pi

This is where your misunderstanding lies. There is a 50% chance that the referee has put a bullet in this gun. Not in this chamber. You don't know which gun you have. You might have the empty gun.   Think of it like this: You have a total of 12 available barrels. 1 barrel has the bullet.  Initial chance: 1/12 second chance 1/11 third chance 1/10 4th chance 1/9 5th chance 1/8 6th chance: 1/7.   It doesn't matter what random subset of barrels you take the first 5 samples from. If there wasn't a bullet yet, it has to be in the next 7 barrels.
7. Intersection between a circle and an aabb?

Step 1) Find the closest point on the AABB to the center (C) of the circle: This will be your potential collision location. (P) Step 2) If the distance between C and P (D = magnitude(C - P)) is less than the radius of the circle (R), then you have a collision! Step 3) The penetration depth is then (R - D) Step 4) The normal is the normalized (C - P) vector.

You may also try searching the term "MatCap" or "Material Capture" as this is very similar (if not the same) as that. Render your lights and material to a sphere, then use that resulting image as your lighting environment. Essentially you are precomputing light+material interaction for lights fixed to the viewpoint.   http://cgcookie.com/unity/2013/02/18/introduction-to-matcaps-in-unity/
9. How to draw the heightmap properly?

Geo-mipmapping (http://en.wikipedia.org/wiki/Geomipmapping) and  Geo-Clipmapping (http://research.microsoft.com/en-us/um/people/hoppe/gpugcm.pdf)   Are the most common ways of doing this.

This is called "Horizon Mapping" (http://research.microsoft.com/en-us/um/people/cohen/bs.pdf) iirc.  Your implementation of 2 values per point will only work for 1 axis of light though. Take your image for example, what happens when the sun moves over the sky to the other side and begins to set? The occlusion heights from that direction are different, and now your precomputed 2 values are no longer correct.
11. Rectangle

You will need to give us more than just your drawing code if you want us to help with a collision issue It's likely that you are only testing ballvec.X/Y in your collision routine rather than the whole Rectangle, show us how you are determining the collision and 'bounce' and we can help you further
12. What do I do with this?

[quote name='Ahl' timestamp='1345478925' post='4971508'] [CODE] struct MyVertex { float x, y, z; // Vertex float nx, ny, nz; // Normal float u, v; // Texcoords float a, r, g, b; // Color float padding[4]; }; [/CODE] [/quote] My openGL is a bit rusty, but I believe you want the value passed into the gl*Pointer() functions to actually point to the part of the struct that is relevant. ie: [CODE] glNormalPointer( GL_FLOAT, sizeof(MyVertex), &(*RenderListIT)->RenderMesh->VertexData.nx ); glTexCoordPointer( 2, GL_FLOAT, sizeof(MyVertex), &(*RenderListIT)->RenderMesh->VertexData.u ); glColorPointer( 3, GL_FLOAT, sizeof(MyVertex), &(*RenderListIT)->RenderMesh->VertexData.a ); //etc.... [/CODE]
13. Calculate Slope with only three points?

If all you have is A(x, y) and B(x, ?) you simply don't have enough data. There are an infinite number of lines that pass through A(x,y) and the boundary B(x, ?). You can set ? to any value and create a line, but there is no single specific line. If you have an angle already, then JTippets post explains how to solve for ?.
14. heading to position transform angle in C++

Ok Mike4, one more time: What are you trying to do? There seems to be a language barrier issue here, perhaps describe your problem in your native language, and another poster can help you that way? [quote name='mike4' timestamp='1337517222' post='4941631'] I can only use x,y,z and heading for source and listener. [/quote] What do you mean by this? Are you saying that you have the location and heading angle of both the Source AND the Listener? If that's the case, you would use alListener3f with AL_POSITION to set the x,y,z and then use a separate call to alListener3f with AL_ORIENTATION to set the orientation. A quick google search will tell you how to use the given heading with alListener to create the 'at' and 'up' vectors you need. If you only have partial information about the listener/source then please tell us explicitly the information you have.
15. heading to position transform angle in C++

If you are just trying to transform [0, 360] to [180, -180] then just: newAngle = 180 - angle; But what would really help us help you is some context. We can sort of see that you are having a problem with OpenAL, but other than just saying 'Not hearable at certain angles' we have no idea what you are doing vs. what the result is you are trying to achieve. Maybe even draw us some pictures to illustrate the problem? Spend some time explaining the situation and we can spend more time trying to help. The more information you give us, the more we have to work with.