aardvark-platform / aardvark.rendering

Aardvark.Rendering is a high-performance, dependency-aware rendering engine. It is part of the open-source Aardvark Platform for visual computing, real-time graphics, and visualization.
https://aardvarkians.com/
Other
132 stars 13 forks source link

Updated Interactive rendering demo #36

Open dallinbeutler opened 5 years ago

dallinbeutler commented 5 years ago

As an outsider, I'm trying to replicate what was seen in the demo on youtube

LiveDemo.fsx looked like the closest option, but upon inspecting its "loadReferences.fsx" file it looks to be somewhat out of date. (Fshade.dll renamed to fshade.core.dll, #11 implies that that nanovg shouldn't be referenced, etc.). I guess as a beginner here, I ultimately want to know what the proper steps would be for taking the standard template, and running an interactive rendering session on top of it? thanks

haraldsteinlechner commented 5 years ago

hi. thanks for checking out! the file you mentioned is the right if i remember correctly. i will look into this...

bests

haraldsteinlechner commented 5 years ago

i just create a new f# interactive setup. due to native dependencies and some other annoyances it is not totally straightforward to get fsharp interactive running with rendering windows etc.

my demo is given in the walkthrough repository which shows is a collection of technical background information. the setup is here: https://github.com/aardvark-platform/walkthrough/tree/master/src/InteractiveNet471

i made a little video showing how it works: https://youtu.be/899Ld6JZsBA

the story however is not over. there is stuff to do:

so far the progress, bests harald

dallinbeutler commented 5 years ago

Thanks for the update! Those are valid concerns and duly noted. Looks straight forward enough. I'll test this as soon as I have time and get back to you! Not sure how much I could help with issues yet, but I'm willing to dive in.

dallinbeutler commented 5 years ago

Works on my machine! nice! And yeah, I see what you mean with the boilerplate. And I take it transact is the only way to force an update to reflect changes in the dependency graph? not an issue, just making sure I understand the flow of things.

On a semi-related note, it seems that everything is there to make a Safe style template or like this fable electron with a hot module replacement workflow.

I'll play around interactive and with some ideas, and let you guys know if I come up with anything useful.

haraldsteinlechner commented 5 years ago

i just moved the boilerplate code to aardvark.rendering.

the file now looks like this

looking forward to more open source activity in the ecosystem :)

dallinbeutler commented 5 years ago

Thanks again for being so helpful and welcoming! The more time I've spent with it the more excited I get 😄

krauthaufen commented 5 years ago

So I don't need to call transact in the .media context? .media sounds almost identical to Fable.React in both goal and function.

media (we know it's a quite bad name) was invented to get server-side rendering of 3d content into html apps and since 3d rendering tends to require huge scenegraphs we were not quite happy with the ELM/Fable-approach recreating the entire SceneGraph/DOM on every change of the model. Therefore we explored the path of differentiating the Model instead of the Scene/DOM and integrating it with our incremental system. Since programmers then need to use the incrementalized model in the view function (composed of IMods, alists, asets and so on) we have a special msbuild-plugin called Aardvark.Compiler.DomainTypes which generates the code for the incremental model.

So to answer your question, media-apps basically look just like fable/elm apps and App.start takes care of submitting changes to the system (via transact). However there are two main differences between fable/elm and media:

The whole concept has been explained quite well by @ThomasOrtner here, here and here

so does hmr work in .Media? or your saying that functionality got deprecated as you moved from fablish?

We sadly never made that work, but it would obviously be great to see that. The hard part here might be to also integrate the Domain-Type-Compiler into the HMR system. (since it needs to regenerate files on model-changes)

haraldsteinlechner commented 5 years ago
dallinbeutler commented 5 years ago

looks good! I tested on two different computers with VS, and the only issue was forgetting to set FSI to 64 bit on the other one. I'll going to look through domaintcc and see if I can help with that