Simple World Axis Scaling

Is there a way to do stupid scaling and ignore the rotation? Or would I need to apply the rotation to the mesh?
Because in my case I have scaling values for the 3 world axis and the jmonkey scaling is too clever for my use case.

You may have to explain why setLocalScale() does not do what you want. Otherwise, we can provide a javadoc link.

@ogerlord, is this non-uniform scaling with rotation?

@pspeed said: You may have to explain why setLocalScale() does not do what you want. Otherwise, we can provide a javadoc link.
I want to load and display some data from an old game engine.
@wezrule said: @ogerlord, is this non-uniform scaling with rotation?
Yeah, I didnt know this is called non-uniform scaling, maybe now i will find some useful posts.

there are some problems with non-uniform scaling with rotations, might be worth checking this thread, to see if you suffer the same issue.

http://hub.jmonkeyengine.org/forum/topic/children-inheriting-scale-before-rotation/page/2/

To make it clear, this is how it should look like:

All the 3 models have the same scale values but they are streched because of the rotation.
I have still no idea how to achive this. The model is always first scaled and after this rotated.

You may need to show some pictures. Show some code. Show some values of scaling… of rotation, etc…

Otherwise, I’m not even sure we are all talking about the same things.

Do you have problems to see the image i posted or do you want a second picture how it looks in jmonkey?
Anyway, here is the second picture how it looked like when I scale the models in jmonkey:

@ogerlord said: Do you have problems to see the image i posted or do you want a second picture how it looks in jmonkey? Anyway, here is the second picture how it looked like when I scale the models in jmonkey:

Your images haven’t been showing up. In the future, you may want to use a good image hosting site like imgur.

In the picture, I can’t tell if these are distorted of we are just looking at them from a strange angle. How have you loaded them? What scaling have you provided? What rotation have you provided?

Please start providing helpful information that is asked for or I suspect we will all give up in frustration.

I have no code because I dont know weather Jmonkey supports this feature or not. Everything I tried gave me the same results like in the second picture.
Again:
I want to do the following Steps in this order for multiple geometries:

  1. Rotate the geometry
  2. Scale the geomety and use the world xyz vectors

If you want to scale using world coordinates, you need to scale a non-rotated node and rotate its child.

@ogerlord said: I have no code because I dont know weather Jmonkey supports this feature or not. Everything I tried gave me the same results like in the second picture. Again: I want to do the following Steps in this order for multiple geometries: 1. Rotate the geometry 2. Scale the geomety and use the world xyz vectors

So you “have no code” and yet “tried things”. These two statements are in conflict.

I’ll let others step in and help now as it’s too frustrating trying to get information and I don’t have time to supply random solutions for problems that may exist.

The code is just this commands in all different combinations:
[java]
model.setLocalTranslation(x, y, z);
model.setLocalScale(scaleX, scaleY, scaleZ);

for(Spatial sp : model.getChildren())
{
Geometry g = (Geometry)sp;
g.setLocalRotation(roll);
}[/java]
I changed the order, tried it with scale instead of localScale, model.SetLocalRotation instead of rotating the children,…
Sorry, but I cant image that this code can help you. And to be honest: In the first picture I posted you can see what I try to achieve.

@ogerlord said: The code is just this commands in all different combinations: [java] model.setLocalTranslation(x, y, z); model.setLocalScale(scaleX, scaleY, scaleZ);

for(Spatial sp : model.getChildren())
{
Geometry g = (Geometry)sp;
g.setLocalRotation(roll);
}[/java]
I changed the order, tried it with scale instead of localScale, model.SetLocalRotation instead of rotating the children,…
Sorry, but I cant image that this code can help you. And to be honest: In the first picture I posted you can see what I try to achieve.

You’re right… the values of scaleX, scaleY, and scaleZ would clarify a lot… been asking since…

@pspeed said: You may need to show some pictures. Show some code. Show some values of scaling... of rotation, etc..

Otherwise, I’m not even sure we are all talking about the same things.

The pics don’t show up here so they require three extra steps to view. And they all show the problem but not what you are actually trying to achieve. I can guess… but it could be one of about 3 things and it would be so simple for you just to explain.

Good luck with your game.

And they all show the problem but not what you are actually trying to achieve.
Nope, the first image shows what i try to achieve:
@ogerlord said: To make it clear, this is how it should look like: All the 3 models have the same scale values but they are streched because of the rotation. I have still no idea how to achieve this. The model is always first scaled and after this rotated.

You can’t do this in JME without either modifying the mesh or modifying a shader. Scale and rotation are applied separately.