Skip to main content

Improvements, additions and fixes

New in the Twinfinity API

In the first week of May we released a new version of the @twinfinity/core (4.1.0) and this new update contains some really nice features. In this post we break down the changes, show you some examples and give you some background to what has been changed and how it can help you when using the Twinfinity API.

Ikon för Nyheter/Artiklar, markerar artikel om nya Twinfinity API.

Headline for a main paragraph

The first paragraph goes here. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus pharetra turpis augue, at fringilla tortor varius sed. Donec a ultricies tortor. Phasellus auctor placerat purus at imperdiet. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Aliquam eros arcu, tristique sed ex nec, ullamcorper rutrum elit. Sed eget faucibus felis. Etiam auctor et augue quis placerat. Fusce sed elit magna. Maecenas blandit venenatis viverra. Nunc accumsan erat eu nunc aliquam, at bibendum felis commodo.

Subheadline within the paragraph

Nulla facilisi. Integer ac rhoncus est. Nulla laoreet rutrum magna, eu semper magna semper ac. Duis nibh augue, aliquam sit amet venenatis vitae, venenatis egestas magna. Sed ligula felis, rhoncus sit amet tristique eu, fringilla eu massa. Vestibulum non semper dolor. Vestibulum ornare arcu sit amet tempor rhoncus. Quisque feugiat velit in feugiat rhoncus.

… and look better

No more war of the ants!

When it comes to rendering some really nice bug fixes and features have been added with this version. First of all we’ve tracked down and solved the bug that in certain cases gave objects a look of static tv noise. This was something that was really taking away from the user experience and we are happy that this is now resolved.

 

   

Normal… normals?

As you may have experienced, especially in piping and duct models, the normals were pointing in the wrong direction creating either objects that looked like they were turned inside out or when turning backface culling off being almost black. This has now been addressed so when turning backface culling off, like this:

api.viewer.performance.isBackfaceCullingEnabled = false;

the model will now look correct. Please note that disabling backface culling may have an effect on performance.

Detaljerad 3D-modell av VVS-system, visar felaktiga Normaler som gör att toalettens vattentank ser inverterad ut.

Before

You can see on the the toilets and the metal sink that the normals are broken. Normals are how the graphics card know what direction a surface is visible in. In this case the normals are pointing in the wrong direction giving the water tank of the toilets and inverted look and if you turned backface culling enabled, the geometries would be very dark and not have the correct color.

50 lines of code, really?

Yes, really!

For this example, we'll make use of our playground and a Meta Quest 3 headset. Basically, all you need to do is:

  • Set up your basic scene.
  • Load what you want to see.
  • Set up meshes that are used as floors in the VR interaction.
  • Initiate the XR session.
  • Set a starting point.
  • Adjust the camera height.

Sounds easy, right? Well have a look yourself in this Playground. Just open the link in your VR headset browser. Please note that the browser needs to be WebXR compatible. Before using this for your project, please make sure you understand the technical caveats and limitations that apply. You can read more about them in our help centre

The next step

For more information about the Twinfinity API check out help.twinfinity.com and docs.twinfinity.com. If you want to try it out for yourself the quickest way is to just visist our playground at playground.twinfinity.dev.

If you are considering Twinfinity for your digital twin project, app or website you can reach us by booking a demo. Make sure to add a comment what it is you are interested in so that we can meet your needs as best we can.

The colors, look at the colors!

Introducing HSV

In this release we introduce the possibility to use HSV in your scenes. HSV which stands for Hue, Saturation, Value is an alternative color model that, when enabled, allows for more control of how the colors of your scene turn out.

   

Make your scene more vibrant

Hue controls the overall color of the scene allowing you to add a tint to the entire scene. Saturation allows you to controll how vibrant your colors are to be and finally the Value controls the overall brightness of the scene.

By leveraging HSV like this you can get colors that are closer to the actual RGB value in the rendered scene.

3D-modell av byggnad med dataetiketter, visar färgerna före justering med Twinfinity API:s nya HSV-värden.

Before

The colors shown here are without the new possibility of adjusting the HSV values.

After

These are the same colors with adjustments to the HSV values. You can see that with this adjustments the resulting color displayed is much closer to the RGB values given.

3D-modell av byggnad med färgade dataetiketter, representerar Twinfinity API:s förbättrade färgnoggrannhet.

Playground examples

Try it yourself

We always try to show you what we’ve done and how it works and the Twinfinity Playground is the perfect place for us to showcase our updates, and for you to play around with the code to get a feel for the new functionallity.

Here is a playground showing some of the changes we’ve made in this version:

Twinfinity Playground showcasing changes in 4.1.0

Just as I was writing this, Christoffer from our dev team sent me this awesome playground showcasing the HSV changes in a more… colorful way

Twinfinity Playground - HSV Disco!

Find out more

Lets talk!

For more information about the Twinfinity API check out help.twinfinity.com and docs.twinfinity.com. If you want to try it out for yourself the quickest way is to just visist our playground at playground.twinfinity.dev.

If you are considering Twinfinity for your digital twin project, app or website you can reach us by booking a demo. Make sure to add a comment what it is you are interested in so that we can meet your needs as best we can.

All the best! Have fun out there

/Tobias

More news

View all news