Repository navigation
Ariadne views: transform: overrides, volumes in views, shared VTK arrays, shadows in the demos - #1039
Merged
Merged
Conversation
… shared VTK arrays, shadows in the demos The leftovers of #1007, and the docs for its components and demos. Overrides. An override: entry may move, turn and scale what it covers (`transform: { position, rotation, scale }`), in the frame of the node it names (a group scales about its own origin; a tag entry in each tagged node's frame; "*" in world space), and `mode: replace` starts over from the node's own look. Entries now apply in order, "*" included. `material: { color, opacity }` spells the look fields too. Volumes in views. A volslice node's slices face the camera they were swept for, so a view from its own camera draws slices of its own (VolSliceNode::viewProp: its own polydata and mapper over the node's shader property, property, textures and uniforms, GeometryNode::observeShaderInputs). A volren node is raycast for the main view and composited into its pixels, so no view draws it (it drew wrong from another camera, and not at all on camera: main). A `type: volume` node takes opacity (a second vtkVolume, with its own property and mapper, every opacity point scaled) and transform. Shared VTK arrays. An asset's nodes draw from the first node's points, cells, normals and texture coordinates (GeometryNode::shareArraysFrom, wired through SceneAssetCache::donors), so VTK uploads them once. Copy-on-write: updateVertices / updateNormals first give the writer arrays of its own, the donor included. Colours stay each node's own. Scenes' shadows. A scenes: entry's viewport stops drawing while the UI is hidden too (no widget walk), and on the first frame a view shows it again its maps are baked for whatever moved meanwhile, whatever its update_interval. Shadows in the demos: on in clip_planes, mesh_lab, fem_gallery and terminal_scene. A volume casts nothing into the scene's maps, so the volume demos get volren's own volumetric shadows instead: a new `volren: { shadows: true | { enabled, strength } }` key, on in volren_bunny and transfer_function. Docs: ARIADNE.md §5.1 (assets, scenes), §5.4 (volumes and shadows), §5.18 (the demos, transform / replace, volumes in views, shared arrays, the scenes' bake, limits), §6.5; the scene_view component takes scene, shadows and caption; examples/README.md lists the views demos; the browser gallery gets cards for the five (web/demos.json, thumbnails); roadmap §9.5 status. Tests: cvcgl_ariadne_views 56 (13 new: transform in a group's frame, replace, a volume's opacity stand-in, volslice and volren in own-camera and camera: main views); cvcgl_ariadne_scenes 29 (8 new: shared arrays and their copy-on-write, the bake on showing a scene again); AriadneScene. VolRenShadowsParse.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The leftovers of #1007, and the docs for its components and demos.
Overrides
transform: { position, rotation, scale }on anoverride:entry moves, turns and scales what it covers in that view, in the frame of the node it names: a group scales about its own origin, a tag entry applies in each tagged node's frame, and"*"in world space.mode: replacestarts over from the node's own look."*"included.material: { color, opacity }spells the look fields too.Volumes in views
VolSliceNode::viewProp). They are drawn over the node's shaders, textures and uniforms; a mapper can share those throughGeometryNode::observeShaderInputs.camera: main.opacity(a stand-in with its own property and mapper, every opacity point scaled) andtransform.Shared VTK arrays. An asset's nodes draw from the first node's points, cells, normals and texture coordinates (
GeometryNode::shareArraysFrom), so VTK uploads them once. It is copy-on-write:updateVertices/updateNormalsgive the writer arrays of its own first, the donor included. Colours stay each node's own.Scenes' shadows. A
scenes:entry's viewport stops drawing while the UI is hidden too. On the first frame a view shows it again, its maps are baked for whatever moved meanwhile, whatever itsupdate_interval.Shadows in the demos
clip_planes,mesh_lab,fem_galleryandterminal_scene.volren: { shadows: true | { enabled, strength } }key. It is on involren_bunnyandtransfer_function.volslice_bunnyhas no shadows of either kind.Docs
scene_viewcomponent takesscene,shadowsandcaption.examples/README.mdlists the five views demos.Tests: all on Windows Release:
cvcgl_ariadne_views56, 13 of them new.cvcgl_ariadne_scenes29, 8 of them new.AriadneScene.VolRenShadowsParse.cvcgl_ari_golden34, and the realize, switch, viewport, lod, update_normals, world_geometry, stream, volslice, shadow_casters and streaming_geometry suites.Not checked
mesh_lab/fem_gallerywith shadows need a libigl build; this one wasn't.