Community
Maya Dynamics
Welcome to Autodesk’s Maya Forums. Share your knowledge, ask questions, and explore popular Maya dynamics topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Can't find Bifrost > Convert User Cache to PRT or bif2prt.bat

29 REPLIES 29
Reply
Message 1 of 30
gnarlog
2232 Views, 29 Replies

Can't find Bifrost > Convert User Cache to PRT or bif2prt.bat

Hi there,

 

I'm new to bifrost, so I don't really know what I'm doing, but in the docs there is mention of the bifrost option:

 

Bifrost > Convert User Cache to PRT

 

and a batch file called

 

bif2prt.bat

 

Both of them are supposed to convert .bif files to .prt

 

There is no Convert User Cache to PRT in my bifrost menu, and there is no 

bif2prt.bat anywhere on my system. Am I missing something?

 

Also, in the compute and cache do disk options, it doesn't matter what cache format I select, it always writes .bif files.

 

Anyone know what's going on with this?

 

Thanks,

 

Matt

 

29 REPLIES 29
Message 2 of 30
thebenp
in reply to: gnarlog

Hey Matt,
Yes this is unnecessarily confusing and the info available is seriously lacking.
As far as I can understand it, this functionality is ONLY available to Subscription users and ONLY available in Maya 2015 Extension 1. Maybe someone can correct me on this.
There is a little note in the help that mentions "Applies to Maya 2015" and that is the only hint I found and could follow to the Extension 1 information.
I guess they are saving features like this for the "Extension" for 2016 to get more people on subscription.

 

EDIT:

Hey here we go, found it for Maya 2016:

 

http://knowledge.autodesk.com/support/maya/learn-explore/caas/CloudHelp/cloudhelp/2016/ENU/Maya/file...

Message 3 of 30
gnarlog
in reply to: thebenp

Aha! So I'm not crazy. Thank you!

Message 4 of 30
syracoj
in reply to: gnarlog

hmmm...

 

perhaps our docs need to be updated.

Which version of Maya are you guys on?

 

try this.

 

Go to your MayaInstallLocation

Im on mac so mine is:

/Applications/Autodesk/maya2016/

on windows its possibly

C:/Program Files/Autodesk/maya2016

 

in there, there should be a plug-ins directory

in there there should be a bifrost directory. Go in there and follow the path below.

 

(again, on my mac)

/Applications/Autodesk/maya2016/plug-ins/bifrost/devkit/bif2prt/bin/

in there the bif2prt application should reside.

 

DO YOU GUYS HAVE IT ?

 

to use it...

 

cd to that directory then execute with:

Windows since it uses .exe's

./bif2prt.exe -f theBifPointCacheFile.bif -o prtFileNameYouWishToGive.prt

 

Mac/Linux:

./bif2prt -f theBifPointCacheFile.bif -o prtFileNameYouWishToGive.prt

 

you can also now specify the channels you wish to output:

ie (to convert to prt the position, velocity, and vorticity channels):

bif2prt.exe -pos -vel -vor -f theBifPointCacheFile.bif -o prtFileNameYouWishToGive.prt

 

Let us know how this works out.

 

 

Message 5 of 30
thebenp
in reply to: syracoj

Hey syracoj,

Thanks for the reply.

If you read the edit I made to the previous post we did indeed find the script.

It seems to work fine, however the -pattern flag that allows one to convert sequences seems to be removed from the script.

If you reference the Maya 2015 help they mention this flag, and in the 2016 help it is removed.

I know this isn't exactly a fully supported feature, but is there a reason this happened or a way to get that functionality back?

very large caches are going to be a pain to convert. Thanks!

 

Best,

Ben

Message 6 of 30
syracoj
in reply to: thebenp

have you tried the standard wild card * without the -pattern flag name? nameOfBifFile_point_*

Or does it do it automagically? Sees the first one nameOfBifFile_point_001.bif and then from this one on, converts them all?

 

Will ask the designer if there was a reason.

 

I'll also try on my side later on today if I can.

Message 7 of 30
thebenp
in reply to: syracoj

Much appreciated. Have tried the wildcard * with and without the -pattern flag. I am not sure how it knows the frame padding or if it just assumes the default format that bifrost writes.
Message 8 of 30
syracoj
in reply to: thebenp

so that didnt work? Or it did work?

Message 9 of 30
agraham
in reply to: syracoj

I think we removed the -pattern flag for a number of reasons:

- it was non-standard syntax
- there are so many other built-in ways of handling loops that we felt we shouldn't add to them

If you want to iterate over a sequence of files, I suggest you learn how to do it in a 'for' loop. Any shell can do this easily. For example, in my bash shell, I can do:

for FILE in "nameOfBifFile.*.bif"; do
    bif2prt -f $FILE
done

Easy, huh?
Adrian

--
Adrian Graham
Principal User Experience Designer
ME Film and TV Solutions
Autodesk
Message 10 of 30
thebenp
in reply to: agraham

Thanks for the clear explanation and quick response guys.

 

Adrian, yes, creating a script like that is quite easy, and I already have a batch script going (on Windows here) that works fine.

Just was curious. 

 

Message 11 of 30
gnarlog
in reply to: thebenp

Hey guys,

 

 

I just noticed these posts. So... I am using an eval copy of 2015. There is definitely no bif2prt in the distribution I have. Is it possible to get an eval of 2016?

 

Thanks,

 

Matt

Message 12 of 30
syracoj
in reply to: gnarlog
Message 13 of 30
thebenp
in reply to: agraham

Okay, one more question about this bif2prt script.

 

I am attempting to get the entire sim into PRT format for rendering.

That means both foam and liquid point caches.

 

