Results 1 to 8 of 8

Thread: I desperately need help with animation in OpenGL!

  1. #1
    Junior Member Newbie
    Join Date
    Jun 2005
    Posts
    7

    I desperately need help with animation in OpenGL!

    I guys, I'm Anthony . I'm a student at the University of Guyana and I'm doing a final year project in OpenGL but I'm in trouble interms of getting the animation part. I'm constructing a model with has Corticospinal tracts. It's a model with spinal cord and the brain. I would like to get an effect that when you press a key for instance R, you get an animation going up .Like how the blood travels around the
    body. You know, like a red color moving from the bottom of the spinal cord to the brain. I hope you guys understand. I don't know what exactly to use , can you guys please tell me what to use. well, I tried something with curves but I didn't get it. I'm using OpenGL with C programming. I would like you guys
    to see the picture of the model but I don't how to put it here.Someone please tell me how to put up a picture. Anyhow ,looking forward to early replies........bye
    Here is the link to the picture.

    http://gmail.google.com/gmail?view=a...40fa0fb94ece91

  2. #2
    Member Contributor uruk's Avatar
    Join Date
    Dec 2004
    Location
    acasa :) sau la munca :(
    Posts
    66

    Re: I desperately need help with animation in OpenGL!

    You can upload your image here , then use the IMAGE button when posting a reply.
    As for your problem, hmmmmm... I guess you could move a bright red cylinder over the blood vessel.
    Like this:
    Stat rosa pristina nomine, nomina nuda tenemus.

  3. #3
    Junior Member Newbie
    Join Date
    Jun 2005
    Posts
    7

    Re: I desperately need help with animation in OpenGL!

    Here is the picture of the model I want to create

  4. #4
    Super Moderator OpenGL Guru imported_dorbie's Avatar
    Join Date
    Jul 2000
    Location
    Bay Area, CA, USA
    Posts
    3,966

    Re: I desperately need help with animation in OpenGL!

    You need to learn some basics of OpenGL.

    I would suggest drawing the pathways to the stencil buffer and then stencil testing a textured polygon with scrolling texture coordinates that cover the paths. This assumes it's just a 2D image you're dealing with.

  5. #5
    Member Contributor
    Join Date
    Apr 2005
    Posts
    85

    Re: I desperately need help with animation in OpenGL!

    why stencil? you guys are retarded a little I think

    you should simply modell everything, and when you want to feature the circulation of blood, illuminate the focused part (change its material attributes) and use a textured quad to emulate the red dot, so you can move it up by having some waypoints pre-defined.. you'll just interpolate them, move from one to the other. its not hard at all.. but stencil buffers? what else? fragmentation programs, per-pixel shaders and what else?? thats stupid, he just needs to show the path of blood in a model. not win a competition for no-life kiddies on wannabe programming with ogl...

  6. #6
    Senior Member Frequent Contributor
    Join Date
    Feb 2004
    Location
    Long Island, New York
    Posts
    569

    Re: I desperately need help with animation in OpenGL!

    lol. Banshee, do you even have any idea what you're talking about? dorbie's suggestion is much simpler than your approach. The blood pathways are etched into the stencil buffer. Then a full screen quad with an animated texture is rendered using stencil test. and what do you end up with? that animated texture in only the areas that pass the stencil test (i.e. the pathways).

    The entire thing can be done without even using comlex geometry at all.

    its not hard at all.. but stencil buffers? what else? fragmentation programs, per-pixel shaders and what else??
    just to amuse us all, why don't you give us a little pseudocode outlining your approach. I'm sure it'll give us all a good laugh.
    FYI: It's 'fragment' program, which *is* a per-pixel shader, so you're being redundant.

  7. #7
    Junior Member Newbie
    Join Date
    Jun 2005
    Posts
    7

    Re: I desperately need help with animation in OpenGL!

    Thanks guys for your ideas, may be if you guys show me some codes in C programming that will probably help me have a better understanding.Or if there are websites please tell me ..thanks again

  8. #8
    Super Moderator OpenGL Guru imported_dorbie's Avatar
    Join Date
    Jul 2000
    Location
    Bay Area, CA, USA
    Posts
    3,966

    Re: I desperately need help with animation in OpenGL!

    @bansheeogl, "retarded"?!! I resemble that remark! "No life kiddies"?!! Hey! Seriously dude, tone down the rhetoric, stencil buffer ain't that mysterious and is almost ubiquitous. I think nothing of using stencil, you should try it, and overcome your resistance to great features. The whole point of doing projects like this is to learn & apply graphics features.

    @Aeluned, exactly! Although I got to thinking that if you draw to the stencil buffer you could just texgen on that same geometry and eliminate the need for stencil buffer, an animated texgen in eye space could be cool for this (and no bansheeogl, texgen is not a scarey monster ether ).

    @anthonya, you'll have to write your own code , this isn't that difficult. You've been given an answer or two, please don't repost/crosspost in the advanced forum. You will not get code there either. Make an attempt and ask specific questions either about the solution suggested or about additional implementation problems you have. If people see you make an effort they will help you understand & solve your problem with more enthusiasm.

    Good Luck.

Similar Threads

  1. Need help desperately with SOIL
    By bandan in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 12-22-2015, 06:45 PM
  2. OpenGL Animation
    By mr07th in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 06-11-2014, 07:12 PM
  3. Sprite Animation / Texture Animation
    By Rodrix in forum OpenGL: Advanced Coding
    Replies: 4
    Last Post: 03-11-2007, 10:36 PM
  4. Desperately need help with final OpenGL project
    By GLRookie in forum OpenGL: Basic Coding
    Replies: 7
    Last Post: 05-14-2005, 11:21 AM
  5. Help needed desperately - Normal vectors and picking
    By Sitara in forum OpenGL: Advanced Coding
    Replies: 3
    Last Post: 08-29-2003, 06:55 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean