[gimp-help] Draft for Normal Map filter



commit 6570ba702594e3fe164ccb5a2449264a46556de6
Author: Julien Hardelin <jhardlin orange fr>
Date:   Mon Dec 2 08:06:58 2019 +0100

    Draft for Normal Map filter

 .../C/filters/examples/generic/normal_map-GG+Z.jpg | Bin 0 -> 16909 bytes
 .../filters/examples/generic/normal_map-GGnoZ.jpg  | Bin 0 -> 15427 bytes
 .../examples/generic/normal_map-defaults.jpg       | Bin 0 -> 15679 bytes
 .../C/filters/examples/generic/normal_map-flip.jpg | Bin 0 -> 15772 bytes
 .../C/filters/examples/generic/normal_map-none.png | Bin 0 -> 509 bytes
 .../filters/examples/generic/normal_map-scale.jpg  | Bin 0 -> 8521 bytes
 images/C/filters/generic/normal_map-dialog.png     | Bin 0 -> 28842 bytes
 src/filters/generic.xml                            |   3 +-
 src/filters/generic/normal-map.xml                 | 215 +++++++++++++++++++++
 9 files changed, 217 insertions(+), 1 deletion(-)
---
diff --git a/images/C/filters/examples/generic/normal_map-GG+Z.jpg 
b/images/C/filters/examples/generic/normal_map-GG+Z.jpg
new file mode 100644
index 000000000..b8dd8bb62
Binary files /dev/null and b/images/C/filters/examples/generic/normal_map-GG+Z.jpg differ
diff --git a/images/C/filters/examples/generic/normal_map-GGnoZ.jpg 
b/images/C/filters/examples/generic/normal_map-GGnoZ.jpg
new file mode 100644
index 000000000..c0e1cc417
Binary files /dev/null and b/images/C/filters/examples/generic/normal_map-GGnoZ.jpg differ
diff --git a/images/C/filters/examples/generic/normal_map-defaults.jpg 
b/images/C/filters/examples/generic/normal_map-defaults.jpg
new file mode 100644
index 000000000..7be355aa5
Binary files /dev/null and b/images/C/filters/examples/generic/normal_map-defaults.jpg differ
diff --git a/images/C/filters/examples/generic/normal_map-flip.jpg 
b/images/C/filters/examples/generic/normal_map-flip.jpg
new file mode 100644
index 000000000..22031ff74
Binary files /dev/null and b/images/C/filters/examples/generic/normal_map-flip.jpg differ
diff --git a/images/C/filters/examples/generic/normal_map-none.png 
b/images/C/filters/examples/generic/normal_map-none.png
new file mode 100644
index 000000000..be12a6fa1
Binary files /dev/null and b/images/C/filters/examples/generic/normal_map-none.png differ
diff --git a/images/C/filters/examples/generic/normal_map-scale.jpg 
b/images/C/filters/examples/generic/normal_map-scale.jpg
new file mode 100644
index 000000000..685ff459e
Binary files /dev/null and b/images/C/filters/examples/generic/normal_map-scale.jpg differ
diff --git a/images/C/filters/generic/normal_map-dialog.png b/images/C/filters/generic/normal_map-dialog.png
new file mode 100644
index 000000000..b703a6236
Binary files /dev/null and b/images/C/filters/generic/normal_map-dialog.png differ
diff --git a/src/filters/generic.xml b/src/filters/generic.xml
index c65a2dad7..8c4df37ed 100644
--- a/src/filters/generic.xml
+++ b/src/filters/generic.xml
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.docbook.org/xml/4.3/docbookx.dtd";>
 <!-- section history:
-  050901 de added by axel.wernicke
+  2019-11-27 j.h: add Normal Map
 -->
 <sect1 xmlns:xi="http://www.w3.org/2001/XInclude"; id="filters-generic">
   <title>Generic Filters</title>
@@ -10,6 +10,7 @@
   <xi:include href="generic/convol-matrix.xml"/>
   <xi:include href="generic/distance-map.xml"/>
   <xi:include href="generic/gegl-graph.xml"/>
+  <xi:include href="generic/normal-map.xml"/>
   <xi:include href="generic/dilate.xml"/>
   <xi:include href="generic/erode.xml"/>
 </sect1>
