Sat, Jan 11, 3:51 PM CST

Renderosity Forums / Vue



Welcome to the Vue Forum

Forum Moderators: wheatpenny, TheBryster

Vue F.A.Q (Last Updated: 2024 Dec 30 8:14 pm)



Subject: Ecosystems: converging on a single point


svdl ( ) posted Fri, 13 January 2006 at 11:16 PM · edited Sat, 11 January 2025 at 12:47 PM

Attached Link: http://www.renderosity.com/messages.ez?Form.ShowMessage=2187952

file_318398.JPG

There have been a couple of questions on how to have eco'ed object face a certain point in space (or run away, or maybe circle around). I've found a way to do this, building on the work by yggdrasil (see the link). The image displays the complete function that drives the orientation. Less complex than it looks, fortunately.

The pen is mightier than the sword. But if you literally want to have some impact, use a typewriter

My gallery   My freestuff


svdl ( ) posted Fri, 13 January 2006 at 11:21 PM

file_318399.JPG

Walking top-down through the function: First I wanted to eliminate the Z coordinate from the eco object position. I did this by applying a Matrix node, all coeffiencts zero, except for the (1,1) and (2,2) position, those have value 1.00. See image.

The pen is mightier than the sword. But if you literally want to have some impact, use a typewriter

My gallery   My freestuff


svdl ( ) posted Fri, 13 January 2006 at 11:26 PM

file_318400.JPG

Next I had to add the "center object" position to the function. That's what the constant node (nr. 1 in the image) stands for. Unfortunately, the object center should be more than 100 units away from the universe center, and the Constant node does not accept values outside the -100 .. 100 range. By dividing the actual "center object" coordinates by 10 and applying a matrix multiplication with the coefficients as shown (nr 2 in the image), I now can place the center object in the -1000 .. 1000 range. And if it needs to be even farther away, it's easy to adjust the multiplication factor.

The pen is mightier than the sword. But if you literally want to have some impact, use a typewriter

My gallery   My freestuff


svdl ( ) posted Fri, 13 January 2006 at 11:34 PM · edited Fri, 13 January 2006 at 11:37 PM

file_318401.JPG

Shifting a bit down in the function graph: the object center must be subtracted from the position, and then normalized.

By taking the dot product of this normalized vector - which actually represents the vector pointing from the eco'ed object towards the "center object" - with the vector (-1,0,0) - that represents the default zero orientation for ecosystems - I get the cosine of the orientation angle.

Taking the arc cosine will give me the angle in radians, which then has to be mapped from the 0..3.1416 range to the 0..1 range.

Unfortunately, the arc cosine function only represents HALF a circle. The other half must be obtained by determining the relative y position - is the eco object in front of the center object, or is it at the back? If it's in front, we can keep the angle that the arc cosine function has calculated, if it's in the back, we'll have to take the opposite of the calculated angle.

That is what the right hand side of the graph is accomplishing. By taking the dot product of the normalized vector with (0,1,0) (alright, a Decomposer 3 using the Y component would achieve the same thing), I get the relative Y position.

Message edited on: 01/13/2006 23:37

The pen is mightier than the sword. But if you literally want to have some impact, use a typewriter

My gallery   My freestuff


svdl ( ) posted Fri, 13 January 2006 at 11:43 PM

file_318402.JPG

Further down the function graph. The left hand side displays the arc cosine function and the mapping, as explained in the previous post. The right hand side: the relative Y position is filtered by a Step 50% filter. A negative relative Y will return -1, a positive relative Y will return +1. The result of the filter is multiplied with the mapped arc cosine. This will result in the full range of -1 to +1 that the orientation node expects. The last part is the constant node to the left. This node will add a fixed offset to the eco object orientation, so that you can easily have your eco'ed objects face away from the center, or face towards the center, or mayby circling around (clockwise or counterclockwise, both are possible) around the center object.

The pen is mightier than the sword. But if you literally want to have some impact, use a typewriter

My gallery   My freestuff


svdl ( ) posted Fri, 13 January 2006 at 11:48 PM

file_318403.JPG

And this is the result. Don't mention composition or lighting or render quality, it was just a quickie for demo purposes. Hope this info is somewhat useful.

The pen is mightier than the sword. But if you literally want to have some impact, use a typewriter

