f3d file structure for fluids

233 views
Skip to first unread message

Kostadin Petkov

unread,
Sep 20, 2013, 4:27:20 AM9/20/13
to field...@googlegroups.com
Hello!

Currently I'm developing f3d import/export for my fluid sim engine.
I need some file structure specification that describes how to export/import velocity/temperature/(and so on) values in a standard way, understandable for other simulators.

Regards,

Kostadin Petkov

Magnus Wrenninge

unread,
Sep 23, 2013, 1:14:20 AM9/23/13
to field...@googlegroups.com
I'm sure others can pitch in with their experience, but in general it's just a matter of putting the appropriate 'attribute' string on each field. The 'name' string can be set to whatever is appropriate. For example:

root/
  liquid_solver : v (MACField)
  liquid_solver : levelset (SparseField)

or

root/
  gas_solver : v (MACField)
  gas_solver : density (SparseField)

When you read an .f3d file from disk, you could then use 

  Field<float>::Vec scalars = in.readScalarLayers<float>();
  BOOST_FOREACH (Field<float>::Ptr i, scalars) {
    if (i->attribute == "density") {
      m_density = i;
    }
    // etc...
  }
  Field<Vec3f>::Vec vectors = in.readVectorLayers<float>();
  BOOST_FOREACH (Field<Vec3f>::Ptr i, vectors) {
    if (i->attribute == "v") {
      m_velocity = i;
    } 
    // etc...
  }

Hope that helps.



--
You received this message because you are subscribed to the Google Groups "Field3D dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to field3d-dev...@googlegroups.com.
To post to this group, send email to field...@googlegroups.com.
Visit this group at http://groups.google.com/group/field3d-dev.
For more options, visit https://groups.google.com/groups/opt_out.

Kostadin Petkov

unread,
Sep 23, 2013, 3:31:08 AM9/23/13
to field...@googlegroups.com
Well it is something, thanks a lot!
I guess I have to reverse eng. some files and figure out them myself. If someone has papers on this it would be great!

Regards, 
Kostadin

Sosh Mirsepassi

unread,
Sep 23, 2013, 2:26:34 PM9/23/13
to field...@googlegroups.com
You can also look at the maya export plugin under:  https://github.com/imageworks/Field3D/tree/master/contrib

If you have access to houdini distribution you can also find a import/export code under their "toolkit/samples/field3d"

-Sosh


--

Kostadin Petkov

unread,
Sep 24, 2013, 4:39:17 AM9/24/13
to field...@googlegroups.com
Im currently trying to import a simple frame exported with FumeFX without any success.
It seems like they are using some custom filters.

In : 
Field<float>::Vec inpLayers = in.readScalarLayers<float>();

that later calls H5Z_pipeline i got issue_error equal to true
H5Z_pipeline(...) {
....
 if(pline->filter[idx].name)
                        HGOTO_ERROR(H5E_PLINE, H5E_READERROR, FAIL, "required filter '%s' is not registered", pline->filter[idx].name)
with filter[idx]._name == "ffxrle" (filter number is 256)
}

according to : http://www.hdfgroup.org/HDF5/doc/H5.user/Filters.html  it seems like they are making some own customization..

I'm using hdf5 v1_8_11 and trunk clone for field3d lib, both libs are build with MD x64 multibyte charset.



Kostadin Petkov

unread,
Sep 24, 2013, 4:43:04 AM9/24/13
to field...@googlegroups.com
Excuse me for double posting. Thanks for the link! Contains good information that I'll use later.

Kostadin Petkov

unread,
Sep 24, 2013, 5:25:29 AM9/24/13
to field...@googlegroups.com
My bad here. filter id is 641

Oleg Bliznuk

unread,
Dec 9, 2013, 1:59:12 PM12/9/13
to field...@googlegroups.com
Hi Kostadin,
Have you read ffx cache data successfully ? Is it even possible ? Sorry, i am not familiar with hdf5 stuff, and dont know how exactly these custom filters act, so if the reading ffx data is possible, I will continue  my investigation :)
regards,
Oleg

Lisur

unread,
Dec 10, 2013, 2:01:16 AM12/10/13
to field...@googlegroups.com
Hi Oleg,
have you noticed that latest release of FumeFX for Maya has option to use standard Deflate (gzip) filter in Field3D?

Regards

Raiyan Haq

unread,
Aug 7, 2014, 6:47:30 PM8/7/14
to field...@googlegroups.com
How would one go about using this? I checked the dial but the file output is the same for me?
Reply all
Reply to author
Forward
0 new messages