-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathNotes.txt
58 lines (40 loc) · 4.2 KB
/
Notes.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
I was asked to collect some observations I made using Aardvark while devloping AardvarkRenderDemo:
A) Places where I had to change or extend Aardvark
1) I needed to extent the render task system with the ability to render to cube maps and cube map mip levels. (in RenderTask.fs)
For a usage example see globalEnviroment.fs.
Because I needed to use some private stuff, this file copies some code from https://github.com/aardvark-platform/aardvark.rendering/blob/master/src/Aardvark.Base.Rendering/RenderTask.fs
Idealy this could be integrated into Aardvark. If this seems usefull and the right way of doing this stuff, I would be happy to prepare a pull request.
Because of https://github.com/aardvark-platform/aardvark.rendering/issues/53 it dosn't work with the Vulcan Runtime at the moment.
2) I had to copy aardvark.rendering/src/Aardvark.SceneGraph.IO/IO.fs to my project an make a small change to it:
The imported scene worked great for me, but I needed to substitute the materials of the imported object with my own implementation
of an IUniformProvider providing different uniforms.
I changed the material type from a concret type to an interface in the Scene type and made the original type an implementation of the interface.
So I could substitute them with a different type later (see Material.fs and SceneObject.fs).
It would be great if could be changed this way in Aardvark, but this would be a big breaking change. So it is propably not possible.
If it would be possible, it may be wise to change the mesh type to an interface, too.
3) Html.SemUi.accordeons are not working correctly when nested. https://github.com/aardvark-platform/aardvark.media/issues/27
As a workaround I created subAccordion in UI.fs as well as some more accordion variants.
4) Very minor: Html.SemUi.Toggle Box only adds the needs attribute "checked" without value but needs to set the value also "checked" to work correctly.
A fixed version is in UI.fs.
5) Also very minor: Some intrinsics are missing in fshade, namely
Lerp (a : V3d) (b : V3d) (s : float) : V3d
and
exp (a : V3d) : V3d
See Shader.fs
B) Things I missed
1) I could not get configuration of openDialogButton to work properly. I could not set the starting path nor filters.
I also needed a Save Dialog, but could not find such a thing in Aardvak.Media. At the moment I am misusing the OpenDialog, but that is not optimal
because it dosn't allows the input of the name of an not existing file. So now you have to manually create an empty file before saving.
I propably should have build a proper dialog but was to lazy to figure it out.
2) scene?GlobalBoundingBox() dosn't work for a scene graph that includes sg.set because the the semantic of GlobalBoundingBox is not defined for sg.set.
I build a workaround but it would have been better to properly define the semantics.
C) Some things I found hard to understand or inconvenient
1) For deferred rendering I needed client spcific information, e.g. the size of the render window. The solution with Aardvark.Service.Scene.custom works
great, but was basicaly impossible to discover on my own.
It would be great if Media would include a alternate RenderControl that instead of a sceneGraph takes a function Aardvark.Service.ClientValues -> IRenderTask as input.
2) I took me a long time to figure out that, to make the colorpicker work, the assemblyWebpart for Aardvark.UI.Primitives needs to be registert in Program.fs
3) For collections of things (like objects, lights, materials) I found maps most convenient in the model, ecpecially for the update functions. The scene graph mostly
needs sets and the Html Views mostly lists. That leeds to a lot of conversions between amap, alist and aset. Not really a problem, but I needed some time to
get used to it. I am still wonder if my approach here may be flawed.
4) It was often not obvious to me where to find a needed control in https://github.com/aardvark-platform/aardvark.media/tree/master/src/Aardvark.UI.Primitives
A lot of things are in there, but sometimes hard to find. And not all of them work together seamless, some based on SemUi and some not.