random rotation on aimed instances


#1

Hi all yall.

I have been scratching what’s left of my hair trying to do what I thought would be very very simple and straight forward… there are too many sharp cookies here, and I would appreciate some advice.

I got an object instanced 50 times on the surface of a sphere. The particles have zero velocity and my object has a “front” which aims away at a locator. I use a runtime expression to substract the particle’s position from the locator’s position and use the resulting vector as my aim direction. It all works beautifully… but, here’s the but.

I would like the instanced object to have a random “x” rotation yet preserve the aim direction… does it make sense? Think a rocket standing up pointing to a locator. Two axis (x and z) will be used to determined the aim, while “y” should still be available without loosing what the rocket is aiming at.

Note: I know I could make 10 versions of the object with different “x” rotations and instance all of those to get the random look with the correct aim… but I am looking for a more scripted solution.

Some screenshots (behold… my modeling skills):


#2

I needed to do something similar.
It seemed that the big hurdle was that the default aim axis ran into gimbal issues if I wanted to spin aimed instances.
Got some help and an example scene that got me where I needed to go from master Aikiman.
Here is the thread.
http://forums.cgsociety.org/showthread.php?f=86&t=1091437


#3

Thank for your reply. I took a look at the expression. It is an effective approach to spinning instances.

Originally, I thought that randomizing the aim axis per particle (using the correct axis combo) would have solved my problem. When I do this, although the instances looked randomized I loose their clear aim.

Interesting problem though. Here’s one more image showing the instances on a flat surface. All the instances aim at the locator in a very orderly fashion. I am looking at some orderly chaos :wink:


#4

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.