how to bake the 3d vector field to xz plane and xy plane color textures?
4791 11 1- dreamerflyer19
- Member
- 54 posts
- Joined: Oct. 2017
- Offline
- galagast
- Member
- 252 posts
- Joined:
- Offline
Hi, you could probably use the Volume Slice SOP to read volume data onto a plane. I attached an example file.
Or use the volumesample() function in wrangles.
Note that the resulting color data might need to be massaged a bit before baking, that is because they will most likely contain negative values.
Or use the volumesample() function in wrangles.
Note that the resulting color data might need to be massaged a bit before baking, that is because they will most likely contain negative values.
- dreamerflyer19
- Member
- 54 posts
- Joined: Oct. 2017
- Offline
galagastThanks a lot! And I export to texture not work…maybe i link the rop bake texture node not correct?see the attachment,thanks!
Hi, you could probably use the Volume Slice SOP to read volume data onto a plane. I attached an example file.
Or use the volumesample() function in wrangles.
Note that the resulting color data might need to be massaged a bit before baking, that is because they will most likely contain negative values.
Edited by dreamerflyer19 - Nov. 21, 2017 12:31:34
- galagast
- Member
- 252 posts
- Joined:
- Offline
Hi, as it turns out, the Volume Slice creates a Mesh type geometry by default. So I just added a Convert SOP to convert it to polygons. The Bake Texture ROP seems to prefer polygons. I've attached an updated file below.
Also, as an added alternative to look into, You may be able to utilize COPs to directly read the color values from your geometry. Here's a thread [www.sidefx.com] that has an example.
Or, I don't know if Unity supports volume velocity fields directly, but if you look at this Unreal tutorial [www.sidefx.com], you may be able to just export the volume field directly in to your game.
Lastly, just a bonus for those looking into the baking workflow, here's [houdini.indyzone.jp] a very simple tutorial on baking. Although it is in japanese, the images are very easy to follow.
I hope this helps!
Also, as an added alternative to look into, You may be able to utilize COPs to directly read the color values from your geometry. Here's a thread [www.sidefx.com] that has an example.
Or, I don't know if Unity supports volume velocity fields directly, but if you look at this Unreal tutorial [www.sidefx.com], you may be able to just export the volume field directly in to your game.
Lastly, just a bonus for those looking into the baking workflow, here's [houdini.indyzone.jp] a very simple tutorial on baking. Although it is in japanese, the images are very easy to follow.
I hope this helps!
- dreamerflyer19
- Member
- 54 posts
- Joined: Oct. 2017
- Offline
galagastThanks a lot for your helps!I export the texture,it seems not work,may i missing something?
Hi, as it turns out, the Volume Slice creates a Mesh type geometry by default. So I just added a Convert SOP to convert it to polygons. The Bake Texture ROP seems to prefer polygons. I've attached an updated file below.
Also, as an added alternative to look into, You may be able to utilize COPs to directly read the color values from your geometry. Here's a thread [www.sidefx.com] that has an example.
Or, I don't know if Unity supports volume velocity fields directly, but if you look at this Unreal tutorial [www.sidefx.com], you may be able to just export the volume field directly in to your game.
Lastly, just a bonus for those looking into the baking workflow, here's [houdini.indyzone.jp] a very simple tutorial on baking. Although it is in japanese, the images are very easy to follow.
I hope this helps!
- galagast
- Member
- 252 posts
- Joined:
- Offline
- dreamerflyer19
- Member
- 54 posts
- Joined: Oct. 2017
- Offline
- galagast
- Member
- 252 posts
- Joined:
- Offline
I had a quick look at your file.
Go to Bake Texture > Images > Main and check the ‘color’ image plane.
You have Light Exports set to ‘Merge all light into single channel’
Just set it back to the default ‘No light exports’
Did you set that yourself?
That would not work, because the simple shader I used that generates the ‘color’ plane does not compute lighting.
Hopefully that fixed it.
Go to Bake Texture > Images > Main and check the ‘color’ image plane.
You have Light Exports set to ‘Merge all light into single channel’
Just set it back to the default ‘No light exports’
Did you set that yourself?
That would not work, because the simple shader I used that generates the ‘color’ plane does not compute lighting.
Hopefully that fixed it.
- dreamerflyer19
- Member
- 54 posts
- Joined: Oct. 2017
- Offline
galagaststill not work….
I had a quick look at your file.
Go to Bake Texture > Images > Main and check the ‘color’ image plane.
You have Light Exports set to ‘Merge all light into single channel’
Just set it back to the default ‘No light exports’Attachment Not Found
Did you set that yourself?
That would not work, because the simple shader I used that generates the ‘color’ plane does not compute lighting.
Hopefully that fixed it.
- galagast
- Member
- 252 posts
- Joined:
- Offline
That is odd.. I opened the file that you attached.
And the only thing I changed was the Light Exports setting I suggested.
Here's a capture of what I did:
As can be seen, I set the Light Exports to the default, then hit Render to MPlay. The results does show the velocity colors baked.
I wonder why it doesn't work on your end. Your file does show that we are using the same version of Houdini.
I attached the new file, could you open this and hit Render to MPlay, then check if you can see the ‘color’ image plane?
H16.5.268 Indie
And the only thing I changed was the Light Exports setting I suggested.
Here's a capture of what I did:
As can be seen, I set the Light Exports to the default, then hit Render to MPlay. The results does show the velocity colors baked.
I wonder why it doesn't work on your end. Your file does show that we are using the same version of Houdini.
I attached the new file, could you open this and hit Render to MPlay, then check if you can see the ‘color’ image plane?
H16.5.268 Indie
- dreamerflyer19
- Member
- 54 posts
- Joined: Oct. 2017
- Offline
galagastThanks very much! it works! But i confused with this,what is different with color and cf in vex variable channel?and i save to jpg format ,not work.
That is odd.. I opened the file that you attached.
And the only thing I changed was the Light Exports setting I suggested.
Here's a capture of what I did:Attachment Not Found
As can be seen, I set the Light Exports to the default, then hit Render to MPlay. The results does show the velocity colors baked.
I wonder why it doesn't work on your end. Your file does show that we are using the same version of Houdini.
I attached the new file, could you open this and hit Render to MPlay, then check if you can see the ‘color’ image plane?
H16.5.268 Indie
Edited by dreamerflyer19 - Dec. 3, 2017 11:31:04
- galagast
- Member
- 252 posts
- Joined:
- Offline
-
- Quick Links