Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

How to rotate particles at a constant rate?

I'm not sure if this is a bug, but something is wonky about InitMeshRotationRate. I'm trying to get the particles to inherit the angular velocity of their parent emitter (realistic). I can get them to spawn with the instantaneous correct angular velocity (though the fact that the parameter is in terms of Euler angles is annoying and inconsistent). The problem is that the particles don't rotate at a constant rate after they spawn.

alt text

The same thing occurs if you use the MeshRotationRateOverLife module. My question is what's going on? It looks like the mesh is simulating physics -- but not UE's fake rotation physics -- PhysX's actual rotation physics that uses the full inertia tensor in its equations of motion.

I'm inexperienced with Cascade, so maybe I'm doing something wrong.. How can I get a mesh particle to have a constant rotation rate?

EDIT: I figured out what's going on. It's a bug. See posted answer.

Product Version: UE 4.14
more ▼

asked Jan 10 '17 at 09:38 AM in Using UE4

avatar image

Turing Machine
143 3 11 17

avatar image Luos Jan 10 '17 at 12:06 PM

Its really hard to tell whats up with such a small image. it looks like very poor pivot placement, but without any proper visual information I cannot even begin to try and solve this :/

avatar image Turing Machine Jan 10 '17 at 07:42 PM

Sorry about that, should be better quality here https://gfycat.com/MenacingGrossElephantseal. Even with a poor pivot, that's not constant angular velocity.

avatar image Luos Jan 10 '17 at 07:47 PM

can you show me the shader, and the pivot point of the mesh? If those are fine then.. im confused af. :p

avatar image Turing Machine Jan 10 '17 at 10:03 PM

I figured out what it's doing (see posted answer). It's adding the Euler angles rather than combining them correctly. In the posted answer I switched meshes to one pivoted at the base (easier to see). The shader is just an emissive fresnel. I can't think of any good hack to get around the bug unfortunately.

(comments are locked)
10|2000 characters needed characters left

1 answer: sort voted first

Okay I figured out what it's doing, and it's definitely a bug. Here is a better [gif of the particle system]. The particle system spawns a mesh and sets an initial rotation rate via the InitMeshRotationRate module. As you can see, the rotation rate is specified by a vector that represents normalized Euler angles (1 = 360 degrees). This representation is a poor choice in my opinion because it is inconsistent with the angular velocity representation in Blueprint. The vector parameter should correspond to the scaled rotation axis (length = speed). But I digress. The mesh is just a cylinder with a pivot at its base. The rotation rate vector is chosen as [0.1,0.3,0.4].

The problem with Euler angles is that you can't simply add them together, and that is what Cascade is doing to rotate the particle. The following shows on the left the particle (yellow) and on the right a mesh (pink) rotating with the same delta rotation, but using the correct CombineRotators blueprint node. Notice how the pink mesh has a constant rotation rate as it should : [gif of combined rotation]

Now instead of using the correct CombineRotators node for the pink mesh, we simply add the rotators. We see the rotation is exactly the same as the particle. Therein lies the bug. [gif of added rotation]

Here is the blueprint tick function of the rotating pink mesh.

alt text

more ▼

answered Jan 10 '17 at 10:00 PM

avatar image

Turing Machine
143 3 11 17

avatar image Luos Jan 10 '17 at 10:21 PM

I can forward this to some ue4 dev's. Though, it probably ends up with either Tim, Eric, or one of the other awesome folks to say "might stay like this until niagara"

avatar image Turing Machine Jan 10 '17 at 10:36 PM

Lol, I mean, the fact that you can't rotate particles correctly is a pretty core bug imo. And the cause of the bug has been specified so it should be easy to fix. But what do I know. But yes please forward it. I'll have to come up with a workaround in the meantime.

(comments are locked)
10|2000 characters needed characters left
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question