Unfortunately, the foam point cache is breaking on conversion and appears to be duplicating points along different axes.

One axis seems to be the correct particle data, and then it appears to be scaled and duplicated twice along two other axes.

 

The liquid point cache works fine, except is also easy to break in a similar way.

An easy way to break it is to exclude the 'vorticity' channel by using the '-pos -den -vel' flags, leaving out the '-vor' channel, when you run the bif2prt script.

 

As long as the '-vor' channel is included the liquid points convert fine.

 

Not having time to dig into the project .cpp files in order to rebuild the project, can anyone else confirm that this is happening?

 

TLDR: bifrost liquid point caches convert to prt fine, bifrost foam caches do not.

It appears to be because the foam is missing a vorticity channel.

 

As always, thanks.

 

-Ben

Message 14 of 30
agraham
in reply to: thebenp

Hrmph, that's interesting that the foam caches aren't converting.

I've always been able to convert foam caches with no flags at all. Does that work for you? BTW, which version of Maya are you using?
--
Adrian Graham
Principal User Experience Designer
ME Film and TV Solutions
Autodesk
Message 15 of 30
thebenp
in reply to: agraham

Thanks for the reply Adrian.

I am on Maya 2016, Windows 7 x64.

No flags gives the same result: works for liquid, foam appears broken.

Converting liquid points and foam, each with no flags, to PRT and printing the channel info using partview from the partio library gives me this result for the resulting foam PRT:

 

 

Number of particles:  23292
Type        Count     Name
----        -----     ----
FLOAT       1         density
VECTOR      3         position
VECTOR      3         velocity
particle 0 data 787.769 -8.97496 190.465
particle 1 data 0.536989 0.193347 786.706
particle 2 data 0.0825853 -2.02621 0.569201
particle 3 data -9.54116 198.454 -0.0168452
particle 4 data 0.466916 783.453 -9.24435
particle 5 data -1.99438 0.617 0.417929
particle 6 data 212.333 0.0815542 -1.93558
particle 7 data 778.338 -9.68727 213.22
particle 8 data 0.641619 0.425659 780.608
particle 9 data 0.0372044 -1.78641 0.609824

And this result for the liquid resulting PRT:

 

Number of particles:  141786
Type        Count     Name
----        -----     ----
FLOAT       1         density
FLOAT       1         droplet
FLOAT       1         expansionRate
VECTOR      3         position
FLOAT       1         stictionBandwidth
FLOAT       1         stictionStrength
VECTOR      3         velocity
FLOAT       1         vorticity
particle 0 data 710.848 -15.1651 412.09
particle 1 data 703.192 -12.0251 410.394
particle 2 data 712.435 -20.166 409.252
particle 3 data 714.461 -18.4246 391.332
particle 4 data 710.843 -17.9188 402.867
particle 5 data 714.106 -26.8491 406.452
particle 6 data 712.153 -16.2461 409.669
particle 7 data 712.223 -22.1335 395.968
particle 8 data 704.657 -13.6135 413.255
particle 9 data 712.02 -17.317 408.888

 

I am not totally sure but it looks as though the foam values aren't as consistent as the liquid.

Thanks in advance!

 

Best,

Ben

 

 

Message 16 of 30
agraham
in reply to: thebenp

Foam particles are much different from liquid particles, as there's emission and culling happening all the time, every frame.

Also, this data is correct, in that foam particles only have position, velocity and density. They're of a different simulation model than liquid.

Can you send along a single frame of .bif for each liquid and foam? I can test render after a .prt conversion. Or do you need to render a sequence of frames to see the issue?
--
Adrian Graham
Principal User Experience Designer
ME Film and TV Solutions
Autodesk
Message 17 of 30
thebenp
in reply to: agraham

Hey Adrian,
Due to security here I am not able to provide any files until I am home later tonight.
However, I just created a repro scene that I think you could whip up in about 3 minutes if you have the time...

Create a sphere, size 5, 20 subdivisions.
Translate 10 units up in Y
Create a 8x8x8 cube, leave at the origin.
Create a bifrost Liquid, using the sphere as the emitter.
Set the cube to be a collider.
Enable Foam on the bifrost container

In the Foam settings:
Set Min Liquid Speed to 0.4
Min Liquid Churn: 0.3
Min Liquid Curvature: 0.3

The rest of the defaults should be fine.

Create a user cache to around frame 40 of that scene and convert liquid point bif and foam point bif to PRT using bif2prt, no flags. You should see the liquid result is fine and the foam is not.

Sorry I am unable to upload this scene, let me know if you want to wait until I can. Thanks!

Best,
Ben

Message 18 of 30
agraham
in reply to: thebenp

Thanks for the easy setup. I did this in Maya 2016 on Win7 and ran out a 40-frame sequence. Unfortunately, all looks fine to me. See attached Quicktime. I read the resulting .prt's into Maya using Krakatoa's PRT reader. It looks fine to me.

 

When you were saying "scaled twice along axis", did you mean in the render? I assume you have access to a PRT viewer (ie Krakatoa in Maya)? If so, do you see the same issues in the viewport as you do in the render?

--
Adrian Graham
Principal User Experience Designer
ME Film and TV Solutions
Autodesk
Message 19 of 30
thebenp
in reply to: agraham

Thanks for taking the time to look into this, really appreciate it.

I see that the Krakatoa viewer is dealing with the PRTs just fine, so I will look into the viewer that I was using.

I will do a little more exploration and report back.

Message 20 of 30
agraham
in reply to: thebenp

Just for verification, you can grab my PRTs from here.

--
Adrian Graham
Principal User Experience Designer
ME Film and TV Solutions
Autodesk

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report