<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Ofelia Volumetrics Example]]></title><description><![CDATA[<p>I managed to add the ofxVolumetrics addon to Ofelia and adapt the example.<br />
Here is the patch and an explanation how to add addons to Ofelia:<br />
<a href="https://github.com/Jonathhhan/volumetrics_example_ofelia" rel="nofollow">https://github.com/Jonathhhan/volumetrics_example_ofelia</a><br />
Maybe this is a good foundation for  making a 3d game of life that runs on a shader...<br />
A funny thing (but good to know), that took a lot of time, was that it is not allowed to use function names in ofxOfeliaPdBindings.h that include &quot;upd&quot; - and i was using updateVolumeData() from the addon. I had to change it to loadVolumeData (or something else without &quot;upd&quot;).</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/13237/ofelia-volumetrics-example</link><generator>RSS for Node</generator><lastBuildDate>Sat, 16 May 2026 18:10:08 GMT</lastBuildDate><atom:link href="http://forum.pdpatchrepo.info/topic/13237.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 13 Jan 2021 21:36:04 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Ofelia Volumetrics Example on Wed, 13 Jan 2021 21:47:16 GMT]]></title><description><![CDATA[<p>I managed to add the ofxVolumetrics addon to Ofelia and adapt the example.<br />
Here is the patch and an explanation how to add addons to Ofelia:<br />
<a href="https://github.com/Jonathhhan/volumetrics_example_ofelia" rel="nofollow">https://github.com/Jonathhhan/volumetrics_example_ofelia</a><br />
Maybe this is a good foundation for  making a 3d game of life that runs on a shader...<br />
A funny thing (but good to know), that took a lot of time, was that it is not allowed to use function names in ofxOfeliaPdBindings.h that include &quot;upd&quot; - and i was using updateVolumeData() from the addon. I had to change it to loadVolumeData (or something else without &quot;upd&quot;).</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/13237/ofelia-volumetrics-example</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/13237/ofelia-volumetrics-example</guid><dc:creator><![CDATA[Jona]]></dc:creator><pubDate>Wed, 13 Jan 2021 21:47:16 GMT</pubDate></item><item><title><![CDATA[Reply to Ofelia Volumetrics Example on Thu, 14 Jan 2021 13:22:21 GMT]]></title><description><![CDATA[<p>Second example, basically the same patch, but with ofxCameraAnaglyph for a 3d view...<br />
<a href="https://github.com/Jonathhhan/volumetrics_anaglyph_example_ofelia" rel="nofollow">https://github.com/Jonathhhan/volumetrics_anaglyph_example_ofelia</a><br />
Here is a screenshot:</p>
<p><img src="/uploads/files/1610630520142-volumetrics_anaglyph_ofelia.png" alt="volumetrics_anaglyph_ofelia.png" class="img-responsive img-markdown" /></p>
]]></description><link>http://forum.pdpatchrepo.info/topic/13237/ofelia-volumetrics-example/2</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/13237/ofelia-volumetrics-example/2</guid><dc:creator><![CDATA[Jona]]></dc:creator><pubDate>Thu, 14 Jan 2021 13:22:21 GMT</pubDate></item><item><title><![CDATA[Reply to Ofelia Volumetrics Example on Sat, 16 Jan 2021 00:22:30 GMT]]></title><description><![CDATA[<p>I tried to create the shader for a 3d game of life (adapted from my working 2d game of life shader <a href="https://github.com/Jonathhhan/PDGameofLife-shaderVersion-" rel="nofollow">https://github.com/Jonathhhan/PDGameofLife-shaderVersion-</a>):</p>
<pre><code>#version 120

uniform sampler3D Tex0;
uniform vec3 resolution;
uniform float lCell_0;
uniform float lCell_1;
uniform float lCell_2;
uniform float lCell_3;
uniform float lCell_4;
uniform float lCell_5;
uniform float lCell_6;
uniform float lCell_7;
uniform float lCell_8;
uniform float lCell_9;
uniform float lCell_10;
uniform float lCell_11;
uniform float lCell_12;
uniform float lCell_13;
uniform float lCell_14;
uniform float lCell_15;
uniform float lCell_16;
uniform float lCell_17;
uniform float lCell_18;
uniform float lCell_19;
uniform float lCell_20;
uniform float lCell_21;
uniform float lCell_22;
uniform float lCell_23;
uniform float lCell_24;
uniform float lCell_25;
uniform float lCell_26;
uniform float dCell_0;
uniform float dCell_1;
uniform float dCell_2;
uniform float dCell_3;
uniform float dCell_4;
uniform float dCell_5;
uniform float dCell_6;
uniform float dCell_7;
uniform float dCell_8;
uniform float dCell_9;
uniform float dCell_10;
uniform float dCell_11;
uniform float dCell_12;
uniform float dCell_13;
uniform float dCell_14;
uniform float dCell_15;
uniform float dCell_16;
uniform float dCell_17;
uniform float dCell_18;
uniform float dCell_19;
uniform float dCell_20;
uniform float dCell_21;
uniform float dCell_22;
uniform float dCell_23;
uniform float dCell_24;
uniform float dCell_25;
uniform float dCell_26;

vec2 rule[27] = vec2[27](
    vec2(lCell_0, dCell_0),
    vec2(lCell_1, dCell_1),
    vec2(lCell_2, dCell_2),
    vec2(lCell_3, dCell_3),
    vec2(lCell_4, dCell_4),
    vec2(lCell_5, dCell_5),
    vec2(lCell_6, dCell_6),
    vec2(lCell_7, dCell_7),
    vec2(lCell_8, dCell_8),
    vec2(lCell_9, dCell_9),
    vec2(lCell_10, dCell_10),
    vec2(lCell_11, dCell_11),
    vec2(lCell_12, dCell_12),
    vec2(lCell_13, dCell_13),
    vec2(lCell_14, dCell_14),
    vec2(lCell_15, dCell_15),
    vec2(lCell_16, dCell_16),
    vec2(lCell_17, dCell_17),
    vec2(lCell_18, dCell_18),
    vec2(lCell_19, dCell_19),
    vec2(lCell_20, dCell_20),
    vec2(lCell_21, dCell_21),
    vec2(lCell_22, dCell_22),
    vec2(lCell_23, dCell_23),
    vec2(lCell_24, dCell_24),
    vec2(lCell_25, dCell_25),
    vec2(lCell_26, dCell_26)
);

int get(int x, int y, int z) {
    return int(texture3D(Tex0, (gl_FragCoord.xyz + vec3(x, y, z)) / resolution).r);
}

void main() {
    int sum = 
    get(-1, -1, -1) +
    get(-1,  0, -1) +
    get(-1,  1, -1) +
    get( 0, -1, -1) +
    get( 0,  1, -1) +
    get( 1, -1, -1) +
    get( 1,  0, -1) +
    get( 1,  1, -1) +
    get(-1, -1, 0) +
    get(-1,  0, 0) +
    get(-1,  1, 0) +
    get( 0, -1, 0) +
    get( 0,  1, 0) +
    get( 1, -1, 0) +
    get( 1,  0, 0) +
    get( 1,  1, 0) +
    get(-1, -1, 1) +
    get(-1,  0, 1) +
    get(-1,  1, 1) +
    get( 0, -1, 1) +
    get( 0,  1, 1) +
    get( 1, -1, 1) +
    get( 1,  0, 1) +
    get( 1,  1, 1);
    vec2 r = rule[sum];
    if (get(0, 0, 0) == 1) {
        gl_FragColor = vec4(r.x, r.x, r.x, r.x);
    }
        else  {
            gl_FragColor = vec4(r.y, r.y, r.y, r.y);
        }
</code></pre>
<p>But it does not work. <img class="emoji emoji-extended" src="http://forum.pdpatchrepo.info/plugins/nodebb-plugin-emoji-extended/images/wink.png" title=";)" alt=";)" /><br />
Perhaps I did something wrong with the shader, but I think it does not work because ofFbo() can not store 3d textures.<br />
Not really sure about that...</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/13237/ofelia-volumetrics-example/3</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/13237/ofelia-volumetrics-example/3</guid><dc:creator><![CDATA[Jona]]></dc:creator><pubDate>Sat, 16 Jan 2021 00:22:30 GMT</pubDate></item><item><title><![CDATA[Reply to Ofelia Volumetrics Example on Sun, 17 Jan 2021 11:04:27 GMT]]></title><description><![CDATA[<p>Very cool to see some of Ofelia's extensibility -- and nice to see more shader examples (even if 3d seems not fully supported yet).</p>
<p>hjh</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/13237/ofelia-volumetrics-example/4</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/13237/ofelia-volumetrics-example/4</guid><dc:creator><![CDATA[ddw_music]]></dc:creator><pubDate>Sun, 17 Jan 2021 11:04:27 GMT</pubDate></item><item><title><![CDATA[Reply to Ofelia Volumetrics Example on Mon, 18 Jan 2021 22:25:24 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-a" href="http://forum.pdpatchrepo.info/user/ddw_music">@ddw_music</a> i think the 3d game of life shader works now. not that it is not supported, i just did not understand it. <img class="emoji emoji-extended" src="http://forum.pdpatchrepo.info/plugins/nodebb-plugin-emoji-extended/images/wink.png" title=";)" alt=";)" /> The only thing is, that ofFbo and ofTexture do not support 3d textures, but they need to be created with openGL (as far as I know, and what I did with help from ofxVolumetrics).<br />
I only did not find a way to paint into the 3d texture yet, right know I need a .png image for every z dimension.<br />
Here is a short example:</p>
<p><div class="embed-container"><iframe src="//www.youtube.com/embed/V0WXRFHRFIo" width="640" height="360" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe></div></p>
<p><a href="https://github.com/Jonathhhan/PureDataGameOfLife3d" rel="nofollow">https://github.com/Jonathhhan/PureDataGameOfLife3d</a></p>
]]></description><link>http://forum.pdpatchrepo.info/topic/13237/ofelia-volumetrics-example/5</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/13237/ofelia-volumetrics-example/5</guid><dc:creator><![CDATA[Jona]]></dc:creator><pubDate>Mon, 18 Jan 2021 22:25:24 GMT</pubDate></item></channel></rss>