Resize a 3D object model in Three.js - three.js

I am building a Three.js App (React Template) with Vite.js. I have two 3D models, an earth and an ISS model. My problem is that the ISS model is a lot bigger than the Earth, logically something that I wouldn't want. You can see that in the image below. My question is: How can I resize the ISS model?
I've searched for answers, but most of them say that I should give the ISS model a position like this issMesh.position.z = -700 or a big number. But if I do, my model breaks into pieces, like in the image below:
So how could I resize it?

Related

aoMap/Shadows inversed in ThreeJS

I am currently trying to display a 3D room using Three.JS. I bought the model on SketchFab and I am using its GLTF format.
This model includes "baked-in" shadows using an occlusion map and a specular glossiness map.
I do not plan on having dynamic cast shadows so those baked shadows are just fine.
The model is properly imported using the GLTFLoader but my issue arise when I try to light my scene. I set up a basic HemisphereLight and for some reason all my shadows and lit areas are inversed as you can see in the screenshot below:
Screenshot
All the areas that are supposed to be shadows are lit and all the areas that are supposed to be lit are shadows.
I've been trying to solve this for a while now and have no idea where this behaviour is coming from. I also tried to use online GLTF viewer to see if there was any problem with the model itself but everything looks fine:
Screenshot 2

RealityKit fit model entity within field of view

Using RealityKit I’m trying to position a PerspectiveCamera to fit an ModelEntity within its field of view. Specifically I want the entity to fill the frame as much as possible. Does anyone have a function to do this? I've seen an example in a different environment but am not successful in translating it to RealityKit. I need the function to take all three axis into account when determining the camera distance.
Thanks,
Spiff

API to put shirt on 3d avatar

I created avatar 3d model (.glb) able to run from browser. I want user to upload the shirt(image)
and avatar dress should be updated accordingly.
I tried various options mixamo, readyplayer.me etc but they do not have option to update the avatar with custom dress, Is there any API for any open source solution for this. Pls suggest
Thanks
vijay
more info is needed but based on what is provided it sounds like you have means to extract material texture from photograph. Once you have the texture, then it would come down to matching UV layout and just applying the new texture to the material. this process would be the same in three.js, babylon.js or any other 3d library you use.

Image on Surface of a .obj File Unity

I'm new to Unity and I want to develop a small racing Game. I started to draw the basic parts of the track in an external 3D tool. I saved my designed parts as an .obj file and imported them into unity. An example looks like this.
What the .obj looks like
The curve had 3 parts, both walls and the ground between those, the ground is a surface object(comes from the .obj file). Now I tried to get something like this:
Desired Result
But the only way to achieve this optic was to make a new GameObject->Image and set it just above the Ground, there must be an easier way of getting this optic without an extra image. I defined a material out of an image showing asphalt and put it over the surface but the surface just got darker(seems like the average color inside the picture) and didn't show the material.
When I put in a GameObject->Plane and drop the same material onto the plane it looks just like the picture which is perfect, but why isn't it working on my surface out of my .obj file. Can you please show me the correct way to get this done.

How to animate fbx model using xna programmatically

I have fbx model exported from 3ds max. I have 3d coordinate that are extracted from a motion capture session. I want to animate the model using these 3d coordinates. after googling I found xna can be used for this purpose.
I found a tutorial on digitalrun that used kinectxna to capture motion and animate .fbx model using xna. but I can't build it because it wants kinect hardware elements.
I found another tutorial here. I am newbie to xna. I faced difficulties to understand that.can someone point me to right tutorial that expalins skeletal animation of .fbx model using xna?
You can start with this example to understand how animation work:
http://xbox.create.msdn.com/en-us/education/catalog/sample/skinned_model
The animation data is contained in the model itself. But you can change some code to work with your 3d coordinates.
Also...
I found a library to animation. XNAnimation Library
P.S. You can find a lot of tutorials and libraries for animation if you search "Skinned Model"

Resources