Physics simulation – Visual Computing Lab https://viscomp.alexandra.dk Computer Graphics, Computer Vision and High Performance Computing Tue, 25 Nov 2014 14:24:51 +0000 en-GB hourly 1 https://wordpress.org/?v=5.8.2 Xcelgo case – Custom real-time rendering optimization https://viscomp.alexandra.dk/?p=3635 https://viscomp.alexandra.dk/?p=3635#respond Tue, 25 Nov 2014 14:24:51 +0000 http://viscomp.alexandra.dk/?p=3635 In this project we helped Xcelgo with a brand new custom DirectX 11 renderer as a replacement of their existing fixed function DirectX 9.0 renderer.

Xcelgo provides virtual automation software for 3D modeling along the cycle of automated material handling systems – Like airport baggage handling or larger warehouse storage systems. The purpose of their product is to eliminate the risks involved in building these large and very expensive systems, by allowing simulation and modelling of the system up front.

Experior, the 3D modelling system by Xcelgo, is built around a fixed function DirectX 9.0 pipeline programmed in C# though wrapper code. DirectX 9.0 is characterized by a lack of scalability because of the driver overhead imposed by the dated rendering paradigm. The 3D simulation is built from a large number of user generated primitives which are able to freely move around the scene. Each of these are being rendered individually which causes the GPU and CPU to lockstep.

The fixed function rendering pipeline supports only very limited lighting techniques, hence limiting the visual appeal of their presented scenes. And even in engineering type visualizations, the visual quality gets attention and opens for expanding the customer base.

Xcelgo wanted to prepare for future scenarios with larger models and a more easily maintained rendering framework – and decided to update the rendering pipeline to a modern shader-based DirectX 11 pipeline. In close collaboration we have designed and implemented a completely new rendering pipeline.

Integration

The new pipeline supports a lot of features which will help Xcelgo further push the limits of virtual automation:

* DirectX 11 rendering pipeline written from the bottom up based on Xcelgos domain knowledge about their customers wishes.
* Intelligent optimization of scene rendering to avoid expert rendering knowledge when designing the scene geometry.
* Threaded rendering freeing the rest of the workstation to do simulation.
* Massive increase in number of dynamic objects that the system can handle. Hundreds primitives -> Tens of thousands skinned and textured models.
* Support for instanced rendering of skinned robots.
* Support for fully detailed CAD line renderings in full resolution to better guide modelling engineers when building systems.
* Modern cascaded shadow mapping solution which fully envelops the scene in crisp shadows.
* Rasterization-based pixel perfect picking of objects in the scene vastly improving runtime performance when selecting objects.
* Modern surface shading much improving the visual aesthetics of the scene.

The project is now completed and Xcelgo is hard at work finishing the integration of the new rendering which should be complete in time for Experior 6.0.

]]>
https://viscomp.alexandra.dk/?feed=rss2&p=3635 0
Elements – Current Results https://viscomp.alexandra.dk/?p=1784 https://viscomp.alexandra.dk/?p=1784#respond Mon, 24 Jun 2013 11:35:19 +0000 http://viscomp.alexandra.dk/?p=1784 We’ve been working on the Elements project for a few months now and we wanted to share the current status of our work. On the initial workshop, it was decided to focus on tools for creating, modeling and rendering clouds in real-time. The tools should support both quick-and-dirty workflows for backdrops as well as be able to handle flying through clouds for more dynamic shots.

The participants of the workshop wanted to be able to model using traditional geometry, so we have created a plug-in for Maya which allows you to create a cloud from any input mesh. As an initial step in this plug-in, the geometry is voxelized in a desired resolution in real-time. The following videos demonstrate this voxelization:

In the following steps of creating a cloud, we compute a distance field from the surface of the input geometry and combine it with a noise field to compute a detailed and visually interesting cloud density. You can see the result of our real-time ray marching of the final cloud representation in the following images and video:

In the near future, we will start looking at improving the performance of the ray marching, and we will support more complex lighting. Also, we plan to support user-defined noise functions that depend on the cloud geometry to be able to support different kinds of clouds. Finally, we would like to explore incorporating vertex-defined attributes such per vertex colors, noise, etc. into the cloud generation.

The video below demonstrates how to work with the plug-in. If you would like to try out the plug-in, please contact us at jesper.borlum@alexandra.dk

]]>
https://viscomp.alexandra.dk/?feed=rss2&p=1784 0
Elements – Workshop on result-oriented design https://viscomp.alexandra.dk/?p=1709 https://viscomp.alexandra.dk/?p=1709#respond Wed, 06 Mar 2013 10:13:42 +0000 http://viscomp.alexandra.dk/?p=1709 The shareplay foundation has granted 500.000 DKK to the project “Elements – Environmental visual effects through result-oriented design“. The project will try to tackle some of the challenges faced by the danish creative industry by making them more competetive. The project group consists of Sunday Studio – an Aarhus-based visual effects company – The Alexandra Institutte and the game company Javira.

