PDA

View Full Version : rendering millions of particle with mray!! is it worth to give a try?


viki164
09-28-2009, 06:52 PM
hey duncan!
Good to see u online here at cgtalk!
I saw some of ur tech talk videos on area & it was really cool to see how much potential nparticle has :)
I just wanna request for next maya release plz add per particle rotation & normals feature on nparticles..So tht once cloud shader applied on it will adapt rotation in texture.
Btw I tried rendering 2.5 million nparticles with tube shader & with mray it took around 36 mins without crash :). It was pretty slow but it rendered. I was keeping an eye on memory usage & it was using only 3.65 gb of ram only though I have 8 gigs.
how cum it doesnt use it to full extent??
hope Windows7 does & it will be much faster!
So by anychance are there any improvements on particle rendering??? like krakatoa or 3ddelight. I know I m askin too much here but its just a wish & I`ll try my best to push it to next level & this will b only Possible If we get ur help.
something like this guy tried here :
http://s204357084.onlinehome.us/

let us know if there are any better way to render such hughe particles dataset.
thnxs much

ruchitinfushion
09-28-2009, 07:30 PM
i also want to know::::how to do render slicing using bubble sort tech.

Aikiman
09-28-2009, 08:38 PM
How come some dude in South Korea can code all this stuff that has enormous potential and the scientists at Autodesk instead throw Toxik and Matchmover into 2010? Beats me.

ovspianist
09-29-2009, 02:02 AM
How come some dude in South Korea can code all this stuff that has enormous potential and the scientists at Autodesk instead throw Toxik and Matchmover into 2010? Beats me.

It's really a big question in my mind too!

djhush
09-29-2009, 08:42 AM
Hi guys.

Yeah, this is a frequent question, but I've heard that you can render through realfow renderkit w/ millions of particles. I haven't tried it, but does anyone have any enlightning in this?

Thanks
//Anders

stooch
09-29-2009, 09:38 AM
i used rfkit... make sure you have LOOOTS of ram and it aint exactly fast. but it works.

i think there is room for improvement for nparticles that could possibly surpass rfkit. maybe something using the GPU?

If GPU is out of the question, i believe what is needed are some functions that can help us control particle density (at extremely large particle counts) and ways to cull particles in areas that are at 100% total opacity or throw more particles to smooth out sparser areas. IE Not just increasing the overall particle limit but ways to do more with less particles.

DJ_
09-29-2009, 11:21 AM
How come some dude in South Korea can code all this stuff that has enormous potential and the scientists at Autodesk instead throw Toxik and Matchmover into 2010? Beats me.
Touché! ;)

viki164
09-30-2009, 08:42 PM
hey guys!
this is sum crazy renders i tried to pull from my machine.
1> first one is just 2.6 millions & it took around 26 mins ( total RAM utilisation was aroun 3.5 gigs)

2> Second one is around 3.2 millions & rener time ($%##%&)... 1 hr 12 min :( (Ram utilisation : around 6.5 gigs)

later I tried with 5 millions & my machine crashed as it ran out of memory..virtual memory went upto 9-10 gigs!

My machine config :
quad core AMD opteron, 8 gigs physical RAM,
Nvidia gtx+9800 1 gb & 1 stupid mouse with broken keys on my sad keyboard :)

Maya can simulate more than 5 millions nparticles without self-collision & Liquid solver , but it cant render more than 4 millions particles.
just sharing my sad lill experience with u all.
if u see any hopes in particle rendering then let us know!

Vik

Aikiman
09-30-2009, 09:48 PM
Wow Vik thats pretty cool, too bad about the render times though. im not even gunna try to do that on my system.

[EDIT] whats the radius on your cloudies?

viki164
10-01-2009, 04:57 AM
hey Aiki!
dont remember much about the radius but I think its around 0.010 - 0.015 with raytracing ON.
the cool part is tht it doesnt produce any jitter If ones try to render a sequence or batch render!
wonder why it produces jitter in sprties may be opacity or z-depth sorting in sprites is not well handle!
not sure though.
But Sometimes I often dont think off simulating a million particle as the vastness of particles can be faked with tube or cloud shader with less than a million particles. For e.g my waterfall test which was not even a millions in count.
anyway I wonder if 3ddelight supports cloud or tube shaded particles?
coz rendering cloud particle against points gives better result.
If anyone knows how to render cloud particles with 3ddelight then plz share ur tricks.
thnxs
Vik

Cheesestraws
10-01-2009, 09:37 AM
Why are you rendering using raytracing? I don't use mental ray so I am rather curious, I would have thought scanline/rasteriser with detail shadow maps would be quicker.

viki164
10-01-2009, 09:47 AM
particle self-shadowing withou raytracing is it possible ?? huh! not that I know with mental ray!
doing with scanline(SW) render is more expensive than rendering with mray. Mray is much faster I believe.
I dont know if its possible to render particles with self shadowing without raytracing.
with Detail shadow map I didnt get self shadowing but the render was fast like it rendered those 3.2 million particles in 4 mins but with no self shadow :(

Cheesestraws
10-01-2009, 10:30 AM
I forgot how useless mental ray is when it comes to rendering particles. I am surprised that detail shadow maps do not self-shadow with particles though, it is the kind of thing they should be best at.

DJ_
10-01-2009, 01:07 PM
Just for the sake of comparison, I did a test with Vray.

This image has 1.1 million particles. To get it to render I had to use a pre-exported Vray-proxy mesh (small cube) as particle instance. Trying to render the default sphere that Vray does just blows the memory off really quick.

The good thing is that they are instances... so I could use area light + GI on it with no problems. Bad news is that it takes ages to export that scene for render.

This image took 19.30 mins to render. The actual render (GI calculation + render) took about 1 minute (and yes, those are 6.4 million polygons) but the rest of the time was Maya exporting the scene so Vray could do its job.

Maybe you guys can try a similar approach. Instance a pre-exported *.mi mesh on the particles , use the BSP2 and see if the render goes faster.

Br1
10-01-2009, 01:07 PM
You can use Shadow maps with particles and mental ray.
Here is an example.
http://www.br1.org/problem/particles_dethmap.png
Just check that you enable detail shadow maps in your light.

ruchitinfushion
10-01-2009, 04:27 PM
Try to cheat using camera clipping.i think this is best option to check next,wht u say???

stooch
10-02-2009, 06:27 AM
thanks for the tests vik, now i dont have to find out the limits of maya for myself :) lol.

i did get some pretty decent looking renders with cloud shader, but its nothing to write home about. Certainly not at the particle counts you did.

viki164
10-02-2009, 06:58 AM
@ DJ ,Br1 & ruchitinfusion:
Hey guys thnxs for ur test & I really appreciate ur feedback here. Its really good to know the other ways or workaround to render such huhge data set. unfortunately I dont have vray here but will give a try If I get a demo copy to try:).
@Br1 : the render looks good but can u tell me abt ur render times?? & How do I use shadow map here? is this without raytracing u have got? thnxs much & really appreciate abt ur test.

is Particle cloud shader is supported by 3ddelight, vray or rman ???
coz rendering cloud particles against particle points give much better result.

vik

Cheesestraws
10-02-2009, 08:35 AM
A nice technique for doing shadows with lots of particles like this, that is easy to do in Houdini not so sure how easy it is in Maya, is to create a volume from your particles and create deep shadow maps from that. That way you can render lower particle amounts and comp them together, but the shadows should remain fairly accurate as they are coming from a volume rather than lots of little points.

Htogrom
10-02-2009, 12:42 PM
Most important thing about Maya particles (including nParticles) is that it is single threaded.

WE ARE LIVING IN THE AGE OF MULTI CORE PROCESSORS ?!

Maybe Maya 2043 will support multi threading. Way to go lame Autodesk

I'm switching to Houdini

Cheesestraws
10-02-2009, 12:45 PM
I'm switching to Houdini

Houdini particles are single threaded. :thumbsup:

Htogrom
10-02-2009, 01:08 PM
What? Autodesk bought SideFX?

djhush
10-02-2009, 04:29 PM
- " What? Autodesk bought SideFX? "

Brilliant!

DJ_
10-02-2009, 05:59 PM
I just can't wait for the release of "Autodesk Windows 8". With no new features, a better looking splashscreen and the viewcube on my desktop (offcourse without the ortographic view option).

RFX
10-02-2009, 06:05 PM
Houdini particles are single threaded. :thumbsup:

They're also bout 5-6 years old, so it makes sense they would be single threaded.

Cheesestraws
10-02-2009, 06:13 PM
They're also bout 5-6 years old, so it makes sense they would be single threaded.

The base of nParticles is Maya's original particles, which in turn come from Dynamation which is 16 years old. :p

DJ_
10-02-2009, 06:42 PM
Well... to "defend" Autodesk... Duncan has told us on a different thread that nParticles, nCloth (nMesh) and anything else that might be released with the "n" in front of it's name are all based on the nucleus core.

If or rather when nucleus turns into a multithreaded core (wild guess is that they would need to rewrite the entire Maya for that), all of those features will automatically become multithreaded...

Well... softimage rewrote the entire XSI program from 0 for the 5.0 relese (if I remember it correctly), that is the main reason why the releases after that brought really cool stuff that made everyone else jealous (like ICE). Hopefully..... mayyyyybe... it we're reaaaally lucky, that team is now sparking some life into the Maya team to do the same. Well... one can always hope...

beaker
10-02-2009, 09:59 PM
Most 3d apps are single threaded except the renderer. Like the rest of the world most only started adding threading to the rest of the app in the last 2-3 years after multi-core machines started becoming abundant.

People forget that intel only introduced Multicore processors in 2006.

darktding
10-03-2009, 05:13 AM
I love the view cube so much I wish autodesk would release one where it is center of my screen that way I can tumble around all day... so much fun! WEEEEEEEE
http://img.photobucket.com/albums/v373/darktding/megaCube.jpg

Htogrom
10-03-2009, 05:30 AM
Not 100% sure, but I think in Houdini you can choose which thread node uses. That allows making multiple streams running parallel on multiple cores.

Also Houdini 10 has ability to distribute simulation on multiple machines in network, so can't see the reason why you couldn't distribute it to multiple cores.

For all of you trying to render particles in mental ray, simple FORGET. Download 3delight, free license provides 2 core functionality. It renders millions of particles lighting fast.

viki164
10-03-2009, 05:43 AM
@ Spellbound:

But 3dDeilght doesnt render volume cloud or tubes? though I love its speed but are there any workaround to render particle clouds/tubes with 3d delight?

I wonder how duncan told in tech talk abt a forest rendering where someone managed to render 9 billiions of polygon then Why not particles?
i hope the next Iray feature in mray will have some cool feature for particle volume rendering.

Cheesestraws
10-03-2009, 09:26 AM
Also Houdini 10 has ability to distribute simulation on multiple machines in network, so can't see the reason why you couldn't distribute it to multiple cores.

Well that would require two licenses of Houdini to do that for one, now that might make sense if you get your licenses over a network but I can't imagine too many machines have two licenses themselves.

Htogrom
10-03-2009, 11:58 AM
Well, 3Delight currently doesn't fully support volumetric particles. Of course I wouldn't count particle Cloud in volumetric particles, since you can get much better result with normal map sprites.

Fluids and fluid particles are not supported.

Pixar announced many volumetric rendering improvements for Mtor 15.0.

For rendering massive volumetric stuff I use Mental Ray with particle cloud shader, it is really good. Only thing that's missing is rotation attributes on fluids, so you can script twisting of individual nuke cells.

Many people here write here about lack of way to color instanced particles (PP) in Maya. In 3Delight, MayaMan it can be done with five lines of code.

RFX
10-03-2009, 04:38 PM
Not 100% sure, but I think in Houdini you can choose which thread node uses. That allows making multiple streams running parallel on multiple cores.

Also Houdini 10 has ability to distribute simulation on multiple machines in network, so can't see the reason why you couldn't distribute it to multiple cores.


Not quite the way you think. You can choose threads in custom VOP and vex networks, which are just custom operators to filter something, particles or geometry or whatever. As far as particle sims and creation go, those are still single threaded.

As far as simulations go, SPH and the SDF stuff ( fluids, pyro, smoke ), those are split inside as micro-solvers, so the simulation load is split into smaller chunks that can be used in multiple threads. Not quite multi-threading, but not single threading.

For the distributed simulation stuff, it still has some issues, specifically for distributed SDF stuff, the actual SPH stuff works well for it, so it can do RealFlow like stuff using distributed simulation.

On the SDF stuff, it's more geared and stable to be used as an uprez mechanism, so you sim your main fluid motion in a single machine, and once you're happy with the way it moves and look, you take that fluid box and it's sliced into various chunks with an overlap, and those velocity vectors are then uprezed, so you end up with a more detailed and more noised up fluids.

The uprez feature is only setup in pyro stuff right now, explosions, thick smoke, whispy smoke and fire.

ruchitinfushion
10-03-2009, 05:14 PM
Hello,ppl plz don't waste the time to discuss on other software advantage and disadvantage.
And if somebody have interest to play with this topic then plz try to play with script.
global proc ho_fluidExport(){

if(`window -exists ho_fluidExport`){
deleteUI -window ho_fluidExport;
}
window -t "ho_fluidExport" -rtf 1 ho_fluidExport;
columnLayout;
floatFieldGrp -l "startFrame" startFrame;
floatFieldGrp -l "endFrame" -v1 3 endFrame;
floatFieldGrp -l "increment" -v1 1 increment;
textFieldGrp -l "folder path" -text "G:/ho/myVoxels" folderPath;
textFieldGrp -l "file name" -text "myVoxel" filename;
//checkBox -l "Rib Archive Export" -v 1 ribArchiveExport;
//textFieldGrp -l "file name" -text "myRib" -en 0 ribArchiveName;

text -l "data name";
textScrollList -numberOfRows 6
-append "force" -append "velocity" -append "density"
-append "falloff" -append "fuel" -append "color"
-selectItem "density" dataName;
button -l "export" -c "ho_exportSquenceData";



text -l "hosok2@naver.com";

showWindow ho_fluidExport;
}

global proc ho_exportSquenceData(){

float $startFrame = `floatFieldGrp -q -v1 startFrame`;
float $endFrame = `floatFieldGrp -q -v1 endFrame`;
float $increment = `floatFieldGrp -q -v1 increment`;
string $dataName[] = `textScrollList -q -si dataName`;

progressWindow
-title "exporting"
-progress 0
-status ("")
-min $startFrame
-max $endFrame
-isInterruptable true;

for($n = $startFrame; $n <= $endFrame; $n++){

currentTime $n;

if ( `progressWindow -query -progress` >= $endFrame ) break;
if ( `progressWindow -query -isCancelled` ) break;
progressWindow -edit -progress $n ;//-status ("frame "+$n);

string $folder = `textFieldGrp -q -text folderPath`;
string $filename = `textFieldGrp -q -text filename`;
string $filePath = $folder + "/" + $filename + "." + $n + ".txt";

ho_exportData($dataName[0],$filePath);

}
progressWindow -endProgress;
//print "done";
}

global proc ho_exportData(string $dataName, string $filePath){

string $sel[] = `ls -sl`;
string $fluidShape[] = `listRelatives -s $sel[0]`;

float $res[] = `eval("getAttr " + $fluidShape[0] + ".res")`;

float $bb[] = `xform -q -ws -bb $sel[0]`;

int $fileId=`fopen $filePath "w"`;

fprint $fileId (""+$res[0]+"\n");
fprint $fileId (""+$res[1]+"\n");
fprint $fileId (""+$res[2]+"\n");

fprint $fileId (""+$bb[0]+"\n");
fprint $fileId (""+$bb[1]+"\n");
fprint $fileId (""+$bb[2]+"\n");
fprint $fileId (""+$bb[3]+"\n");
fprint $fileId (""+$bb[4]+"\n");
fprint $fileId (""+$bb[5]+"\n");

for($i = 0;$i<$res[0];$i++){
//print ($i+"/"+(float)$i/$res[0]+"\n");
float $cf = `currentTime -q`;
progressWindow -edit -status ("Frame "+$cf+" "+(int)((float)$i/$res[0]*100)+"%");
for($j = 0;$j<$res[1];$j++){
for($k = 0;$k<$res[2];$k++){

if ( `progressWindow -query -isCancelled` ){
//fclose $fileId;
break;
}

float $v[] = `getFluidAttr -at $dataName -xi $i -yi $j -zi $k`;
//print ($v);
if($dataName == "density" || $dataName == "falloff" || $dataName == "fuel" ){
fprint $fileId (""+$v[0]+"\n");
}else{
fprint $fileId (""+$v[0]+" "+$v[1]+" "+$v[2]+"\n");
}


}}}
fclose $fileId;
//print "done";
}
Try to export All the fluids content detail by this script and then u will get output in *.txt
More info :Here (http://s204357084.onlinehome.us/index.htm)

ruchitinfushion
10-03-2009, 07:38 PM
Slice & Dice rendering script (http://www.sinkpoint.com/files/sliceDice.mel)

Br1
10-05-2009, 02:49 PM
@ DJ ,Br1 & ruchitinfusion:
@Br1 : the render looks good but can u tell me abt ur render times?? & How do I use shadow map here? is this without raytracing u have got? thnxs much & really appreciate abt ur test.

Yes Vik, this is without raytracing. Just go through your light's mental ray shadow options and enable detail shadow maps. I don't remember about the render time, but I think I still have the file somewhere at the office, so I'll post it later if you want it.

br1

viki164
10-06-2009, 06:38 AM
@Br1
hey man thts some info u got. I will give a try with that but I wonder does it write detail shaw map every time when I hit render? will let u know If I dont succeed in getting selfshadow within particles cloud.
thnxs much
Vik

ytsejam1976
10-06-2009, 04:13 PM
one question(Stupid question :) )
But never test a sphere with radius much down dimension like a point? because i think if render this with bsp2 the render is to fast. But i'm not at work and my workstation is old dual core and i'm annoing render in big time.

In mental ray the problem is the primitive point that generate in render, is only this the problem and not maya problem.

KidderD
10-06-2009, 04:58 PM
Why are you rendering using raytracing? I don't use mental ray so I am rather curious, I would have thought scanline/rasteriser with detail shadow maps would be quicker.

In my tests, I have found raytracing to be faster, although, maybe detail shadow maps look a little better in some of them.

Is this the case with anyone else?

viki164
10-07-2009, 08:50 PM
still cant get proper use of detail shadow map without raytracing :(. Anyway here`s my lil experiment with physical Sun & sky+FG+GI on particle clouds with radius 0.025.
I have emitted from a surface & inherited color & my particle count is 378748 & total render time was 21 min 26 sec with raytracing ON. Its a normal wip with default settings. So at some point I really think tht millions of particle in count isnt necessary at all & things can be faked.
I guess there could be some better/optimised ways to render these particle clouds like detail shadow map etc etc.
hope to hear more on detail shadow maps & better way of renderin particle clouds in MR.
http://i463.photobucket.com/albums/qq359/viki164/21mins26sec.jpg