diff --git a/src/filters/generic/normal-map.xml b/src/filters/generic/normal-map.xml
new file mode 100644
index 000000000..a18a5d2da
--- /dev/null
+++ b/src/filters/generic/normal-map.xml
@@ -0,0 +1,215 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sect2 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
+                       "http://www.docbook.org/xml/4.3/docbookx.dtd";>
+<!-- section history:
+  2019-11-26 j.h create
+-->
+
+<sect2 xmlns:xi="http://www.w3.org/2001/XInclude"; id="gimp-filter-normal-map">
+  <title>Normal Map</title>
+
+  <indexterm>
+    <primary>Filters</primary>
+    <secondary>Generic</secondary>
+    <tertiary>Normal Map</tertiary>
+  </indexterm>
+  <indexterm>
+    <primary>Normal Map</primary>
+  </indexterm>
+  
+  <sect3>
+    <title>Overview</title>
+    <para>
+      This filter generates a <emphasis>normal map</emphasis> from a 
+      <emphasis>height map</emphasis>. It's early initial work and a lot more 
+      is expected to be done.
+    </para>
+    <para>
+      We will use an height map created with 
+      <xref linkend="gimp-filter-noise-simplex"/>:
+      <figure>
+        <title>Normal Map Example</title>
+        <mediaobject>
+          <imageobject>
+            <imagedata format="PNG"
+       fileref="images/filters/examples/render/simplex_noise-default.png"/>
+          </imageobject>
+          <caption>
+            <para>
+              The height map
+            </para>
+          </caption>
+        </mediaobject>
+        <mediaobject>
+          <imageobject>
+            <imagedata format="JPG"
+          fileref="images/filters/examples/generic/normal_map-defaults.jpg"/>
+          </imageobject>
+          <caption>
+            <para>
+              Filter applied with default options, giving the Normal Map
+            </para>
+          </caption>
+        </mediaobject>
+      </figure>
+    </para>
+      
+  </sect3>
+  
+  <sect3>
+    <title>Activating the filter</title>
+    <para>
+      This filter is found in the image window menu under
+      <menuchoice>
+        <guimenu>Filters</guimenu>
+        <guisubmenu>Generic</guisubmenu>
+        <guimenuitem>Normal Map…</guimenuitem>
+      </menuchoice>.
+    </para>
+  </sect3>
+  
+  <sect3>
+    <title>Options</title>
+    <figure>
+      <title><quote>Normal Map</quote> options</title>
+      <mediaobject>
+        <imageobject>
+          <imagedata format="PNG"
+            fileref="images/filters/generic/normal_map-dialog.png"/>
+        </imageobject>
+      </mediaobject>
+    </figure>
+    <variablelist>
+      <varlistentry>
+        <term>Presets, Preview, Split view</term>
+        <listitem>
+          <xi:include href="../about-common-features.xml"/>
+        </listitem>
+      </varlistentry>
+      <varlistentry>
+        <term>Scale</term>
+        <listitem>
+          <para>
+            The amount by which to scale the heights values: increase or 
+            decrease bumps.
+          </para>
+          <para>
+            <mediaobject>
+              <imageobject>
+                <imagedata format="JPG"
+             fileref="images/filters/examples/generic/normal_map-scale.jpg"/>
+              </imageobject>
+              <caption>
+                <para>
+                  Scale = 2
+                </para>
+              </caption>
+            </mediaobject>
+          </para>
+        </listitem>
+      </varlistentry>
+      <varlistentry>
+        <term>X, Y Component</term>
+        <listitem>
+          <para>
+            The component used for X, Y coordinates: you can choose between the 
+            three RGB colors for the bumps.
+          </para>
+          <para>
+            Note that if you change these values, new colors are added to the 
+            existing colors, giving the complementary colors. 
+          </para>
+          <!--<para>
+            <mediaobject>
+              <imageobject>
+                <imagedata format="PNG"
+              fileref="images/filters/examples/generic/normal_map-component.png"/>
+              </imageobject>
+              <caption>
+                <para>
+                  
+                </para>
+              </caption>
+            </mediaobject>
+          </para>-->
+        </listitem>
+      </varlistentry>
+      <varlistentry>
+        <term>Flip X, Y</term>
+        <listitem>
+          <para>
+            Flip the X, Y coordinates: flip bumps colors, horizontally and 
+            vertically. Bumps have a clear border and an opposite dark border, 
+            giving a feeling that light comes from a certain direction. To see 
+            bumps instead of hollows, light must come from the upper left 
+            corner; play with Flip X and Flip Y to get this lighting.
+          </para>
+          <para>
+            <mediaobject>
+              <imageobject>
+                <imagedata format="JPG"
+                  fileref="images/filters/examples/generic/normal_map-flip.jpg"/>
+              </imageobject>
+              <caption>
+                <para>
+                  After playing with Flip X and Flip Y
+                </para>
+              </caption>
+            </mediaobject>
+          </para>
+        </listitem>
+      </varlistentry>
+      <varlistentry>
+        <term>Full Z Range</term>
+        <listitem>
+          <para>
+            Use the full [0, 1] range to encode the Z coordinates: You can 
+            get a more abrupt color gradient.
+          </para>
+          <para>
+            <mediaobject>
+              <imageobject>
+                <imagedata format="JPG"
+            fileref="images/filters/examples/generic/normal_map-GG+Z.jpg"/>
+              </imageobject>
+              <caption>
+                <para>
+                  TQDO
+                </para>
+              </caption>
+            </mediaobject>
+          </para>
+        </listitem>
+      </varlistentry>
+      <varlistentry>
+        <term>Tileable</term>
+        <listitem>
+          <para>
+            Generate a tileable map:
+          </para>
+          <para>
+            <mediaobject>
+              <imageobject>
+                <imagedata format="PNG"
+          fileref="images/filters/examples/generic/normal_map-none.png"/>
+              </imageobject>
+              <caption>
+                <para>
+                  TODO
+                </para>
+              </caption>
+            </mediaobject>
+          </para>
+        </listitem>
+      </varlistentry>
+      <varlistentry>
+        <term>Clipping</term>
+        <listitem>
+          <para>
+            TODO
+          </para>
+        </listitem>
+      </varlistentry>
+    </variablelist>
+  </sect3>
+</sect2>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]