CustomOceanSpray RF5 compatible?

Discussions about the use of Realflow 5
kslay
Posts: 115
Joined: Fri Oct 08, 2010 8:09 am

CustomOceanSpray RF5 compatible?

Postby kslay » Tue Aug 02, 2011 8:05 am

hey mate, thanks for pasting the code.

I don't know but i can't get it to work.
Maybe i have to read more about the script usage and how to load them
inside Realflow.


Installation:
1. Copy script file (.rfs) wherever You want
2. Open Realflow with Your scene file
3. Open menu scripts / Add
4. In Add Script window, Name field enter “CustomOceanSpray”
5. Choose Spray_Batch.rfs in script field
6. Choose Spray_icon.png for Icon
7. Press “New Folder” (bottom left) and create folder for scripts
8. Choose created Folder and press OK
9. Open Even Script (Layout/EventScript of press F11), paste(replace) text from Spray_event.rtf


This is the "manual" for installing the script, but it seems that it was created for
RF4. And there is also a RTF and an RFS file. It's a bit confusing in my view.
Dual Xeon (Sixcore) 2,67GHz | 24GB RAM | Quadro 4000

I'm drinking to drown my problems, but these goddamn bastards can swim!


User avatar
scubedio
Posts: 97
Joined: Thu Jan 11, 2007 5:17 pm
Location: mumbai

CustomOceanSpray RF5 compatible?

Postby scubedio » Tue Aug 02, 2011 8:24 am

HI..... juz open a new file..

1. Load ur OBJ file(ocean surface or custom wave object)
2. Create realwave
3. In type change to custom and select ur custom wave object..
4. Click realwave and add fractal wave or any other
5. Open the event script editor(ctl+f2)..... and paste the script below
Function: onSimulationFrame ... it will look like

#--------------------------------------------------
# Function: onSimulationFrame
#--------------------------------------------------
def onSimulationFrame():
import random
sea = scene.getRealwave()
null = scene.getObject("null")
emm = scene.getEmitter("Type ur Emmiter Name")
seap = sea.getVertices()
nullY = null.getParameter("Position").getY()
randomization = 0.1
for vert in seap:
VertPosY = vert.getPosition().getY()
if (VertPosY>= nullY):
VertPos = vert.getPosition()
VertPosX = vert.getPosition().getX() + random.uniform(-randomization, randomization)
VertPosY = vert.getPosition().getY() + random.uniform(randomization, randomization)
VertPosZ = vert.getPosition().getZ() + random.uniform(-randomization, randomization)
VertVelX= vert.getVelocity().getX()
VertVelY = vert.getVelocity().getY()
VertVelZ = vert.getVelocity().getZ()
NewPos = Vector.new(VertPosX, VertPosY, VertPosZ)
NewVel = Vector.new(VertVelX, VertVelY, VertVelZ)
emm.addParticle(NewPos,NewVel)
pass

6. Add one emitter(any).... set speed to 0...
7. Create one null object and name it to null....this y position is the height whr foam will generate....
8.Copy the name of the emitter and paste in "emm = scene.getEmitter("Type ur Emmiter Name")"
9.Try to play with the randomization value , velocity of vert and fields.
Rgds
Scubedio

https://vimeo.com/scubedio

kslay
Posts: 115
Joined: Fri Oct 08, 2010 8:09 am

CustomOceanSpray RF5 compatible?

Postby kslay » Tue Aug 02, 2011 8:49 am

Thanks for your patient mate.

Now it seems to work!

But still, i have one big problem.
The scene crashes anytime when i start the sim.

Is it possible that it is because of the dependeancy of the realwave node and
my other "ocean object " node?

When i delete the realwave node from the global link then it's not crashing.
But foam will be generated everywhere on the surface and not just there
where my "sphere" penetrated the "ocean surface"
Dual Xeon (Sixcore) 2,67GHz | 24GB RAM | Quadro 4000

I'm drinking to drown my problems, but these goddamn bastards can swim!

kslay
Posts: 115
Joined: Fri Oct 08, 2010 8:09 am

CustomOceanSpray RF5 compatible?

Postby kslay » Tue Aug 02, 2011 8:54 am

hm, maybe it's my misunderstanding of the script.

Imagine you have an obj ocean surface object.
It's looking a bit choppy - ( so it's not flat )

Now i want to drive a simple sphere through the object and of course
creating particles where the sphere get in contact with it.

Would that be possible with that script?
Dual Xeon (Sixcore) 2,67GHz | 24GB RAM | Quadro 4000

I'm drinking to drown my problems, but these goddamn bastards can swim!