viki164
10-07-2009, 09:01 PM
And this one with less particle count : 134685 with radius 0.030 & it took around 12 mins to render 1k res on my windows 7 Os machine.
http://i463.photobucket.com/albums/qq359/viki164/1k12min.jpg

ytsejam1976
10-07-2009, 10:26 PM
mouuuuuuuuuuuuuuu

[/url][URL=http://img207.imageshack.us/i/mucca.jpg/]http://img207.imageshack.us/img207/3350/mucca.th.jpg (http://img207.imageshack.us/i/mucca.jpg/)


nParticles 3.333333
sun&Sky FG 1K 9:27 mins

Never inherit color, radius 0.100 and never other

Sybexmed
10-09-2009, 12:50 AM
How come some dude in South Korea can code all this stuff that has enormous potential and the scientists at Autodesk instead throw Toxik and Matchmover into 2010? Beats me.

Dude, i was thinking that as well while i was going over his website. His work and experiments are amazing. Lot of talent out there that needs to get on this forum!

Aikiman
10-09-2009, 06:40 AM
Dude, i was thinking that as well while i was going over his website. His work and experiments are amazing. Lot of talent out there that needs to get on this forum!

Im gunna learn Python over Christmas, see if I can start making some handy plug-ins. (now Ive set myself up for a fall!)

ruchitinfushion
07-03-2010, 05:49 PM
Today in free time i did test on Data Expansion-camera space culling(Method From Hosuk Chang)
Here is My Test
camera space culling_01 (http://www.vimeo.com/13058083)
camera space culling_02 (http://www.vimeo.com/13058183)
This is super slow calculation...Eating Much time for Runtime Expression.And ya it's Dangerous for normal computer to calculate this stuff.
Trust me otherwise you will be like this after complete
|----|-
| '.0
| /|\
| JL
|
|OMG i did that.ha ha ha

ruchitinfushion
07-18-2010, 07:38 AM
Whooooooooooooooooooo
i got success on two images
composite -compose over d:\FG.tif d:\BG.tif d:\tmp.tif
http://i410.photobucket.com/albums/pp186/ruchitinfushion/StillComposite.png?t=1279557319
Now just want to solve post render frame MEL problem
i m getting error for this
string $imgFolder = "C:\Documents and Settings\ruchitb\My Documents\maya\projects\default\images\";
Error: Unterminated string.

efecto
07-20-2010, 03:31 AM
'images\";' in your mel is the problem.
if you want to use \ in your string try using it twice where you want them to be.
eg) string $test = "test\\path\\"

ruchitinfushion
07-21-2010, 05:18 AM
Don't know wht's wrong going on in my code...after batch render cmplt i m getin only two images
first frame & composite out(tmp.tif)..not sure but i think other frame is going in recycle bin due to "del" cmd.
Here is code

global proc rendertest(){
int $f = (int)`currentTime -q`;
int $startFrame = (int)`getAttr defaultRenderGlobals.startFrame`;
int $endFrame = (int)`getAttr defaultRenderGlobals.endFrame`;
string $imageFilePrefix = `getAttr defaultRenderGlobals.imageFilePrefix`;

string $imgFolder,$fg,$bg,$out,$compCmd,$parameter;
string $imgFolder = "D:\\RendertimeComp\\images\\";

$fg = $imgFolder + $imageFilePrefix +"."+$f+".tif";
$tmp = $imgFolder + "tmp.tif";

if($f > $startFrame){
$bg = $imgFolder + $imageFilePrefix +"."+($f-1)+".tif";

$parameter = "-compose over " + $fg + " " + $bg + " " + $tmp + "\n";
$compCmd = "composite " + $parameter;
system($compCmd);

string $delCmd;
$delCmd = "del "+$fg;
system($delCmd);

string $renameCmd = "rename "+$tmp+" "+$fg+"\n";
system($renameCmd);

}
}

Reply ASAP.can't wait more

ruchitinfushion
07-22-2010, 06:38 PM
Ok it's done..Here is my final output for RenderTime Compositing
SpikeBall. (http://www.vimeo.com/13548652)
Thanx to
Hosuk chang,Moritz Moeller,Michiel Duvekot & many more.
_______________________
With Regards
Ruchit Bhatt

ruchitinfushion
11-04-2010, 02:39 PM
Here is one more test i did called Matrix,Inspired by this
Matrix (http://hosok2.com/project/matrix/matrix.html) By Hosuk Chang.
http://i410.photobucket.com/albums/pp186/ruchitinfushion/MatrixGeometry.png?1288876861
From this test i learned how to re use Complex pre baked geometry again and again with the help of ReadArchive.The benefits of using ReadArchive is saving space and reusing data.
watch this in motion here
http://www.vimeo.com/16499710

Aikiman
11-04-2010, 06:25 PM
nice bro, keep up your research ;)

ruchitinfushion
11-18-2010, 12:13 PM
Friends i m confused for which algorithm will be best to find nearest neighbor particle of every particle(kd tree,Quad/Octtree,BSP tree?).In Data Expansion 2 (http://hosok2.com/project/dataExpansion_2/dataExpansion_2.html) Kd tree was used to find nearest neighbor particle.But recently i found hosuk is using a algorithm that was totally wrong & he is in false assumption that this is the best one can do.So now i have to make choice for which one will be better & faster.
Source code for Kd tree:By David M. Mount and Sunil Arya (http://www.cs.umd.edu/%7Emount/ANN/)
By Michael Connor (http://sites.google.com/a/compgeom.com/stann/Home) and Piyush Kumar (http://sites.google.com/a/compgeom.com/stann/Home)
I also want to look at BSP tree source code,so if u have any good link then plz give me.Thank you

ruchitinfushion
11-20-2010, 10:30 AM
After reading too many documents floating on google ,now i can say nearest neighbor search & traveling salesman problem are nearly same kind of problem.By understanding this problem later we can make decisions for which algorithm will be best to find nearest neighbor.So here is PDF file which i made after studying on traveling salesman problem.Must read this..hope u will learn something new & will understand our actual requirement to speedup the process of finding nearest neighbor.
Travelling Salesman Problem (https://sites.google.com/site/mayaforumhelp/forum-help-content/TSPBook.pdf?attredirects=0&d=1)

Reply if typed any wrong.Thank you

ruchitinfushion
11-26-2010, 07:47 AM
One more task complete...(How to generate pointcloud file from maya fluid)
More info :Cloud (http://hosok2.com/project/cloud/cloud.htm)
Friends in above site,you will find MEL script (ho_fluidExport.mel (http://hosok2.com/project/cloud/ho_fluidExport.mel)) & c++ code(ho_ptMakerMain.cpp (http://hosok2.com/project/cloud/ho_ptMakerMain.txt)).using ho_fluidExport.mel you can export maya density,velocity,temperature,fuel,color,etc to text file and using ho_ptMakerMain you can convert text file to pointcloud file.But right now there is bug in ho_fluidExport.mel ,so i've made change in this script to work.Will put here soon after figure out how to bake maya fluid color.Thank you
http://i410.photobucket.com/albums/pp186/ruchitinfushion/fluidtoPTC.png?t=1290756925

ytsejam1976
11-26-2010, 10:20 AM
wow, this is great. :thumbsup:

ruchitinfushion
12-28-2010, 03:01 AM
Last night in free time i compiled one custom plug-in to export Maya particles to Krakatoa.Here is demo http://www.vimeo.com/18215833 .but i m not very happy with this tool because of this reason
first krakatoa GUI is just shit..very unprofessional & second if we want to seed more particles at render time,we need deadline also installed on PC.Anyway this will be useful for those ppl which are not having time to play with Renderman.Trust me all the major features of Krakatoa can be done using Renderman without any extra money loss,you just need good skill in scripting.All the best

particlefx
12-28-2010, 04:33 AM
Thanks for sharing..

berniebernie
12-28-2010, 11:34 AM
Thanks for sharing..

Ditto, thread bookmarked. Are there third-party particle plug-ins (rendering) for maya, à la krakatoa/pflow ?

ruchitinfushion
12-28-2010, 01:30 PM
Here is source code for maya to krakatoa
http://code.google.com/p/m2k/

Zlib can be download from here
http://www.zlib.net/

And also during chat with Bo.schwarzstein.I got two more IMP file
PRT.cpp (https://sites.google.com/site/codingmystery/codes/PRT.cpp?attredirects=0&d=1)
PRT.h (https://sites.google.com/site/codingmystery/codes/PRT.h?attredirects=0&d=1)

particlefx
12-31-2010, 06:20 PM
Hi guys,

Can someone Share the m2k plugin for maya 2011 64 bit.

Thanks in advance
prakash.k

ruchitinfushion
01-09-2011, 07:02 AM
http://i410.photobucket.com/albums/pp186/ruchitinfushion/Partio.png?t=1294556215
Ok friends,i found nice tool to convert Maya particles(*.PDB or *.PDA) to Houdini (*.BGEO or *.GEO) & Pixar Renderman(*.PTC).You can export your maya particles using dynExport Mel cmd and then simply run the cmd line application to convert in another format.Right now there is little bit problem in 64bit PDB file reading & writing..Hope will fix soon.
Here is tool which i compiled on WinX64 with use of win7.1SDK ,so may be u will need microsoft visual c++ Redistributable Package(MSVCP100.dll)
Partio Tools For WinX64 (https://sites.google.com/site/cgtalkforumsharing/rar-files/PartioTools.rar?attredirects=0&d=1)

Special Thanks to
Aselle & Walt Disney Team
Official site (http://www.disneyanimation.com/technology/partio.html)
Source code Site (https://github.com/wdas/partio/)

ganzo
01-09-2011, 07:15 AM
Nice find,
Although I've found that the best tool for the job is to use realflow plugin within your host app. Just send as .bin and import with same realflow plugin in another package...fast and clean. It is a good way to send stuff between apps and are guaranteed that it is under maintenance.

Of course you have to have realflow to have such importer plugin...

ruchitinfushion
01-10-2011, 06:00 AM
Nice find,
Although I've found that the best tool for the job is to use realflow plugin within your host app. Just send as .bin and import with same realflow plugin in another package...fast and clean. It is a good way to send stuff between apps and are guaranteed that it is under maintenance.

Of course you have to have realflow to have such importer plugin...

May be realflow plug-in is enough for your job,but not for every other people.If you try to find probability of realflow plug-in,only one & one way you can solve your problem.But in case of partio you will get infinite ways to solve your problem.Many research & developers group are using their own simulator & doing render in renderman.So simple answer is ,just include your own particle format in partio source code & make life easier.Always stay with universal solution.
I don't have any idea about pipeline of other studio but major studio do simulation in one software & then move that particle data to renderman.In very rare case they move data from one software to another & then render.And i m dam sure they never move rendering data back to particle data(for Eg:*.PTC to *.PDA).Now it's up to you what is the good for your job.Enjoy


//To Export Maya Particles // -mnf is start frame,-mxf is End frame,-os is OverSampling,-atr is name of attribute to be exported,
//-p is path ,-f is format (PDA,PDB,PDC)
dynExport -mnf 1 -mxf 10 -os 1 -atr position -atr velocity -p "MyPDAfiles" -f "pda" particle1;
//To Run cmd line App in loop
for($i=1;$i<=10;$i++){
string $exeFile = "D:/partconv.exe";
string $inFile = "D:/MyMaya."+ $i + ".pda";
string $outFile = " D:/MyHoudini."+ $i + ".geo";
system( $exeFile + "\t" + $inFile + $outFile);
//print ( $exeFile + "\t" + $inFile + $outFile);
}

ganzo
01-10-2011, 07:49 AM
May be realflow plug-in is enough for your job,but not for every other people....

Yeah that's right...I agree...I was talking about me personally. Never said Partio does not work ;) so take it lightly. From a studio point of view...well many of the big houses have their own R&D teams bringing out their own custom solutions to fit their pipeline and I bet Partio works great. For me as a single user, using the realflow plugin works because not only can I share particle data across different platforms...I also send geometry that way. Such is my case between maya and houdini where not only do I want to send particle data across them...I also want to send procedural geometry from houdini to maya and using obj/bgeo sequences for geometry is slow and a pain and point caches only work if the point count is not changing. So the realflow plugins is not limited to particles....but like I said...its my personal experience with it since it helps me get more things done. :)

ruchitinfushion
02-06-2011, 02:58 AM
Partio Update:-
Partio (with 64bit *.PDB) (https://github.com/wdas/partio/commit/45fc166349b5da243767eda1579dd5eaff671010)

Update Points:-
*64 bit PDB file support.
* .pdb32 .pdb64 and .pdb extensions. .pdb32 forces 32-bit write, .pdb64 forces 64-bit write, and .pdb writes 64 bit.

Issue:-
If you get any problem for reading or writing *.PDB file,then plz put your issue with test file here.


Error reading Maya pdb files. (https://github.com/wdas/partio/issues/closed#issue/4)

Thanks to Aselle.


(https://github.com/wdas/partio/issues/closed#)

ruchitinfushion
02-14-2011, 07:46 AM
Ok,now i have Procedural Primitives(DSO) ready with InSphere random functionality.

Input:-

Procedural "DynamicLoad" ["D:/Renderman_Stuff/InSphereRun.dll" "0.3 50000 3 0.003 0 0 0 0 1 0"] [-1 1 -1 1 -1 1]
Output:-
http://i410.photobucket.com/albums/pp186/ruchitinfushion/InSphereRib-2.jpg?t=1297669795

Right now i m getting problem to export RIB file from Maya with desired particle attribute,so i m not able to use Ri filter plugin at this moment .if anybody know how to control & export RIB file then plz give more info.Thank you

ruchitinfushion
03-29-2011, 05:27 PM
Oh.after lots of struggle
Here is first Mile Stone To Millions Of Particles (http://vimeo.com/21652084)
I know it's looking bad,but i am very excited because i got it how to use RiFilter.Very Soon i will try to fix multi point radius problem.Hip Hip Hurray


=>Problematic Area


void setNearestDistances(int nverts,const RtPoint *P_Rib,double *nearestDistances){

double detail = 1000000;
double offset = 1000;

Point *P = (Point*)malloc(nverts*sizeof(Point));

for(int n = 0 ; n < nverts ; n++){
unsigned int P_treeX = (P_Rib[n][0]+offset)*detail;
unsigned int P_treeY = (P_Rib[n][1]+offset)*detail;
unsigned int P_treeZ = (P_Rib[n][2]+offset)*detail;

Point treeP(P_treeX,P_treeY,P_treeZ);

P[n][0] = treeP[0];
P[n][1] = treeP[1];
P[n][2] = treeP[2];
}

vector<const Point*> ans ;
nnBase<Point> *NN;

int size = nverts;

ans.resize(1);
NN = new sfcnn_ip<Point>(P,size);

for(int n = 0 ; n < nverts ; n++){

Point queryP(P[n][0],P[n][1],P[n][2]);

NN->ksearch(&queryP,3,ans);
Point tmp1 = *(ans[1]);
Point tmp2 = *(ans[2]);

double nX1 = double(tmp1[0]);
double nY1 = double(tmp1[1]);
double nZ1 = double(tmp1[2]);

double nX2 = double(tmp2[0]);
double nY2 = double(tmp2[1]);
double nZ2 = double(tmp2[2]);

double dist1 = sqrt(pow(double(P[n][0])-nX1,2)+pow(double(P[n][1])-nY1,2)+pow(double(P[n][2])-nZ1,2));
double dist2 = sqrt(pow(double(P[n][0])-nX2,2)+pow(double(P[n][1])-nY2,2)+pow(double(P[n][2])-nZ2,2));

nearestDistances[n] = ((dist1 + dist2)/2) / detail;

}

delete NN;

free(P);
}

ytsejam1976
03-29-2011, 06:29 PM
good stuff
but it's for renderman?

ruchitinfushion
03-30-2011, 01:39 AM
@ytsejam1976
Yup,i am using 3Delight.First i simulate 5000 particles in Maya and then i exported the RIB file.After that i used Ri Filter Plug-in to replace RiPoints procedure, which is particle in Maya, to RiDynamicLoad procedure, which is DSO call, in render time.So i got 5000 * 30 (Number of Dots) = 150000 particles.Now it's time to solve nearest neighbor searching & multipoint radius problem.

psilo
03-30-2011, 08:55 AM
looking nice ! want to see the next evolution now :)

ytsejam1976
03-30-2011, 09:22 AM
@ytsejam1976
Yup,i am using 3Delight.

ehmmm thread was name rendering millions of particle with mray. Replicate this for mental please. :)

ruchitinfushion
05-03-2011, 01:15 PM
Chckout Maya to Krakatoa for Maya 2011 winX64 Here.Thank you
Maya To Krakatoa(Maya2011_WinX64) (http://www.creativecrash.com/maya/downloads/scripts-plugins/dynamics/c/maya-to-krakatoa--2)

CGTalk Moderation
05-03-2011, 01:15 PM
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.