Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Viz antialias #387

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

chrisdembia
Copy link
Member

@chrisdembia chrisdembia commented Jun 5, 2015

Tested on OSX and Linux. The other view buttons still work.

The saved images are not antialiased. I tried to insert the glEnable(GL_MULTISAMPLE) into different places to try and get antialiased images, but I couldn't get it to work. Any ideas?


This change is Reviewable

@sherm1
Copy link
Member

sherm1 commented Jun 5, 2015

Any thoughts on this @peastman? Chris enabled antialiasing for the visualizer and it works fine but the images that are saved to files aren't antialiased.

@sherm1
Copy link
Member

sherm1 commented Jun 5, 2015

Chris, I tried this on Windows and could see any difference between antialiasing on or off. Same result on Windows and on my Ubuntu VM. Possibly I don't know what to look for. I tried the Simbody "Rattleback" example which has an ellipsoid. Do you have a better test case?

@chrisdembia
Copy link
Member Author

Thanks for testing. I presume you mean "Same result on OSX and on my Ubuntu VM." I've noticed the effect with ellipsoids, but for this PR I was looking at TaskSpaceControl-Atlas. Even with antialiasing, there is still some aliasing but it should definitely look better.

There is an OpenGL parameter to increase the number of samples in the multisampling.

@sherm1
Copy link
Member

sherm1 commented Jun 5, 2015

I presume you mean "Same result on OSX and on my Ubuntu VM."

No, I'm not running OSX. It is Windows 8.1.

@sherm1
Copy link
Member

sherm1 commented Jun 5, 2015

This might provide some info on how to get antialiasing working for saved images and movies: http://stackoverflow.com/questions/20482851/how-to-use-multisampling-with-opengl-fbos

The visualizer makes its own frame buffer to render those into; that also has to be created multisampled.

@chrisdembia
Copy link
Member Author

Thanks @sherm1 for that link. I quickly tried to do what they said but then the saved images came out as black. I'd prefer to merge this without anti-aliased images. We can revisit the anti-aliasing of images later.

Could you send me screenshots of the visualizer on your computer with/without anti-aliasing?

@sherm1
Copy link
Member

sherm1 commented Jun 8, 2015

Antialiasing off:
image

Antialiasing on (or at least I selected it):
image

I don't see any difference between them.

@chrisdembia
Copy link
Member Author

Yeah antialiasing isn't working there in your screenshots. Here's on OSX:

without antialiasing:
screen shot 2015-06-07 at 8 12 33 pm

with antialiasing:
screen shot 2015-06-07 at 8 13 35 pm

Focus on the upper edge of the ground.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants