Hi guys,
I want to start creating projects in VR (virtual reality).
Can you help me start?
Which VR glasses are good for show stores, showrooms, walking in place, and changing some materials like interior design configurations
I want to know which glasses are good for my customers and What I have to learn.
Is three.js enough to create a VR experience? or do we have to use unreal engine and unity?
If you have any link that can help me please share with me
Hi, from my experience the best device you can get is the meta quest 3.
With threejs you can do pretty anything you want, i will suggest you to start by watching the examples tagged as “webxr” and reading the code of those, all the rest will come by itself
2 Likes
Some 3D models have high textures and file size.
Will we faced with performance problems in threejs webxr VR on the web platform?
How did you handle high quality and good performance like this
For the performance a meta quest have a decent power, the fact that we are using js and on a browser limit what we can do but if the models are optimized, the textures have a proper resolution (and maybe effects light the light baked in and not calculated at runtime) and the code is good without too much operation (like your example from a code perspective is really light, it’s all modelling) the only thing that can be a problem is the first loading time of the page where you have to download all the assets but once loaded you should be good to go.
If yoo want some incredible and lightweight result for the material you can go with glsl (like this example) or with the new tsl on webgpu even tough i never used it on vr and i’m not sure how will it work there.
Recently I faced performance bugs on one of my projects
How can I check if that is the problem with the 3D model or textures or way of coding?
I have developed a website for my customer.it is about 4 months that we have worked on it. next js + three js. Everything was not bad but now the project is faced with performance problems and in many devices, the whole system(PC> Mac and window even RAM is 8 or 16 GB)will hang and have low speed. Can you tell me some tips to find the reason and fix it?
we will have same contents in VR yes?
on web platform
our purpose is sth like this : https://www.homestyler.com/ + VR
With a quick look i think that maybe the performace issue is more with the code, i see a lot of functionality and so a lot of thing that can be stressful for the cpu, as a quick tip I can say to check if the 3d model are optimized (less polygon possible) and codewise if you have a lot of raycaster something like this can improve a lot, for the rest of the code is always difficult to optimize, just check to do only the bare minimum in the render loop.
I use react.js
my animate scene is in another component.
I call it animate and it calls itself during the whole time off project. I mean always
Is it not good?
What do you use to render?
The render function need to be always running, but maybe you can take something out, like declaration of objects or functions or some operation that you can do only one time and don’t need to do every frame.
A little trick i’ve used is to divide the operations in groups and do some non vital one only like every 2-3 frame instead of being alway done, it can help if something is heavy and is not important 60 times a second but maybe only 30 or 10 times
1 Like
Yes, instead of something like this:
const allObj = …
function render(){
bigOperation(allObj)
otherOperations()
}
You can separate the operations with something like this:
const firstHalfObj = …
const secondHalfObj = …
var frame = 0
function render(){
if(frame % 2 == 0)
bigOperation(firstHalfObj)
else
bigOperation(secondHalfObj)
otherOperations()
}
In this way you divide in half the operation per frame doing those only for half the obj in the scene, at 60 fps you have the obj updating at 30 fps that is still good if you are not doing something that need a lot of precision like a game.