llvllatrix

Members
  • Content count

    1239
  • Joined

  • Last visited

Community Reputation

340 Neutral

About llvllatrix

  • Rank
    Contributor
  1. running GLX sample code on org

    Are the functions missing or is the file missing? Your problem could be related to: http://wiki.debian.org/Xorg69To7 Cheers, - llvllatrix [Edited by - llvllatrix on March 28, 2007 3:57:00 PM]
  2. Announcement: Beta code release

    Nice job guys [smile] Code looks solid.
  3. implementing streamtube

    You should be able to post your results using ImageShack or Photobucket: http://www.imageshack.us/ http://photobucket.com/
  4. NeHe Lesson 35 (Playing AVI) Problems

    Unfortunately I don't know much about codecs and video. Regarding question 2, I know there is a Microsoft SDK called microsoft media encoder that lets you specify the fourcc for the codec you want. I'm sure there are other SDKs that will let you decode video as well. libavcodec, for example (http://en.wikipedia.org/wiki/Libavcodec) seems like a good place to start; their communities can probably give you better insight into your questions. Once you can decode the video, I'm sure someone on the nehe forums can help you get the video rendered in OpenGL. It should be as simple as converting the captured frames into a textures. Sorry I couldn't be of more assistance, - llvllatrix
  5. implementing streamtube

    Unfortunately, I dont think this kind of problem is too common so there probably is not a lot of documentation (that I'm aware of) on the subject. You are probably going to end up looking at a lot of physics and mathematical papers to collect the parts you need to solve the problem. Gamedev (http://www.gamedev.net/reference/list.asp?categoryid=28) and gamasutra are good resources in this regard. Further, having a digitized sample (verticies) of your curve means that to get better resolution, you must interpolate. If this is for professional(engineering) use, you may have to clear the topic of interpolation with someone. Perhaps the best thing you can do is post a screenshot of your application so far and we can give you specific advice on how to improve the result. Lesson 36 (http://nehe.gamedev.net/data/lessons/lesson.asp?lesson=36) describes a similar process, but unfortunately the code used in the lesson is very specific to the lesson. Here is a quick description of what I would do to solve this problem. 1. Read verticies 2. Interpolate the verticies. In order to produce a smooth result, you will need to be able to retrieve the location of the particle at any point in the curve; even points between the verticies sampled. Bezier splines (http://nehe.gamedev.net/data/lessons/lesson.asp?lesson=28) and NURBS (http://www.gamedev.net/reference/list.asp?categoryid=28#262) are suited to this application. 3. Convert the verticies into mathematical representations as needed. You will require a variety of information in order to do this render. You will need information that will let you allign the faces of the cylinders and information that will let you sample your curve so that the majority of the detail is captured (optional) in the render. For this discussion lets say the position of the particle at time t is defined by p(t) = x(t)i + y(t)j + z(t)k (I expect a different representation might be easier to calculate from the information you're given). 4. Use the mathematical representations to generate the tube. The first derivitive of p(t) with respect to t will give you a vector that is tangent to the curve; this is the velocity vector. The second derivitive will give you the acceleration vector. The acceleration vector has two components; one that is tangential to the curve, and one that points in the direction of the centre of curvature at a given time t (this model is called curvalinear motion). You can use these two components to properly orient the face of each cylinder at time t. In order to get isolate the components, you can use the velocity vector. If you normalize it, you can project the acceleration vector onto it to get the tangential component. You can then subtract this component from the original acceleartion vector to get the radial component (the component that points to the center of curvature). You can also use the radial component to determine where the curve needs to be sampled more. The magnitude of the radial component indicates how quickly the curve is changing direction. Use few samples where the curve is not changing direction a lot and a lot of samples where it is changing rapidly. The result should be a smoother curve that renders faster. 5. Render the tube. If the tube is going to be very large, consider sometthing like a vertex buffer object. Hope that helps, - llvllatrix
  6. AVi playback tutorial - Alpha channel

    Quote:Original post by DoomhammerDE hi llvllatrix, thank you for your reply. well, the most common video format , which supports an alpha channel in addition to rgb, is uncrompressed avi. (at least after effects can export and other video programs e.g. flash can import it and use the alpha channel) Very cool :) Quote: I am not sure if the Video For Windows library used in the tutorial support this feature. I suspect that the library used in the tutorial is old, and probably wont support this feature. It's probably time to start looking for a new library. I did a quick search on google and found these discussions. While they may not describe how to do it, these forums seem like a pretty good place to start asking questions: http://dev.jahshaka.org/forum/archive/index.php/t-222.html http://forum.doom9.org/archive/index.php/t-59845.html Provided you can decode the avi with the alpha channel, OpenGL should be able to render it. Quote: My problem in detail is: I do not know if its possible to extend the tutorial to support avi with integrated alpha channel and how this can be achieved :) I have not found anything in the msdn related to the library and alpha channel in avi format. I just want to make sure that you really need a solution that is this complicated. If all you need is an avi that is evenly transparent, you could use a normal avi and draw it on a polygon with reduced alpha. The only reason you should need something like this is if the transparency changes with the rest of the animation. Quote: Maybe it is a better solution to use a image sequence and load the next image into the graphic cards texture ram? there should be any problem with rgba textures in opengl?! This should work as well. OpenGL does support rgba textures (http://nehe.gamedev.net/data/lessons/lesson.asp?lesson=33). The problem with this sort of approach is creating the video. My impression is that it is hard to make a set of tga files from an avi file; correct me if I'm wrong. Cheers, - llvllatrix
  7. implementing streamtube

    By streamtube do you mean the following? http://mayavi.sourceforge.net/screenshots/office_tube.gif What specific difficulty are you having? By linking, do you mean connecting subsequent cylinders smoothly? If so then I recommend the following. Keep in mind that I'm drawing from my memory of first year physics, so the information may not be even remotely accurate :) I recommend orienting the end faces of the cylinders so that the plain that the face lies on also contains the vector from your sample point on the curve to the center of curvature at that sample point. I believe that this requires differentiating the curve twice with respect to the axis defined by the curve. You could also optimize the performance and look of your render by sampling more frequently at places where the first differentiation is higher. Nurbs or splines seem suited to this sort of application. Hope this helps, - llvllatrix
  8. AVi playback tutorial - Alpha channel

    I'm not certain but I don't think any common video formats support an alpha channel. You could possibly use another avi in order to add an extra channel or mask. Can you describe your problem in more detail? Cheers, - llvllatrix
  9. NeHe Lesson 35 (Playing AVI) Problems

    According to the following it is a codec problem. The latter seems to post a solution. http://msdn.microsoft.com/library/default.asp?url=/library/en-us/multimed/htm/_win32_avistreamgetframeopen.asp http://www.gamedev.net/community/forums/topic.asp?topic_id=373379 If the solution does not work, search the Microsoft documentation in the first link for error retrieval functions. Many SDKs support mechanisms for retrieving more information from an error event. Cheers, - llvllatrix
  10. How to Zoom

    Scaling the entire screen about the position of the camera should also work.
  11. Is the site dead?

    Sorry for the delay guys. The tutorials, and all the source for the first batch should be ready by tomorrow. Cheers, - llvllatrix
  12. Is the site dead?

    Hey, Actually we were just about to announce the release of the first batch of tutorials, which is scheduled for public testing on Monday. Stay tuned, there is still more to come :) Cheers, - llvllatrix
  13. Order of code in OpenGL

    Quote:Original post by Anonymous Poster From what you've said it sounds as if what I am doing *should* be possible. Of course :) Quote:Original post by Anonymous Poster However, I've finished writing the mathematical code, which I'm pretty certain is correct, and when I run my program, nothing appears. Just black all the way :( This is quite common with graphical programming. There are quite a few things that can cause nothing to show up. Once you get something to display on the screen, thins should be easier however. Unfortunately, I have no time to look at your code right now. I should be able to take a look later on today. Could you also post your initialization code? For example, the code where you load your textures and initialize OpenGL. Quote:Original post by Anonymous Poster This class thing sounds like it might be worth looking into. Do you have a link to a guide on it - my knowledge of C++ is *really* sketchy. I know enough to mess around a little, but not a proper knowledge of it :( My entire body of code is pretty much the one from NeHe's lesson 10, with some modifications to the specific shapes being drawn, keyboard commands etc. Classes are fundamental to C++ programming and programming in general. The idea is that you can define a "thing" that has variables called properties and functions that act on these variables, which are called methods. You can then create these things like you would variables. For example, you could create a planet with mass, position, velocity, and acceleration properties. You can then create an update method, which updates the properties of the planet every frame. I found this tutorial on the net: http://cplus.about.com/od/beginnerctutorial/l/aa041002a.htm These books are also avaliable for free online: http://www.steveheller.com/whos/ http://www.mindview.net/Books/TICPP/ThinkingInCPP2e.html#HTMLFormat Cheers, - llvllatrix
  14. Order of code in OpenGL

    Regarding question 1, both the draw and update (function that handles key presses) functions are called by a loop; everything in these functions happen over and over again until the user presses escape. Regarding question 2, and your code; if values like Earth_Acc_Sun are declared outside the draw and or update functions, then they will retain their values and your variables will be altered each frame. Regarding your code; it seems it has reached the point where using floats to manage the properties of the plantets is insufficient to manage the complexity of the problem. I suggest using classes to represent each planet. You can then update the planets in the update function and pass it the appropriate delta time. Regarding the gravitational constant, try: const double kGravity = 6.673e-11; Cheers, - llvllatrix
  15. New team announcment and future lessons

    As DevLiquidKnight said, we had a long discussion on the topic. We ultimately decided to go with OOP because beginners tend to emulate the first things they see in the tutorials. We are trying to keep things both up to par with standard coding practices and also easily understandable; the first classes you see will use very simple oop. Thanks for your comments and please keep them comming :) Community feedback is very important to us. Cheers, - llvllatrix