Does anyone know if you can texture a system based on it’s velocity or similar? I have a sim of something punching through water and want to texture the rapidly moving areas in white for the foam.
The preview looks good the way it colours particles; this is kind of the direction I want to go in.
Can I use texmap (of which there doesn’t seem to be any documentation on how to setup online)? Or similar process to achieve this look?
all the main parameters of the volumetric shader, the opacity, the collor, the self illumination (emission) can be based on any physical value exported by the simulation, including the velocity, you just have to select which one by the drop down menu.
with the curves and gradients you can specify what opacity/color/self illumination correspond to the underlying physical value.
Didn’t want to start a new thread for this question so I’m hijacking this one.
@Ivaylo - I’ve been looking at the documentation, but I cannot seem to find an answer for my question. I’m working in Maya. How would a person render a solid chunk of geo from phoenix, blending two materials together via a channel (temperature)? Please point me in the right direction.
You need the PhoenixTex as a source to a VRayBlendMtl. The thing that may obstruct you is to get the temperature from the Phoenix texture in 0-1 range, so you can use it as a blend material. With a default setup the temperature ranges from 300-2000, but you can also use the Preview min-max to check your actual ranges. You need to subtract and divide the Phoenix TexMap values by certain coefficients, e.g. for 300-2000 you need to subtract 300 and divide by 1700 and you will be in 0-1 range.
Thanks Svetlin! That makes a lot of sense. I was scratching my head there for a while about how to use the PhoenixFDTexture. So below is the tree I have setup. How do I alter the temp amounts now to the 0-1 range after the simulation already has been simulated? Where would I put the math nodes in the tree to do this? The PhoenixFDTexture links up with the simulation by having the user input the simulator name (so no node link to the actual simulator, just a string pointer).
So I’ll explain in greater length where I’m at and what issues I’m running into.
Below is a photo of the preview temperature of the voxels (keep in mind that the actual render I want to be a mesh/solid geo, not a volumentric cloud)-
Here is my node editor setup shown below-
I have the PhoenixFDTexture pointing to the simulation and the channel set to temperature. The out color is driving the blend amount. The above math tree takes 2000 and converts it down to “1” per your instructions (just linked to userScalers to ensure the math was working).
So a few questions about your solution.
-Where do I plug the math node converter bit into the primary tree? I cannot simply plug it into the out color as the out color is 0-255 as it is color. Do I somehow work it into the actual PhoenixFDSimulator1 node? If so, where?
-You mentioned a preview min and max of the temperature values. Where do I access this? What attribute out of the PhoenixFDSimulator1 or the PhoenixFDTexture1 gives me these values?
Sorry if I’m not fully understanding what your previous post described (although I think I am, there are just some gaps in your explanation with too many variables to be plugging random things into random places).
Many thanks for your help. I really, really would like to get this to work and resimulation is not an option due to time constraints.
Sorry for the late reply! So, you can plug your arithmetic logic after the Phoenix Tex - either R, G, or B component of the color will work - in case of Temperature, Smoke, Fuel, the channel is copied to all three color components, so it doesn’t matter which one you choose. In case the color is in 0-255 range, you need to divide by 256 too, but I think you don’t need to do this - I will check..
By preview I meant the Preview panel of Phoenix - when you don’t have Mesh or Shaded GPU previews enabled, there you can choose which channel to look at and in what range, so by adjusting the ranges of the channel you can get an idea of what roughly the min and max values are. Especially for the temperature, the range will be between 300 (that’s roughly in Kelvins) and the Temperature value of your hottest PHXSource. We will add the channels ranges in a list with numbers in a more visible place, hopefully in the coming weeks, so one won’t have to do this manually.
Also, a very important point - if you don’t need a fancy mapping and just want your Phoenix texture to be mapped over the simulator it came from, then you should make sure to check Auto Mapping in the Phoenix tex - we should probably make this On by default.
No worries. Sure you are a busy guy. I just appreciate the support.
It’s crashing as soon as I try to make the connection from the math logic into the vray blend amt (I’ve attempted the same setup with the VrayMtl with the same crash)-
IF I go straight from the PhoenixFDTexture out color to the blend amt I get no crash (but just a completely black color output).
Below is a link to the test scene (created a simplified scene to eliminate variables). I’m now a bit confused why there is even a temperature channel in a liquid simulation without a heat source?
In the test scene (weTransfer Link below) I changed the preview color of the liquid temp to better illustrate what I’m going for here… The black/white would drive the blend amt-
Please see if you can get the appropriate blending of materials to work on your end.
Further details-
Vray: Build 3.30 official (26 February 2016)
Maya 2016 SP5 + Extension 1
Phoenix FD: Nightly for Maya 2016 “20160217”
Hopefully we can get to the bottom of this and I can meet my project deadline.
Best,
Clayton
Edit: If my cache files would be of help to you let me know and I’ll send them over. I figured you would just generate them over there.
Here is a download link with the scene and the cache files if you think it’d help you figure this all out. 501mb so it’s larger- http://tinyurl.com/jzmwrhe
Hi Clayton,
i can’t say why the grapth crashes, just to mention that you can convert texture ranges very easy using the standard max output texture, that is by default included in many maps, but not in phoenix, you have to add it by hand.
the texture first multiplies, then adds the offset (it’s easy to figure this out using a simple gradient as base), so for fire temperature you have to set in the rgb level something like 1/2000 and in the rgb offset something like -0.14 (adjust it)
i see that you use test scene with liquid, in this case you have to use no conversion graph, because the liquid is in the range 0-1 by its nature.
it’s possible that the crash is caused by negative blend factor passed to the blend material, if this is the case you have to adjust the offset
@Svetlin - Thank you for sticking with me through this. Can’t wait to hear back.
@Ivaylo - I’m pretty sure the graph was crashing due to negative values in the blend amt. This is because the phoenixFDTex isn’t outputting anything for the temp or velocity channels (zero’d values). I think at the root of it this is the problem that although the proper information can be previewed through the viewport (voxel color preview, which is a perfect representation of what I’m after), it’s not actually pulling anything out of the channels? We’ll wait and see I guess. If I can get a working example of this I’ll be able to figure out what’s going wrong in my production setup.
I’m still confused about placing the math logic in between the out color of the PhoenixFDTex and the and the applied material (since RGB out color usually is 0-255.. but this very well could be different in this instance).
Cheers guys. Appreciate the help! Maybe this is something that you’d want to add into the documentation in more detail? I’d imagine it would be something many people would want to do this with Phoenix.
my mistake, i didn’t notice that you are using maya, so i suppose there is no easier way to transfer the range.
about the negative value, if really this is the reason, may be is good idea to inform the qa team
Well let’s see what Svetlin comes back with. This should be a fairly straightforward thing for the user to do. I very well could be doing something incorrect here on my end too. I hate to say it, but there is always the possibility that this might be a bug or a oversight as well.
What’s frustrating is that the information is 100% there in the preview of the viewport, but I still don’t know why there would be such a variation in temperature information for a fluid/liquid sim that has no heat source. Fingers crossed that there is a way I can apply this blending of materials to the simulation I’ve been running for the past week. Using a Maya solver that must be one of the single threaded ones discussed in the documentation.
I create a Phoenix Sim with a temp channel. Create a PhoenixFDTexture pointing it to the sim’s temp channel, apply the phoenixFDTexture to the simulation, change the generic generated texture that is created to anything (for simplistic example let’s say a VrayMTL with the out color of the PhoenixFDTexture pumped into the diffuse). I get, absolute black because the out color of the PhoenixFDTexuture is completely zero’d.
So, I figure that there perhaps is something special going on since the default temp values range from 300-2000 and RGB goes from 0-255 standard… So I create the appropriate math logic as suggested below and plugged it into the VrayMTL and insta-Crash. That’s because (for whatever reason), the PhoenixFDTex Temp channel is zero’d and not giving any data.
This is the same for the velocity channel (which was also exported during the simulation).
Either I’m missing something very huge or there is something very wrong with the PhoenixFDTexture/Temp channel. Followed Svetlin’s instructions which resulted in a crash of Maya. So, please feel free to download the sample scene I posted below via weTransfer and try your hand at getting the appropriate results. If you could show me a working example with the demo scene I posted then I can see how this this is done.
Let me know if I need to upload the scene again.
As of now I’m following the instructions given to me and not getting anywhere.
Sorry for too many replies and too little reading So I mentioned it in the other thread regarding the liquid sim crash, but this crash here is in V-Ray and I don’t think the fix will come in for tomorrow. I will try to setup your scene to workaround the crash and get it back to you this eve, so you can try with tomorrow’s Phoenix nightly.