Real World Scale

Hello everyone!



I’m having a little trouble with scales when importing a .obj model into jMonkey. I’ve created a real World Scale model of a building that’s 15x20 m of area. When I import it to jMonkey, I set the local scale to 1f like this:



[java]currentObject.setLocalScale(1f);[/java]



But when I run the app, the build e far to big and I can’t understand why (It’s like i’m the size of a cat in a real house :D)… .I’m using the physics example explained by the tutorials to navigate inside the model.



Can someone please enlighten about the problem or indicate some good reading material?





Cheers!

when you import the model, the localScale is 1. So if you wanna half it for example, use 0.5f.

jME3 initial camera configuration is at position 0, 0, -10 and the camera moves at 1 meter per second. You might have to change a few things around in the camera and the FlyByCamera (which is used for the flying) so it matches your scale

Momoko_Fan said:
jME3 initial camera configuration is at position 0, 0, -10 and the camera moves at 1 meter per second. You might have to change a few things around in the camera and the FlyByCamera (which is used for the flying) so it matches your scale


I'm confused... I'm not understanding how can the Camera be responsible for the problem. When I start the app, my hole building is huge, and when I walk around, like I do in the physics tutorial, It's like I'm the size of an ant in a castle...for example when I pass trough a normal size door (in real world), it's like i'm walking trough the entrance gate of a caslte.

My CollysionShape has a radius of 1.5f and an hight of 6f. If the scale were correct, this meant that the shape is 6 meters tall, correct?

As so, and if you think the problem relies on the camera settings, can you please help me setting the correct values to it?

The CollisionShape isn’t going to make the world look any different. Tinkering with the camera settings (moving faster, as one example) would make the camera ‘feel’ bigger in the world. You can alternatively use a smaller localScale, as @wezrule has already pointed out, to make the building smaller

sbook said:
The CollisionShape isn't going to make the world look any different. Tinkering with the camera settings (moving faster, as one example) would make the camera 'feel' bigger in the world. You can alternatively use a smaller localScale, as @wezrule has already pointed out, to make the building smaller



Ok, but if I set the localScale just based on how it looks, I cannot guarantee that the proportions are correct. Maybe I'm not being clear enough about what I wan't to accomplish, but is simple in concept. I "just" wan't to have a player walking around the house in First Person Mode, having the same view feel that a person in the real world would have if it was walking inside the built house, for that I need the the proportions to be exact.

Look into your obj, make a quad in your model programm iwth 1x1x1 meters and then look in the file if the vertexes are at the positions expected. If not your exporter scales false.

EmpirePhoenix said:
Look into your obj, make a quad in your model programm iwth 1x1x1 meters and then look in the file if the vertexes are at the positions expected. If not your exporter scales false.


Ok, I'm going to try that. Latter today I'l post the results.
joaocartaxo said:
Ok, but if I set the localScale just based on how it looks, I cannot guarantee that the proportions are correct. Maybe I'm not being clear enough about what I wan't to accomplish, but is simple in concept. I "just" wan't to have a player walking around the house in First Person Mode, having the same view feel that a person in the real world would have if it was walking inside the built house, for that I need the the proportions to be exact.


setLocalScale() scales the object proportionally. If its the 'feel' of walking around that you're after then you will need to work with the camera (try playing with the frustum) until you can get it to work comfortably.

As skye hints, there is no inherent “size logic” when you have a camera and some models. The apparent size comes from the relation of sizes and the camera location / frustum settings. Only when you use physics you should obey to a general scale of 1 unit = 1 meter but effectively you can compensate for different sizes there as well by adapting speed / gravity etc.

The problem was with 3dStudioMax Units. They where not defined correctly. After setting them to the correct values, I’ve exported the model to scale = 1 and then, in jMonkey, the SetLocalScale(1f) works perfectly. Thank you all, and specially thank you EmpirePhoenix for your post was the trigger for the solution!





Cheers!