Michael Francis
2017-11-13 15:43:16 UTC
What is SolariumVR?
SolariumVR is a web browser for virtual reality content. Instead of using
HTML, CSS, JS developers use Dart to build VR content. All of which is
accessed over the web and runs on the DartVM.
Hereâs a short intro video.
Why Dart?
For everyone in this group, I probably donât need to explain why Dart is an
awesome language. But Dart has some great features that make it perfect for
3D content creation. Specifically operator overloading for writing vector
math code and SIMD for improved performance of vector math. Also the DartVM
is pretty fast by itself, and we need speed for VR.
Whatâs the difference between WebGL/VR and SolariumVR?
WebGL/VR gives developers access to the equivalent of OpenGL API calls via
Javascript and it renders it to a canvas provided by the browser.
SolariumVR does not give you access to these APIs. Instead, SolariumVR
gives you access to a rendering API that is much similar to that of a high
level game engine such as Unity or UE4.
SolariumVR is a multi process application, just as most browsers are today.
There is a main rendering process in which all rendering to the headset is
done. Each website is run on a separate process and just sends commands to
the main rendering process. This means that if a website locks up the user
will not experience any frame rate loss. This also allows for multiple
websites to be running and rendering at the same time, which is not
possible with WebGL/VR.
This API guarantees that all VR websites will work through a consistent
API. You could think of the rendering API as the DOM for VR. But donât
worry, thereâs still going to be plenty of room for customization and
flexibility.
What headsets are supported?
Currently only the Oculus Rift is supported. There is a chance that SteamVR
may work through Revive <https://github.com/LibreVR/Revive>. I have yet to
try it out. In the future, Iâd love to support as many headsets as possible
including AR headsets.
Example code?
Below is a small example that loads a mesh with points for one triangle and
submits it to be rendered. You can see more examples at
https://github.com/solariumvr/solarium-examples
import 'dart:mason';
import 'dart:typed_data';
import 'dart:materials' as m;
@Application(
title: "Hello World",
description: "This is my VR app",
keywords: const ['hello', 'world'],
)
main() async {
var mesh = await Mesh.create(3, 3, [
AttributeDescription.POSITION,
AttributeDescription.NORMAL,
], indexComponentType: ComponentType.UNSIGNED_BYTE);
// front face has a counter-clockwise (CCW) winding order
mesh.setIndices(new Uint8List.fromList([0, 2, 1]));
mesh.setVertices(new Uint8List.view(new Float32List.fromList([
0.0, 0.0, 0.0, // POSITIONS
1.0, 0.0, 0.0,
0.0, 0.0, 1.0,
0.0, 1.0, 0.0, // NORMALS
0.0, 1.0, 0.0,
0.0, 1.0, 0.0,
]).buffer));
// All materials must be created using a [MaterialBuilder]
var materialBuilder = new m.MaterialBuilder();
// Constants such as double's, Vector2, Vector3, Vector4
// will be compiled into the shader and can not be changed at a later time.
materialBuilder.baseColor = new Vector4(0.3, 0.4, 0.5, 1.0);
//Material Parameters can be changed
materialBuilder.metallic = new m.ScalarParam("metallic", 1.0);
//Make sure not to use 0.0 for roughness, use low value above 0.0;
materialBuilder.roughness = new m.ScalarParam("roughness", 0.05);
// the compile process is asynchronous
var material = await materialBuilder.compile();
var materialInstance = material.createInstance();
world.render([
new Renderable(materialInstance, mesh, new Matrix4.identity()),
], [
new PointLight(position: new Vector3(0.0, 2.0, .0))
]);
}
What about 2D content?
2D UI elements still exist in VR. To solve this problem the underlying
Flutter Engine aka `dart:ui` is embedded into Solarium VR, with some
slight changes. I am behind on some updates to Flutter, so donât expect to
find the exact same code.
Is it open sourced?
Not yet. It definitely is a long term goal. But as of right now SolariumVR
is a one man company. I believe putting time and effort to manage an open
source project would hinder rather than help development at this moment.
But it is built upon many open source projects like Chromium, Dart, and
Flutter, so it would be in spirit to eventually have it open sourced also.
There will be projects such as the ones listed here that will be open
sourced.
https://github.com/solariumvr/solarium-tools
https://github.com/solariumvr/mason
Is it stable?
No. The APIs are subject to change, and most likely will. Currently I am
calling the project a technical preview.
Looking for Developers to Try it out!
Iâm looking for any developer to give it a try and give me some early
feedback. Iâm hoping to find some enthusiast that both love VR and Dart!
Contact
Iâve created a Slack Channel
<https://join.slack.com/t/solariumvr/shared_invite/enQtMjYwNzE0NDY4OTc3LTU0MWVhYjVhYTIxN2NhMThjYTY2MDQyZTk4YzIzYzg5YWU5ZWUxNjcxOWI2ZWMyMjU5MzJkNzcwZDZjMTc5MWU>
for developers to join so you can talk to me and ask questions.
Or you can email me at ***@solariumvr.com. Link to website
solariumvr.com
You can follow the roadmap here: https://github.com/solariumvr/roadmap
SolariumVR is a web browser for virtual reality content. Instead of using
HTML, CSS, JS developers use Dart to build VR content. All of which is
accessed over the web and runs on the DartVM.
Hereâs a short intro video.
Why Dart?
For everyone in this group, I probably donât need to explain why Dart is an
awesome language. But Dart has some great features that make it perfect for
3D content creation. Specifically operator overloading for writing vector
math code and SIMD for improved performance of vector math. Also the DartVM
is pretty fast by itself, and we need speed for VR.
Whatâs the difference between WebGL/VR and SolariumVR?
WebGL/VR gives developers access to the equivalent of OpenGL API calls via
Javascript and it renders it to a canvas provided by the browser.
SolariumVR does not give you access to these APIs. Instead, SolariumVR
gives you access to a rendering API that is much similar to that of a high
level game engine such as Unity or UE4.
SolariumVR is a multi process application, just as most browsers are today.
There is a main rendering process in which all rendering to the headset is
done. Each website is run on a separate process and just sends commands to
the main rendering process. This means that if a website locks up the user
will not experience any frame rate loss. This also allows for multiple
websites to be running and rendering at the same time, which is not
possible with WebGL/VR.
This API guarantees that all VR websites will work through a consistent
API. You could think of the rendering API as the DOM for VR. But donât
worry, thereâs still going to be plenty of room for customization and
flexibility.
What headsets are supported?
Currently only the Oculus Rift is supported. There is a chance that SteamVR
may work through Revive <https://github.com/LibreVR/Revive>. I have yet to
try it out. In the future, Iâd love to support as many headsets as possible
including AR headsets.
Example code?
Below is a small example that loads a mesh with points for one triangle and
submits it to be rendered. You can see more examples at
https://github.com/solariumvr/solarium-examples
import 'dart:mason';
import 'dart:typed_data';
import 'dart:materials' as m;
@Application(
title: "Hello World",
description: "This is my VR app",
keywords: const ['hello', 'world'],
)
main() async {
var mesh = await Mesh.create(3, 3, [
AttributeDescription.POSITION,
AttributeDescription.NORMAL,
], indexComponentType: ComponentType.UNSIGNED_BYTE);
// front face has a counter-clockwise (CCW) winding order
mesh.setIndices(new Uint8List.fromList([0, 2, 1]));
mesh.setVertices(new Uint8List.view(new Float32List.fromList([
0.0, 0.0, 0.0, // POSITIONS
1.0, 0.0, 0.0,
0.0, 0.0, 1.0,
0.0, 1.0, 0.0, // NORMALS
0.0, 1.0, 0.0,
0.0, 1.0, 0.0,
]).buffer));
// All materials must be created using a [MaterialBuilder]
var materialBuilder = new m.MaterialBuilder();
// Constants such as double's, Vector2, Vector3, Vector4
// will be compiled into the shader and can not be changed at a later time.
materialBuilder.baseColor = new Vector4(0.3, 0.4, 0.5, 1.0);
//Material Parameters can be changed
materialBuilder.metallic = new m.ScalarParam("metallic", 1.0);
//Make sure not to use 0.0 for roughness, use low value above 0.0;
materialBuilder.roughness = new m.ScalarParam("roughness", 0.05);
// the compile process is asynchronous
var material = await materialBuilder.compile();
var materialInstance = material.createInstance();
world.render([
new Renderable(materialInstance, mesh, new Matrix4.identity()),
], [
new PointLight(position: new Vector3(0.0, 2.0, .0))
]);
}
What about 2D content?
2D UI elements still exist in VR. To solve this problem the underlying
Flutter Engine aka `dart:ui` is embedded into Solarium VR, with some
slight changes. I am behind on some updates to Flutter, so donât expect to
find the exact same code.
Is it open sourced?
Not yet. It definitely is a long term goal. But as of right now SolariumVR
is a one man company. I believe putting time and effort to manage an open
source project would hinder rather than help development at this moment.
But it is built upon many open source projects like Chromium, Dart, and
Flutter, so it would be in spirit to eventually have it open sourced also.
There will be projects such as the ones listed here that will be open
sourced.
https://github.com/solariumvr/solarium-tools
https://github.com/solariumvr/mason
Is it stable?
No. The APIs are subject to change, and most likely will. Currently I am
calling the project a technical preview.
Looking for Developers to Try it out!
Iâm looking for any developer to give it a try and give me some early
feedback. Iâm hoping to find some enthusiast that both love VR and Dart!
Contact
Iâve created a Slack Channel
<https://join.slack.com/t/solariumvr/shared_invite/enQtMjYwNzE0NDY4OTc3LTU0MWVhYjVhYTIxN2NhMThjYTY2MDQyZTk4YzIzYzg5YWU5ZWUxNjcxOWI2ZWMyMjU5MzJkNzcwZDZjMTc5MWU>
for developers to join so you can talk to me and ask questions.
Or you can email me at ***@solariumvr.com. Link to website
solariumvr.com
You can follow the roadmap here: https://github.com/solariumvr/roadmap
--
For other discussions, see https://groups.google.com/a/dartlang.org/
For HOWTO questions, visit http://stackoverflow.com/tags/dart
To file a bug report or feature request, go to http://www.dartbug.com/new
---
You received this message because you are subscribed to the Google Groups "Dart Misc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to misc+***@dartlang.org.
For other discussions, see https://groups.google.com/a/dartlang.org/
For HOWTO questions, visit http://stackoverflow.com/tags/dart
To file a bug report or feature request, go to http://www.dartbug.com/new
---
You received this message because you are subscribed to the Google Groups "Dart Misc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to misc+***@dartlang.org.