kslay
Posts: 115
Joined: Fri Oct 08, 2010 8:09 am

CustomOceanSpray RF5 compatible?

Postby kslay » Tue Aug 02, 2011 8:58 am

As you have perfectly explained, it will create particles at a specific height (null.y)

And i have also recognized that the object is not bulging when it get in contact with
the sphere. Because of the crash, when the realwave node and the "ocean object node
are in the global links. Therefore it will not create particles...


Here the warning

Object ocean is already interacting with the RealWave.
Using this object as a custom mesh will cause performance and stability
problems. We recommend to destroy the interaction by removing thel link.
Dual Xeon (Sixcore) 2,67GHz | 24GB RAM | Quadro 4000

I'm drinking to drown my problems, but these goddamn bastards can swim!

User avatar
scubedio
Posts: 97
Joined: Thu Jan 11, 2007 5:17 pm
Location: mumbai

CustomOceanSpray RF5 compatible?

Postby scubedio » Wed Aug 03, 2011 6:24 am

Hi dude...i think u understand the script now..... any way for further help. y can't u post a video,wat u have done untill now?????? it will b easy to get us wats ur exact problem is....

Ya its possible to create particles while colliding.......as u said remove the realwave from global.....and make sure to check value of "upward force" of the emitter....it may crash ur file....
Rgds
Scubedio

https://vimeo.com/scubedio

kslay
Posts: 115
Joined: Fri Oct 08, 2010 8:09 am

CustomOceanSpray RF5 compatible?

Postby kslay » Wed Aug 03, 2011 5:31 pm

Hey mate,

sure, i will post tomorrow a video to better explain my problem.

Right now i'm not in front of my workstation.
But as explained before, my problem is simple.

I have an animated ocean surface imported as an sd file from
dreamscape. And now, i want my boat to drive through the ocean surface.

So the first problem is, i have recognized that realwave is not able to
read the custom animated ocean surface. It seems that only the first frame is taken.
That's of course very odd, because i don't want to use realwave wave generators.
Is there any possibility to read the animated ocean surface with a workaround?
Have searched the whole forum but did not found anything.

The second problem is that my boat will not create colliding particles because
for me it seems that only particles will be created where the wave height is high enough. ( null.Y height )




kslay
Dual Xeon (Sixcore) 2,67GHz | 24GB RAM | Quadro 4000

I'm drinking to drown my problems, but these goddamn bastards can swim!

kslay
Posts: 115
Joined: Fri Oct 08, 2010 8:09 am

CustomOceanSpray RF5 compatible?

Postby kslay » Thu Aug 04, 2011 7:42 am

okay gotta correct me. Of course i have to use an object splash emtter to create
particles. First i thought that the script will also creat them, my fault.

But still the main problem exists.
Please guys, please tell me that it is possible to use an animated sd object as
a custom realwave object. Otherwise i don't get the point of importing
an animated ocean surface into Realflow ( from Dreamscape for example )

kslay
Dual Xeon (Sixcore) 2,67GHz | 24GB RAM | Quadro 4000

I'm drinking to drown my problems, but these goddamn bastards can swim!

User avatar
bitSeq
Posts: 1044
Joined: Thu Jul 10, 2008 9:48 am
Location: UK - Stuart Armiger
Contact:

CustomOceanSpray RF5 compatible?

Postby bitSeq » Thu Aug 04, 2011 8:36 am

You cant use a custom realwave on an animated object.

The only way to get that info into the realwave would be to use a displacement map on it, you can find a script to do that.

Is there a reason that you are not using the wave functions inside realflow?

kslay
Posts: 115
Joined: Fri Oct 08, 2010 8:09 am

CustomOceanSpray RF5 compatible?

Postby kslay » Thu Aug 04, 2011 1:22 pm

Thanks for dropping in buddy.

Also thanks for the hint with the displacement script.
Gotta check it out and see how far i can get.

Yeah, there is a good reason for that.

http://imageshack.us/clip/my-videos/62/h0o.mp4/

This is my ocean test so far with dreamscape.
For me it's also important to get a good looking foam on that ocean.
And in my view, achieving that is MUCH easier in dreamscape than in
realflow ( talking about the foam only )

So i thought, if i have finished the rough look of the ocean and of the foam
then i can import the sd file and get the final splashes with realflow.

What do you think about the workflow?

kslay
Dual Xeon (Sixcore) 2,67GHz | 24GB RAM | Quadro 4000

I'm drinking to drown my problems, but these goddamn bastards can swim!


Return to “Realflow 5”

Who is online

Users browsing this forum: No registered users and 1 guest