My gallery   My freestuff


war2 ( ) posted Sat, 14 January 2006 at 6:26 AM

nice stuff svdl


Flak ( ) posted Sat, 14 January 2006 at 6:31 AM · edited Sat, 14 January 2006 at 6:33 AM

None of that makes any sense to me at all lol (new user - the math makes sense, but how it relates to what's in the Vue screen grabs is something I'll need to learn), but I still thank you for putting all that up as it shows what you can do with an ecosystem - if you need to do something really different it can be done with a bit of ingenuity.

Thanks :)

Message edited on: 01/14/2006 06:33

Dreams are just nightmares on prozac...
Digital WasteLanD


dburdick ( ) posted Sat, 14 January 2006 at 8:39 AM

Very clever SVDL. I wish Vue had a function that would allow you to capture the coordinates of any object in the scene. This way you could just compute the dot product between the target object and the eco object to adjust the eco object position. I have put in a request to eon for such a node which I plan to use in SkinVue for computing the dot product of the main light vector relative to a characters position. It's a no-brainer to do this and would dramatically reduce the complexity of your brilliant function graph.


goodrichm ( ) posted Sat, 14 January 2006 at 12:50 PM

This is awesome! Thanks so much for sharing...MG


CobraEye ( ) posted Sat, 14 January 2006 at 4:59 PM

Thank you for sharing. This is great work.


CobraEye ( ) posted Sat, 14 January 2006 at 6:02 PM · edited Sat, 14 January 2006 at 6:04 PM

The 1st problem I have is finding the filter step 50%function. How is this node created?

Message edited on: 01/14/2006 18:04


svdl ( ) posted Sat, 14 January 2006 at 6:55 PM

The filter step 50% is created by creating a filter node of type Filter. Then right-click the filter graph in the lower panel of the function editor, and choose "Load filter", now you can picl from a variety of predefined filters. Including step 50%

The pen is mightier than the sword. But if you literally want to have some impact, use a typewriter

My gallery   My freestuff


CobraEye ( ) posted Sat, 14 January 2006 at 10:15 PM

file_318404.JPG

That is awesome. I thank you so much. How cool.


Richmathews ( ) posted Mon, 16 January 2006 at 4:17 AM

ok, I have copied everything and understood little, but still can't get this to work. Have anyone got an example scene they could save and let me download and take a look at? very much appreciate it. Thank you all in advance Rich


CobraEye ( ) posted Mon, 16 January 2006 at 9:41 PM

I can email my file if you want. I have problems when doing this tutorial and using different objects for the eco-system. I don't know why.


svdl ( ) posted Mon, 16 January 2006 at 9:51 PM

Hmm, problems with different eco objects? The demo image (I can't upload the file, it contains copyrighted meshes) uses 2 different monster objects. The function assumes the eco object are facing south. There is no way that I know of to determine the main axis of an eco object, so I can't adapt the function to take this into account. You'll also have to make sure that "decay near foreign objects" is on; the function could run into severe trouble (division by zero errors) if an eco object would get placed exactly on the position of the center object.

The pen is mightier than the sword. But if you literally want to have some impact, use a typewriter

My gallery   My freestuff


alexgostin ( ) posted Sun, 11 June 2006 at 3:40 AM

Hi,

I'm trying to attach a zipped Vue 5 Infinite file for someone to test my function editor configuration (that's not working) but the system is not allowing me to send the file. Any ideas?

Regards,


nruddock ( ) posted Sun, 11 June 2006 at 7:37 AM · edited Sun, 11 June 2006 at 7:38 AM

Quote - I'm trying to attach a zipped Vue 5 Infinite file for someone to test my function editor configuration (that's not working) but the system is not allowing me to send the file.
Any ideas?

Change the extension to JPG, then the forum software will upload it
It will show as a broken image in the post, but will still be downloadable (using right click and Save As).
The maximum size is 200Kb.

Alternatively use one of the free file hosting sites.


Privacy Notice

This site uses cookies to deliver the best experience. Our own cookies make user accounts and other features possible. Third-party cookies are used to display relevant ads and to analyze how Renderosity is used. By using our site, you acknowledge that you have read and understood our Terms of Service, including our Cookie Policy and our Privacy Policy.