PDA

View Full Version : PFlow and mental ray


wannabeArtist
04-12-2010, 06:03 PM
Hi,

I'm new to Pflow so this might be a dumb question, but is it possible to use mental ray materials for particles? I know it's not the best option, but it's my only renderer.

I've been trying to create a simple fire effect and after several self-made attempts, I took a look at the sample scenes.
I found some of them (like the torch) to be very close to the look I'm after, but they use standard materials. Simply making a similar arch & design material doesn't seem to work and somehow disregards transparency map completely. Is this a compatibility issue?

Thanks!

Piflik
04-12-2010, 11:12 PM
What's wrong with using Standard Materials...they do work in MRay...

That being said, MRay Materials work with PFlow without problems...I just recently did a little PFlow animation with an A&D Glas Material, and it worked just like with any other type of geometry....

wannabeArtist
04-13-2010, 05:06 AM
Yeah, standard materials work for the most part, but I was having issues with the self-illumination. The rest of the scene uses photometric lights, etc. and I'm using exposure control - I don't know if that's the problem, but I didn't get any illumination from the standard materials.

However, I continued with my own tests and now I'm getting transparency and self-illumination with arch & design. This works with instanced geometry, but not with dynamic material (hence the original problem, I guess).

Now, the only thing that doesn't work is my particle age map - I'm only getting the first color no matter what I plugin for the percentages. This problem also exists with standard material, so there's something wrong with my simulation.

Piflik
04-13-2010, 10:47 AM
You have to have a Delete Operator in your Flow, for the Particle Age Map to work, since it is based on the percentage of the Particle's life and not on absolute Time values...also the Particle Age Map is limited to the rather low number of 65536 Partikles...after that it stops functioning (Here's (http://forums.cgsociety.org/showthread.php?f=6&t=787921&highlight=Particle+Age+Map) a little Thread about it in the main Max Forum, including a workaround).

wannabeArtist
04-13-2010, 11:09 AM
Thanks for the link!

In this case, I'm only using 2000 particles for testing and I do have a delete operator, so it must be some other problem.

Here's a couple of screens of my attempt for fire - the crazy green color is just a test, it's the first color of the age map. The idea is that the particles fly out of the emitter horizontally for 2 frames, and then they go after the disc above the "logs". When they reach that the are picked up by a wind force.

Oh, and the plane and the sphere are objects I've been using for instancing, showing the transparency map. Current test is with the plane.

Piflik
04-13-2010, 11:50 AM
Use a Delete Operator instead of the Age Test and set it to 'by Particle Age'.

wannabeArtist
04-13-2010, 12:13 PM
Thanks a lot!

That fixed it - obviously it's still not very fancy, but at least it's working as it should!

wannabeArtist
04-14-2010, 12:30 PM
I figured out the issue that keeps my results quite tacky.

The material seems to render very differently on the particles as it does on a "regular" object.

I tweaked my test scene a bit - the particles instances of the plane on the right with the checker pattern. The pattern is applied as a refraction (transparency) map and refraction (max) is set to 1,0. Diffuse is 0.

Now, when I add self-illumination and render, the plane turns into a fuzzy fireball, but the particles look very different.

Any thoughts?

scrimski
04-14-2010, 12:51 PM
Mask the selfillumination with whatever you use for opacity/cutout. Also instead of using the Delete Operator in the last event, use it in the PF Source event(you will have to adjust the age of course).

wannabeArtist
04-14-2010, 12:59 PM
Thanks,

I tried both, now the results look like this. There's something fishy about the transparency...
also notice, how the blurry "fireball" changed it shape when I did that.

Why would the delete node need to be in the source event? Also, if it is there, then where should it be placed, before or after the test?

scrimski
04-14-2010, 01:06 PM
Placing operators that apply to the complete flow in the Source Event(the top most) is a god habbit to have, it keeps your flow cleaner.
Also, if it is there, then where should it be placed, before or after the test?I don't see any test in the Source event.

wannabeArtist
04-14-2010, 01:39 PM
Oops, sorry, I was looking at the first event and not the source. Fixed that.

I got the transparency working too!

One more issue - my particles have a rotation operator, set to random 3d (default). I'd rather do without it, because it tilts the plane instanced particles into angles that break the illusion. But if I delete it, they render "flattened" - is there a way to keep the particles "straight" without any rotation - like the shape facing operator, but with an instance?

scrimski
04-14-2010, 01:50 PM
Just adjust the rotation in the operator. YOu may also align particles to horizon in the shape facing operator.

3DMadness
04-15-2010, 03:44 AM
You can use a shape facing with another shape operator in sequence, this way you will only get the rotation from tha shape facing.

wannabeArtist
04-15-2010, 05:53 AM
Thanks, guys

I tried altering the rotation values before, with many different combinations, but I never got the particles to face the camera - in most cases they were facing upwards.

Now, for the second tip, I tried dropping a shape facing after the shape instance operator and it seems to work - I'm not sure if this was what you meant, though?

The size in the shape facing seems to also be at play - and actually, with a little bigger size than before, the fire looks better :)

Not very realistic, though. Any tips to improve this are very welcome!

CGTalk Moderation
04-15-2010, 05:53 AM
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.