markshaw001

2D need help in making a simple sweep effect in opengl

Recommended Posts

What language, as in what opengl are you using? If your using a game engine also give us the name, it matters when the engine has shader tools.

Are you sure you can't do the radar outside of a shader? I can think of a million easier ways of making the radar.

Edited by Scouting Ninja

Share this post


Link to post
Share on other sites

@Scouting Ninja i am using opengl 3.0 and c++ i am good at c++ but new to opengl if you can suggest a way to make this effect without using shaders i shall be very thankful to you, but as i searched the internet this kind of effects are done by shader the effect i am after is a transparent or an invisible line moving through the scene from left to right 

Share this post


Link to post
Share on other sites

@Scouting Ninja i am using opengl 3.0 and c++ i am good at c++ but new to opengl if you can suggest a way to make this effect without using shaders i shall be very thankful to you, but as i searched the internet this kind of effects are done by shader the effect i am after is a transparent or an invisible line moving through the scene from left to right  

Share this post


Link to post
Share on other sites
22 hours ago, markshaw001 said:

but new to opengl if you can suggest a way to make this effect without using shaders i shall be very thankful to you

Sprite sheets are often used for these effects if they are just extra's on a wall.

The other way of making them as meshes. The advantage of this way is high detail and the mesh used can be given there own material and shaders for effects.

 

For a really good looking radar I would use both a sprite sheet and textures. Do you know how to make a shader that renders a texture to a mesh?

Also do you know how to load a mesh into a opengl scene?

What you can do is render 3 meshes with textures. One of them you can animate like a sprite sheet and the others as still textures. Then you could rotate the one for the beam.

RadarEx.jpg.7b696d088190484bd8ad7429a4077176.jpg

This image is a quick example of what I mean.

Share this post


Link to post
Share on other sites
1 hour ago, Scouting Ninja said:

For a really good looking radar I would use both a sprite sheet and textures. Do you know how to make a shader that renders a texture to a mesh?

 

i don't know how to do that but i will try to learn that

@Scouting Ninja thanks for ur advice u have been alot of help i will try to do wt you have told me and i think it is quite close to wt i want to do

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Announcements

  • Forum Statistics

    • Total Topics
      628312
    • Total Posts
      2981996
  • Similar Content

    • By suliman
      Hi!
      My game is coming along nicely and I would love some feedback.
      You play as one (or two in co-op) survivor that must travel the land and survive the infected hordes, looners and bandits. You stop in locations but are always pressed as the hordes will start pouring in. Collect resources (food, fuel, medical supplies and ammo) and weapons and head for the goal!
      Tips
      Always quickly switch to a melee weapon if running out of ammo Loot everything if you have time to loot, including cartrunks Choose locations that have the loot you need (such as gas station for fuel) Try to avoid running out of fuel or having your car break down. Walking is dangerous! Download (50 MB, works with windows only, you DON'T need dropbox to download):
      Damnation road (beta 2)




    • By Brian Paek
      Football Dash now on iOS! Over 1 million downloads on Android
      iOS:
      https://itunes.apple.com/us/app/football-dash-endless-runner/id1312590451?ls=1&mt=8
      Android:
      https://play.google.com/store/apps/details?id=com.beastattack.c1434846484727

    • By zizulot
      first and only logo , for now
    • By mellinoe
      Hi all,
      First time poster here, although I've been reading posts here for quite a while. This place has been invaluable for learning graphics programming -- thanks for a great resource!
      Right now, I'm working on a graphics abstraction layer for .NET which supports D3D11, Vulkan, and OpenGL at the moment. I have implemented most of my planned features already, and things are working well. Some remaining features that I am planning are Compute Shaders, and some flavor of read-write shader resources. At the moment, my shaders can just get simple read-only access to a uniform (or constant) buffer, a texture, or a sampler. Unfortunately, I'm having a tough time grasping the distinctions between all of the different kinds of read-write resources that are available. In D3D alone, there seem to be 5 or 6 different kinds of resources with similar but different characteristics. On top of that, I get the impression that some of them are more or less "obsoleted" by the newer kinds, and don't have much of a place in modern code. There seem to be a few pivots:
      The data source/destination (buffer or texture) Read-write or read-only Structured or unstructured (?) Ordered vs unordered (?) These are just my observations based on a lot of MSDN and OpenGL doc reading. For my library, I'm not interested in exposing every possibility to the user -- just trying to find a good "middle-ground" that can be represented cleanly across API's which is good enough for common scenarios.
      Can anyone give a sort of "overview" of the different options, and perhaps compare/contrast the concepts between Direct3D, OpenGL, and Vulkan? I'd also be very interested in hearing how other folks have abstracted these concepts in their libraries.
    • By adapelin
      I am a computer engineering student and i have the assignment below. İ only can write the 2D maze array and have no idea about creating car and time as well. Could anyone write and explain hot to do???
      Minimum Criteria: You are expected to design the game by using C ++ . Below are the minimal criteria: • You must create game board with 2 - Dimensional Matrix • Bonuses create with randomly in the game board • All bonuses have got the same value but different effect for car and score . These effects may be positive or negative . • You must use pointer for creating and using car . Some bonuses may be change car type. • When the game finish, you must show high - score. • For moving car , you need to create coordinate s randomly and you need to write proper control statements. • You must use functions for drawing game board and changing car type . If you need extra functions, you can use it. • If you cannot get out the maze when the time is up , the game is over and you need to show high score. In this project, you must do all minimum criteria. In the end, your program must be work without any errors. Bonus: • Save and load high score information to/from disk • Each bonus has got different random values. • You can create cheat codes for the game. • You can create alternative control for car . • Car can jump over the wall but may lose the score . When car exit the maze , game is over and you need to show high score.    
  • Popular Now