Introduction to Maya - Modeling Fundamentals Vol 1
This course will look at the fundamentals of modeling in Maya with an emphasis on creating good topology. We'll look at what makes a good model in Maya and why objects are modeled in the way they are.
# 1 09-07-2003 , 10:01 AM
Registered User
Join Date: Jul 2003
Posts: 5

Fluid initial state

Hi people,

This is my first post at simplymaya but I've been here a while trying to grasp the spirit of the forum.
I'm really a mechanical engineer who's taking the step towards cg after we bought Maya for some presentations. Aggressive pricing nowadays makes this a very priceworthy package even if you are not into organic modelling and animation. After playing around with it some after making my presentations I'm really hooked. So I'm still a newbie at maya but I've been working in 3D for 5-6 years.

Anyways, I'm having a problem in Fluid effects. What I'm trying to achieve is a initial state in a fluid which should be like a bitmap(i.e. a logo) I have.
Maya ships with an example of this (or is it available for download at their website, i don't remember) but it's a .mel script that you mmb drag onto your container.

Now .mel is the one (major) area in maya in which I have yet to poke around. I tried examining the .mel file and it contained some values and a reference to a .mci (i think) file. I have no idea what kind of fileformat this is. Would this be the only approach(mel) to do it or are there others?

I'm using a 2D container with heightmap turned on, and I'm on Maya5.0

Could someone explain how to do this, I'd be very grateful.

Thanks, CI

# 2 09-07-2003 , 02:59 PM
ragecgi's Avatar
Registered User
Join Date: Sep 2002
Location: Minnesota, USA
Posts: 3,709
Hope this helps youuser added image
From the docs:

Maya Fluid Effects Playing Dynamic Fluid Simulations
Setting the initial state of a fluid

The state of a fluid is the collection of its grid property values (the values in the Density, Velocity, Temperature, Fuel, Color, and Texture Coordinate grids). The state of an uncached dynamic fluid in any frame other than the first is based on its state in the prior frame. Maya calculates dynamic fluid effects sequentially starting at the first frame.

The grid property values defined in a fluid container at the first frame of a simulation describe the fluid's initial state. You can play a simulation up to any frame, then use the current state at that frame as the initial state for the fluid.

For example, suppose you have an empty fluid container but you want the scene to start with fluid already in it. You could add a fluid emitter to the container, play and stop the simulation at a frame with the desired emitted fluid, and then set the emitted fluid values as the initial state. When you go to the start frame of the simulation and play, the fluid will start with the grid property values that are stored in its initial state.

If the current time changes to any frame before the start frame for the fluid simulation, Maya reads the initial state. For example, if you set your initial state when the fluid start frame is 1, and then change the fluid start frame to frame 10, Maya reads the initial state at frame 1, but does not start the simulation until frame 10. If there is no initial state, Maya clears the contents of the container.

When you paint fluid property values into a grid, you must set the initial state of the fluid. Otherwise, when you play the simulation, the initial values you paint will be lost when you go back to the first frame. For information on painting fluid values, see Painting fluid properties into grids.

To set a fluid's current dynamic grid property values as the initial state:

1. Add the property values to the fluid container.
See Adding properties to fluid containers.
2. Play and stop the simulation at the frame with the fluid property values you want to set (save) as the initial state, if necessary.
3. Select the fluid container.
4. Select Fluid Effects > Set Initial State.

Maya creates a hidden initial state cache node in the Temp directory. When you save the scene, Maya creates an initial state cache node and a disk cache file and stores the file in the project's data directory.

The initial state cache file is named filename_fluidShape.mcfi.
The node is named initialState_fluidShape.

To delete the initial state of a fluid:

1. Select the fluid container.
2. Select Fluid Effects > Clear Initial State.

Maya deletes the initialState_fluidShape node but does not delete the initial state cache file (in case it is being used by another scene). When you go to the start of the simulation, the contents of the container will be empty.



Israel "Izzy" Long
Motion and Title Design for Broadcast-Film-DS
izzylong.com
# 3 09-07-2003 , 03:00 PM
ragecgi's Avatar
Registered User
Join Date: Sep 2002
Location: Minnesota, USA
Posts: 3,709
PS, I have Maya 5 at home, and I'll double-check the v5 docs tonight to see if anything has changed from 4.5 regarding this,
and if so, I'll post it here for youuser added image


Israel "Izzy" Long
Motion and Title Design for Broadcast-Film-DS
izzylong.com
# 4 09-07-2003 , 07:59 PM
Registered User
Join Date: Jul 2003
Posts: 5
Hey ragecgi,

and thanks for you fast reply. The v5 docs are pretty much identical, and I read them before I posted.
Sorry to say, this doesn't help me though. What I'm looking for is to apply a bitmap as the heightfield(or density, same thing) of a fluid in an initial state, but I just have no idea where or how to do that.
One could of course paint the fluid but I'd prefer to do that i photoshop or so.

Any other ideas for this?

Thanks, CI


:::::CauseIsayso:::::

'I for one care less for them'


Last edited by CauseIsayso; 09-07-2003 at 08:02 PM.
# 5 09-07-2003 , 08:47 PM
ragecgi's Avatar
Registered User
Join Date: Sep 2002
Location: Minnesota, USA
Posts: 3,709
Well, not sure if you saw this or not, (sorry, but I gotta ask anywayzuser added image ) but would you be willing to add a predefined initial state to another fluid container?

i.e, get the initial state set-up the way you like, then copy that to another fluid that you have tweaked a little bit already?

Say you want to use existing grid properties as the basis for other fluid effects (for example, a company logo, YOUR BITMAP, a spiral of velocity, a cloud etc.), you can save those grid property values, and later add them to OTHER existing fluid containers in a separate scene containg another fluid.

Maya includes an assortment of predefined initial states that you can use as examples. For information on creating your own predefined initial states, see Saving the current state of a fluid.

To add a predefined initial state to a fluid container:

1. Select the fluid container.
2. Select Fluid Effects > Add/Edit Contents > Initial States. The Visor opens to the Fluid Initial States tab.
3. Click the folder containing the initial state you want to add to the container. If the fluid is a 2D fluid, select the 2D subfolder. If the fluid is a 3D fluid, select the 3D subfolder.
4. You can only add initial states created in 2D containers to 2D containers. Similarly you can only add initial states created in 3D containers to 3D containers.

5. With the middle mouse button, drag the preset icon from Visor onto the selected fluid container. Any grid values already in the container are replaced with the initial state values.

If the resolution of your container is different from the resolution of the container used to create the initial state, the resolution of your container changes to the resolution of the initial state container, and once the values are in place, changes back to your original resolution.


Lemme know if I'm still missing the point of what you are trying to douser added image

( sry, I can be dense sometimes, hehe... just ask Kevinuser added image )


Israel "Izzy" Long
Motion and Title Design for Broadcast-Film-DS
izzylong.com
# 6 09-07-2003 , 08:57 PM
Registered User
Join Date: Jul 2003
Posts: 5
ragecgi,

I try to read the manual or docs as much as possible before posting to not risk being flamed user added image

I found exactly what I was looking for when I searched the threads over at CGTalk: https://www.cgtalk.com/showthread.php...ighlight=fluid

The thing I missed out was 'Attribute Map' tab.

What you described is also exactly what I wanted, only that it showed how to import a preset which is actually a melscript which points to a prior made cache. What I wanted to do was a brand new image. You cleared it for me how to save the initial state, and that works super.

Thanks alot for your help and time, I appreciate it, /CI

# 7 11-07-2003 , 02:40 PM
ragecgi's Avatar
Registered User
Join Date: Sep 2002
Location: Minnesota, USA
Posts: 3,709
No prob dude! Glad to help out.

..yeah, CGTalk has been around a LOT longer than Sm, and as such, has had a LOT more traffic-time to build-up a database of help. (We are working on thatuser added image

I'm glad you found what you were looking for, and I am REALLY happy that you are one of us few that drudge through the docs firstuser added image

PS, any chance of telling us in detail for the newbees what happened, and how you fixed it?

Take your time m8.

Thanks again!


Israel "Izzy" Long
Motion and Title Design for Broadcast-Film-DS
izzylong.com
# 8 11-07-2003 , 08:47 PM
BabyDuck's Avatar
Subscriber
Join Date: Nov 2002
Location: USA
Posts: 1,170

Originally posted by CauseIsayso
I try to read the manual or docs as much as possible before posting to not risk being flamed user added image

you would not get flamed. and you seam to be of the rare species that knows about the F1 key. whenever something is easy to find in the docs - and i find out, then i still post a nice reply. if the doc is better at describing it, i just refer to the doc. and usually a nice reply ala - "you can learn about in the docs, and has a search function built in ..." :p

# 9 11-07-2003 , 09:14 PM
Registered User
Join Date: Jul 2003
Posts: 5
Couldn't agree more with you guys,

I would say that people who asks things that obviously is stated in the docs are irritating but not nearly as annoying as people going 'RTFM!!!' or start behaving childish in other ways. If those people would just ignore the posts instead of flaming it would be a better world.

and cgtalk is good, lots of thread to search but I really like the spirit here at simplymaya and this is where I intend to hang around mostly. I really like that newbies get so much attention too here.

/CI


:::::CauseIsayso:::::

'I for one care less for them'

# 10 11-07-2003 , 11:11 PM
ragecgi's Avatar
Registered User
Join Date: Sep 2002
Location: Minnesota, USA
Posts: 3,709
I/we all appreciate having you here as well CauseIsaysouser added image


Israel "Izzy" Long
Motion and Title Design for Broadcast-Film-DS
izzylong.com
Posting Rules Forum Rules
You may not post new threads | You may not post replies | You may not post attachments | You may not edit your posts | BB code is On | Smilies are On | [IMG] code is On | HTML code is Off

Similar Threads