We would like to invite you to participate in our first open workshop with the purpose of qualifying the project direction and to anchor the project in more Danish companies.

The workshop is on the 13th march 2013 at 1PM – 4PM at the Alexandra Institutte in meeting room Ada-333.
Sign up: http://www.doodle.com/7hqft2934eqswdn3

The main focus of the project is to build a software platform on which new techniques are able to facilitate quality improvements and faster production in the danish creative industry. By using result-oriented 3D-software we enable the artists to work directly on the final visual result and by doing so we allow the artists to be more creative.
We are going to give an introduction to what it could mean to be working using result-oriented 3D-software. Afterwards we would like the participating companies to join in – and tell us about the challenges you see in 3D software today.
We hope you will participate in our workshop and by doing so help us target the challenges faced by your company.

More information about the project can be seen here:

Artikel på Alexandra.dk: Aarhusianere vil udvikle smarte skyer og flammer til film

Artikel i Jyllands-Posten: Penge, der går op i røg

 

]]>
https://viscomp.alexandra.dk/?feed=rss2&p=1709 0
Oriented Particles in 2D https://viscomp.alexandra.dk/?p=1644 https://viscomp.alexandra.dk/?p=1644#respond Wed, 02 Jan 2013 09:02:47 +0000 http://viscomp.alexandra.dk/?p=1644 We have been asked quite a lot about the Oriented Particles approach to physically based simulation, where particles besides position and velocity also have an ellipsoid shape, an orientation and an angular velocity. So we decided to do a small c++ demo in 2D of how it can be done in practice.

Basically what the demo show is a somewhat simplified version of our Oriented Particles Christmas Card. The demo is a standard GLUT/OpenGL application but it can also be cross-compiled to javascript/WebGL using emscripten, the result of which can be seen here. In the following we will assume that the reader has read the original paper and thus we will just give a brief introduction to the demo code.

In the demo we want to be able to toss this guy around:

Also we want to make it look like the guy has bones in his body. For this purpose we have drawn a “skeleton” and used OpenCV to identify individual bones and fit ellipses to these. The result can be seen below with the ellipses shown in red. Our little OpenCV program outputs code directly which has been inserted into the example code.

 

Because of some technicalities with emscripten we wanted to avoid loading files from the example, so the shaders have been inlined as strings in c-headers. Also the image of the guy has been saved to a c-header using GIMP and included directly in the example. Source code for the example can be found here.

The class PositionBasedDynamics encapsulates a basic generalized Position Based Dynamics simulation loop, and two constraints, StayAboveLineConstraint and GeneralizedShapeMatchingConstraint, have also been included in the project. In main.cpp particles are attached to nearby particles using implicit (generalized) shape matching constraints in the function CreateObject and the object is inserted to the physics system in the function UploadOrientedParticlesObjectToPhysicsSystem.

For visualization a grid of vertices is created covering the area of the simulated particles. The vertices are triangulated and supplied with texture coordinated and used for rendering. As the particles each have an orientation they each constitute a two-dimensional coordinate system and can thus be used for skinning the grid mesh. For this purpose a parametrisation of vertices is made in the function GenerateGrid2D. Each vertex can be skinned from up to 3 particles and the parametrisation information is stored as 3D texture coordinates where the integer part of each component describes which particle to skin from and the fractional part describes the weighting to use for this particle. Skinning matrices are computed and uploaded to a float RGBA texture and the actual skinning is done in the vertex shader.

To get some motion in the system the little guys bag is moved around the scene. The example is not optimal – for instance the grid mesh could be based on index buffers which would save some calculations. Another problem with the 2D example is that for shape matching involving only 2 particles we sometimes find an optimal rotation that mirrors the particle. A quick fix to remedy this would be to check for mirroring matrices in the 2D matrix class. Also as you might know there are some issues with floating point textures in WebGL – especially when we want to access the texture from vertex shader. So to improve compatability for WebGL/GLES it might be a good idea to do the skinning on the CPU instead of in the vertex program – this was the solution we used when porting the system to iOS.

Hope you’ll have fun with the example!

 

 

]]>
https://viscomp.alexandra.dk/?feed=rss2&p=1644 0
Oriented Particles in 2D – an example. https://viscomp.alexandra.dk/?p=2093 https://viscomp.alexandra.dk/?p=2093#comments Wed, 02 Jan 2013 09:02:47 +0000 http://viscomp.alexandra.dk/?p=1644 We have been asked quite a lot about the Oriented Particles approach to physically based simulation, where particles besides position and velocity also have an ellipsoid shape, an orientation and an angular velocity. So we decided to do a small c++ demo in 2D of how it can be done in practice.

