Jump to content
  • Advertisement
markshaw001

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

This topic is 389 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi can anyone give me hint how to write a shader for making an animation of a transparent sweep means a line moving about 180 degree on the screen the line.

Share this post


Link to post
Share on other sites
Advertisement

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
46 minutes ago, markshaw001 said:

the effect i am after is a transparent or an invisible line moving through the scene from left to right

If it is transparent or invisible, then you have nothing to do :)

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

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!