anupamd Posted July 3, 2012 Share Posted July 3, 2012 (edited) So, the scattered emission in Pyro looks nice, but its obviously a lot slower than not scattering (im getting about a 5x to 10x slowdown depending on size of volume) All Im looking for is a basic kitchen sink scattering, it doesnt have to be physically realistic. really all it needs to be is a blurred and/or resampled version of the heat field. think of it like blurring an image in comp.. same principle but just blurring the volumes instead. So now is where I hit a roadblock because I know what i want to do but I dont have a lot of experience manipulating volumes especially ones that change over time. Here is what I want to do. Starting with some cached volume that contains density/heat/velocity..the usual fields. 1. Load the volume. (dopio? file?) 2. Create a new volume with the same dimensions as the original fluid container. (just refer to the container size with a channel expression) 2. Isolate the heat field somehow so I can perform a volume blur on just the heat field (alternatively, can also try a volume resample) 3. copy this over to the new volume 4. merge the new volume with the existing pyro volumes. 5. Write back out to disk as heat_blurred. Also, I suppose instead of doing this as a post process on cached data, I could do this in DOPS as the last step before caching to disk. That would be more efficient. ***So the REAL lapse of knowlege here is.. how does one do the above manipulations in DOPS. Finally in the pyro shader, I want the fire density field to be calculated something like (heat*heat_scale)+(heat_blur*heat_blur_scale). So I'd have to modify the pyro shader a bit. Im basically mixing in a bit of the blurred heat field with the unblurred (and ideally more sharp looking) heat field. That way I get very sharp details in my fire and a very blurry wide falloff that simulates some scattering. Blurring volumes is fairly fast, and the resolution of the blurred volume doesnt have to be that high, volume resample works too but might get artifacts. So I think that would work for some really fast fake scattering no? I'm going to try some things but I'd love some extra advice on this. -A Edited July 3, 2012 by anupamd Quote Link to comment Share on other sites More sharing options...
anupamd Posted July 3, 2012 Author Share Posted July 3, 2012 Ok here is an initial trial in dops. I remember back to bunkers pyroclastic smoke example.. gas match field to make a copy of the heat field. Gas blur the heat field. then in SOP space make sure to import the blurred heat field (import pyrofields) and that should give me all the data I need. I suppose if I were doing uprezzing, I'd want this in the uprez dop instead but anyway. .. going to try the shader part of it tomorrow. Quote Link to comment Share on other sites More sharing options...
anupamd Posted July 3, 2012 Author Share Posted July 3, 2012 fakeScatterDops.hip Ok here is an initial trial in dops. I remember back to bunkers pyroclastic smoke example.. gas match field to make a copy of the heat field. Gas blur the heat field. then in SOP space make sure to import the blurred heat field (import pyrofields) and that should give me all the data I need. I suppose if I were doing uprezzing, I'd want this in the uprez dop instead but anyway. .. going to try the shader part of it tomorrow. Quote Link to comment Share on other sites More sharing options...
anupamd Posted July 3, 2012 Author Share Posted July 3, 2012 (edited) oh yea, forgot the gascalculate .. that above hip will attempt to blur a volume that has nothing in it. The gas calculate needs to copy that volume over. too tired to post the hip tonight.. will do it tomorrow AM. But its sorta looking promising. Ok so that seems to work now. I looked at the shader and it seems I cannot dive any deeper than the emission density node part. Is there any way to unlock the pyro2->emission density shader so i can modify it? Do i Have to basically just modify the vex code? -A Edited July 3, 2012 by anupamd Quote Link to comment Share on other sites More sharing options...
anupamd Posted July 4, 2012 Author Share Posted July 4, 2012 here is the fixed hip with the correct heat blurring. Im still sorta stuck on the shader as I cant seem to be able to modify the pyro2 shader. Is it a black box shader.. I thought it was suppose to be editable? I'll dig further.. probably just doing something stupid. Quote Link to comment Share on other sites More sharing options...
anupamd Posted July 4, 2012 Author Share Posted July 4, 2012 file fakescatter2.hipnc Quote Link to comment Share on other sites More sharing options...
eetu Posted July 7, 2012 Share Posted July 7, 2012 I think you could also do your field manipulations with volume operators in SOPs, after the volumes have been brought in from DOPs. That way messing around with density or heat wouldn't interfere with the simulation. Quote Link to comment Share on other sites More sharing options...
anupamd Posted July 13, 2012 Author Share Posted July 13, 2012 I tried that but couldnt find a way to A. Isolate the volume I want to manipulate. B. Rename or copy the volume. Essentially replicate the steps I made in dops but in sops. I think you could also do your field manipulations with volume operators in SOPs, after the volumes have been brought in from DOPs. That way messing around with density or heat wouldn't interfere with the simulation. Quote Link to comment Share on other sites More sharing options...
dbukovec Posted July 14, 2012 Share Posted July 14, 2012 hi! actually the built in scattering can be fast, just not with the default values. Since avg density is linked to the smoke density by default it produces a very heavy point cloud, so if you unlink it and make it like value of 1, it should be pretty fast. Try and load the cached point cloud from disk in SOPs and examine density with various settings. What is still slow is the internal scattering with shadows (mode). I was just doodling with scattering and came up with this hope it helps Quote Link to comment Share on other sites More sharing options...
woodenduck Posted July 17, 2012 Share Posted July 17, 2012 You can isolate the heat field in sops by using @name=heat* Quote Link to comment Share on other sites More sharing options...
woodenduck Posted July 17, 2012 Share Posted July 17, 2012 Then perform volume blur on it Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.