Recent Posts

Pages: [1] 2 3 ... 10
1
Support / Re: Asymmetrical Scaling
« Last post by EgonOlsen on Today at 04:52:18 pm »
Maybe because the transformation as a whole is different (some additional rotation involved)? Try to offset the glow by a scaled version of the results from get?Axis() instead.
2
Support / Re: Asymmetrical Scaling
« Last post by AGP on June 22, 2018, 10:11:29 am »
Then why doesn't that snippet place the glow over the glower? Can you think of a possible solution?

Edit: I should mention that the original object was created with ExtendedPrimitives.createCylinder(...).
3
Support / Re: Asymmetrical Scaling
« Last post by EgonOlsen on June 22, 2018, 08:27:26 am »
Yes, you have to call build and yes, getTransformedCenter() should apply all parent transformations.
4
Support / Re: Asymmetrical Scaling
« Last post by AGP on June 21, 2018, 10:06:48 pm »
That's weird. I actually have two different, possibly related, problems. The second one is that the glow object, though both parallel and near the original object, is not in the exact same space as the original object. Yet I initialize it like so:

Code: [Select]
glow = new Object3D(obj, false);

Do you have to call build() on the glow object? Also, does getTransformedCenter() always consider the translations of all parents? Because I can't place the glow over the glower even with:

Code: [Select]
SimpleVector to = obj.getTransformedCenter();
SimpleVector o = glow.getTransformedCenter();
glow.translate(to.x-o.x, to.y-o.y, to.z-o.z);
5
Support / Re: Asymmetrical Scaling
« Last post by EgonOlsen on June 21, 2018, 10:04:01 pm »
Must be something else then. The controller works in object space. I don't see how this code snippet alone can cause wrong scaling unless the object is somehow rotated around Z and your Z-scaling should actually be Y.
6
Support / Re: Asymmetrical Scaling
« Last post by AGP on June 21, 2018, 06:04:45 pm »
Obviously, that it's scaling in the wrong axis. But only in my real-world use. The test in which I didn't rotate the object worked fine.
7
Support / Re: Asymmetrical Scaling
« Last post by EgonOlsen on June 21, 2018, 09:07:26 am »
The vertex controller works in object space, not in world space. What exactly is the problem?
8
Support / Asymmetrical Scaling
« Last post by AGP on June 21, 2018, 06:24:00 am »
I'm trying to create a flickering glow. To that end, I wrote the following thickening method in a vertex controller. The problem happens when the base object, from which the glow object is created, is rotated because the glow appears to be modified in worldspace as opposed to in objectspace. What should I do to calculate the x/z distortion in objectspace?

Code: [Select]
     public void thicken(final float deltaTime) {
SimpleVector[] vertices = this.getSourceMesh();
SimpleVector[] destination = this.getDestinationMesh();
for (int i = 0; i < vertices.length; i++) {
     SimpleVector v = vertices[i];
     v.x *= (1f+deltaTime);
     v.z *= (1f+deltaTime);
     destination[i] = v;
}
this.updateMesh();
     }
9
 Since I've already solved it, there's no problem. But what I did there was a splitter: the MD2 exporter exports all animations as a single stream. My program splits them and saves a serialized copy.
10
I think that I don't understand your actual problem. The idea is: You create a new sub sequence, add all the keyframes, continue with the next one. If you animate a sequence, it's limited to that sequence's animations unless you animate 0, which includes all keyframes. What's the actual issue with that?
Pages: [1] 2 3 ... 10