PDA

View Full Version : Need HELP adding to an existing script


IvanB
10-01-2006, 12:15 PM
Hi there...
I'am using the "floating Ecosystem" script and all is good...However the objects only move up an down along the Z axis no matter whats happening under them...I would like for the objects to move in all directions following the object below (in this case an ocean)..

In the actual script, is states:

# So, as you now have a starting point, you can try to modify this script!
# Add turbulence to the instances, try to make them move, tilt them so they follow the surface of the water...

If you havn't seen the script, this where it can be found on your pc:

C:\Program Files\e-on software\Vue 5 Infinite\Python\Scripts\EcoSystem

Can someone help to explain how to do this, as I have no idea about python scripts..

Thanks
Ivan.

videodv
10-01-2006, 12:45 PM
Going to be looking at this myself shortly.

As stated in the documentation.
SetInstancePosition ( int nIndex, float x = 0, float y = 0, float z = 0)

So in the example the line - Eco.SetInstancePosition(i, pos[0], pos[1], altitude-offset) - I think if you change the pos(0) and/or pos(1) settings it should move the eco instance in the x and y directions?

Something like - Eco.SetInstancePosition(i, movex, movey, altitude)

That will be my first look at changing the script and see how it gos.

videodv.

IvanB
10-02-2006, 04:37 AM
Hey videodv..
Thanks!!!

I had a reply at the cornucopia forum ( I posted it everywhere )...Check it out...

http://www.cornucopia3d.com/forum/viewtopic.php?t=2819


Before you try it yourself..I made a mistake..I still want the object to stay in the same position, moving up and down along z..But I want it to ROTATE x,y, staying perpendicular to the (ocean)

Ivan.

BUZZFX
10-03-2006, 11:20 PM
Ivan,

Ivan I was just wondering if you have had any success with this yet. I am also tracking a forum on this same question so hopefully one of us will find a solution. Please keep me posted.

IvanB
10-04-2006, 02:02 AM
Hey Paint Guy,

No luck yet, but I can make an object move across the water...We need the object to rotate for it to look any good...Heres an ROUGH example.

http://esnips.com/doc/0b6e6067-4d22-4e7a-a4cc-0ad8f04c2b4b/Boat_Float.mov


Ivan.

videodv
10-04-2006, 08:37 PM
I have been looking at this too and I am a small amount of luck as well. I have tried the rotation function as shown but at the moment it seems to allways go in reverse! I am using this on a terrain instead of water as I wish to get some rocks rolling down a mountain!

for i in range(0, Eco.GetInstanceCount()):

pos = Eco.GetInstancePosition(i)

altitude = GetAltitudeOnEcosystemAt(Eco,pos[0],pos[1])

Eco.SetInstancePosition(i, pos[0], pos[1]-1, altitude)

I added this line after the above
Eco.SetInstanceRotation (i , pos[0], pos[1]-1, altitude)

The pos[1]-1 will rotate in the y direction.

Will be doing some more testing tomorrow.

IvanB
10-05-2006, 01:11 AM
Hey Video
Check this out....WOW!

http://www.cornucopia3d.com/forum/viewtopic.php?t=2819

What the F!#$...

Ivan.

videodv
10-05-2006, 07:59 AM
Wow indeed IvanB

Looks like a good read coming up and a bit more head scratching!!!

Ok I have set some time aside for this today so off to start the testing.

videodv.

BUZZFX
10-06-2006, 03:24 AM
Hey Paint Guy,

No luck yet, but I can make an object move across the water...We need the object to rotate for it to look any good...Heres an ROUGH example.

http://esnips.com/doc/0b6e6067-4d22-4e7a-a4cc-0ad8f04c2b4b/Boat_Float.mov


Ivan.

Very nice movie Ivan,

Looks like a lot of people would like a script like this. I don't know Python, but have a friend who does and he has the script. I hope something come out of this for all of us!

IvanB
10-06-2006, 09:23 AM
Thanks Paint guy,

The legends in the cornucopia forum are working HARD to get this happening..I think!..Not really sure, cos I dont think thats english there speaking...hehe, theres all sorts of script talk going on, there an awsome bunch!...I got a feeling they will solve it...
If you havn't been to the thread, check it out...Its crazy!


http://www.cornucopia3d.com/forum/viewtopic.php?t=2819

I have an example with a ship rolling and bobbing (from the new script John made)..looks ok, but needs a bit more tweaking. When it looks good enough I'll post it.

Ivan.

videodv
10-06-2006, 09:41 AM
After my long and failed testing yesterday I think I shall wait for the outcome from the experts lol.

At least I shall have a better understanding of where to go from here after seeing what these very talented people are doing.

videodv.

IvanB
10-08-2006, 02:07 AM
Hi all,

Thanks to ALL the talented script writers in the cornucopia forum. You can DL the finished working script.

http://www.cornucopia3d.com/forum/viewtopic.php?t=2819

Ivan.

CGTalk Moderation
10-08-2006, 02:07 AM
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.