Basically what the demo show is a somewhat simplified version of our Oriented Particles Christmas Card. The demo is a standard GLUT/OpenGL application but it can also be cross-compiled to javascript/WebGL using emscripten, the result of which can be seen here. In the following we will assume that the reader has read the original paper and thus we will just give a brief introduction to the demo code.

In the demo we want to be able to toss this guy around:

Also we want to make it look like the guy has bones in his body. For this purpose we have drawn a “skeleton” and used OpenCV to identify individual bones and fit ellipses to these. The result can be seen below with the ellipses shown in red. Our little OpenCV program outputs code directly which has been inserted into the example code.

 

Because of some technicalities with emscripten we wanted to avoid loading files from the example, so the shaders have been inlined as strings in c-headers. Also the image of the guy has been saved to a c-header using GIMP and included directly in the example. Source code for the example can be found here.

The class PositionBasedDynamics encapsulates a basic generalized Position Based Dynamics simulation loop, and two constraints, StayAboveLineConstraint and GeneralizedShapeMatchingConstraint, have also been included in the project. In main.cpp particles are attached to nearby particles using implicit (generalized) shape matching constraints in the function CreateObject and the object is inserted to the physics system in the function UploadOrientedParticlesObjectToPhysicsSystem.

For visualization a grid of vertices is created covering the area of the simulated particles. The vertices are triangulated and supplied with texture coordinated and used for rendering. As the particles each have an orientation they each constitute a two-dimensional coordinate system and can thus be used for skinning the grid mesh. For this purpose a parametrisation of vertices is made in the function GenerateGrid2D. Each vertex can be skinned from up to 3 particles and the parametrisation information is stored as 3D texture coordinates where the integer part of each component describes which particle to skin from and the fractional part describes the weighting to use for this particle. Skinning matrices are computed and uploaded to a float RGBA texture and the actual skinning is done in the vertex shader.

To get some motion in the system the little guys bag is moved around the scene. The example is not optimal – for instance the grid mesh could be based on index buffers which would save some calculations. Another problem with the 2D example is that for shape matching involving only 2 particles we sometimes find an optimal rotation that mirrors the particle. A quick fix to remedy this would be to check for mirroring matrices in the 2D matrix class. Also as you might know there are some issues with floating point textures in WebGL – especially when we want to access the texture from vertex shader. So to improve compatability for WebGL/GLES it might be a good idea to do the skinning on the CPU instead of in the vertex program – this was the solution we used when porting the system to iOS.

Hope you’ll have fun with the example!

 

 

]]>
https://viscomp.alexandra.dk/?feed=rss2&p=2093 2
Oriented Particles Christmas Card https://viscomp.alexandra.dk/?p=1542 https://viscomp.alexandra.dk/?p=1542#respond Fri, 07 Dec 2012 11:29:51 +0000 http://viscomp.alexandra.dk/?p=1542 To warm up for Christmas we decided to create a small interactive Christmas card for all of you.

The interactive part is based on a 2D version of the Oriented Particles approach to realtime physics simulation.

The card was implemented using our Alexandra Physics Engine in c++ and cross-compiled to javascript using emscripten.

The card has been reported to work on most systems in Chrome and Firefox but some systems lack the required WebGL capabilities.

You can try if it works on your system here.

There will be a tutorial on the 2D oriented particles later on this blog.

]]>
https://viscomp.alexandra.dk/?feed=rss2&p=1542 0
Paper Accepted for SCA 2012 https://viscomp.alexandra.dk/?p=1241 https://viscomp.alexandra.dk/?p=1241#comments Fri, 06 Jul 2012 11:32:07 +0000 http://viscomp.alexandra.dk/?p=1241 Crown Splash

 

Our paper on simulation of immiscible fluids on unstructured meshes was recently accepted for publication at SCA 2012 in Switzerland. The work was done in collaboration with the Technical University of Denmark, the University of Copenhagen, the University of Utah and the University of British Columbia. You can find the abstract here. In the near future, we will add a preprint as well as a video.

[UPDATE] We won the Best Paper award! Yay!

]]>
https://viscomp.alexandra.dk/?feed=rss2&p=1241 1
Fun with oriented particles (do knot try this at home). https://viscomp.alexandra.dk/?p=1188 https://viscomp.alexandra.dk/?p=1188#comments Tue, 15 May 2012 08:41:46 +0000 http://viscomp.alexandra.dk/?p=1188 Hi everybody,

Recently we have spent some more time on real-time physics simulation.

One of the things we have been working on can be seen in this video of a real-time volumetric simulation of an elastic torus knot.

The simulation was realized using the ‘oriented particles’ approach to shape matching developed by Matthias Müller and Nuttapong Chentanez.

The implementation will be used in the next version of the Visible Ear Simulator ( ves.cg.alexandra.dk ).

 

 

 

]]>
https://viscomp.alexandra.dk/?feed=rss2&p=1188 3