-
Notifications
You must be signed in to change notification settings - Fork 77
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
Silhouettes (in cartoon mode) have a jagged appearance when the scene is rotates #327
Comments
Hey @chongtianyifa Thanks for raising this. |
I've also noticed this, I just haven't had the time to look into it. I think it's specific to the default, As an aside, we may want to change the default away from |
hi @alessandrofelder, import os vedo.settings.default_backend= 'vtk' scene = Scene(inset=False, atlas_name='allen_mouse_25um', title=video_title) # make sure this is right vm = VideoMaker(scene, name=video_name, save_fld=os.path.join(os.path.dirname(ABBA_accum_tranformed_file))) # niters = number of frames scene.close()‘ Indeed, it is the issue of SHADER_STYLE as @adamltyson mentioned . After trying metallic, plastic, shiny, glossy options, they gave me the same video: B3M3S17_glossy.mp4The color of each point is not pure magenta while the outline is smooth now. |
Looking into this further due to https://forum.image.sc/t/brainrender-lines-on-render/96270. @marcomusy I don't suppose you have any idea why we're seeing these artefacts using one specific style? We didn't see them in previous versions of brainrender, but we had vedo pinned for a long time. For anyone seeing this, the workaround is to either set the rotation before rendering, or choose another shader style with: # before creating a scene
from brainrender import settings
settings.SHADER_STYLE = "plastic" # choose from [metallic, plastic, shiny, glossy, cartoon], default is cartoon |
This issue has been mentioned on Image.sc Forum. There might be relevant details there: https://forum.image.sc/t/brainrender-lines-on-render/96270/3 |
@alessandrofelder shall we make |
Sure (I don't have a strong opinion... I didn't know it was the default at some point) |
Hi, from a quick look at the code It looks to me that the "cartoon" option of brainrender generates and adds to the scene a "silhouette" object. |
The default has been changed (temporarily) to |
This minimal example actually works.. from brainrender import Scene
from vedo import settings
settings.default_font = "Theemim"
scene = Scene()
brain = scene.plotter.objects[0]
sil = brain.silhouette().c('blue5').lw(2)
# scene.add_silhouette(sil) # not working
scene.plotter.add(sil)
scene.plotter.show()
# scene.render() # not working it seems to me that render() does more stuff than simply rendering the scene. |
Thanks @marcomusy, this line seems to be the culprit. Leaving Is it safe to not pass this parameter to |
Totally safe :) |
@marcomusy thanks! I've raised #352 to fix this. |
Hi @chongtianyifa this issue has now been fixed. If you update brainrender ( |
Hi,
I recently updated to the newest version and found that the rendered brain outline is very coarse, especially during rotating.
The first frame looks ok:
the outline looks coarse after rotating:
media0.mp4
Below is the video created with the same data using an older version (very likely v2.0.0.0)
Media1.mp4
Is there any way to improve the quality?
The text was updated successfully, but these errors were encountered: