Re: Few Questions

Matthieu Kraus <[email protected]> Tue, 13 May 2014 17:41:09 +0200
Newsgroups gmane.comp.graphics.crystalspace.devel
Message-ID <[email protected]>
--===============8473784035605271814==
Content-Type: multipart/alternative;
	boundary="----=_NextPart_000_0037_01CF6ED2.869A7250"
Content-Language: en-us

------=_NextPart_000_0037_01CF6ED2.869A7250
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

1)      None that I know of =E2=80=93 shaders are data-parallel and =
accordingly you only get the information of the piece you=E2=80=99re =
processing

2)      Filtering is disabled for heightmaps iirc (to prevent awkward =
interpolation) =E2=80=93 you can do it manually, though (query the =
adjacent texels and interpolate manually using the properly converted =
height value)=20

3)      Once you have the mesh you can set a material on it (either =
create a new one and set the shader, textures, etc. as desired or grab =
one you loaded or got elsewhere and simply set it on the mesh)

=20

From: Naman Gupta [mailto:[email protected]]=20
Sent: Monday, May 12, 2014 22:12
To: [email protected]
Subject: [Crystal-develop] Few Questions

=20

Hi,

    I encountered few problem would appreciate if someone could answer.

1). Is there a way to retrieve information about the adjacent vertex in =
vertex shader?

2). The water waves are created by translating heightmaps in waterdemo2, =
upon closing looking, you could see the waves aren't translating =
smoothly because color values are discrete. This is the shader code
" ...
vec2 Texcord =3D texCoord + waveInput.time*10.0 ;
position_object.y +=3D texture2D(texHeight, Texcord/128).r * 2.0;
..."
Is there are way to like interpolate the values between two consecutive =
colors to make waves go smoother? =20

2). How do we add texture to the inner side of a box generated like this =

"...
  CS::Geometry::DensityTextureMapper mapper (0.3f);

  CS::Geometry::TesselatedBox box (csVector3 (0, 0, 0), csVector3 (10, =
10, 10));

  box.SetLevel (3);

  box.SetMapper (&mapper);

  box.SetFlags (CS::Geometry::Primitives::CS_PRIMBOX_INSIDE);

=20

  // Now we make a factory and a mesh at once.

  csRef<iMeshWrapper> walls =3D   =
CS::Geometry::GeneralMeshBuilder::CreateFactoryAndMesh (

             engine, room, "walls", "walls_factory", &box);
..."

I'm trying to make a skybox.=20


Also, Could someone get the search functionality working on the =
documentation given in the link =
"http://www.crystalspace3d.org/docs/online/manual/"?

~N


------=_NextPart_000_0037_01CF6ED2.869A7250
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<html xmlns:v=3D"urn:schemas-microsoft-com:vml" =
xmlns:o=3D"urn:schemas-microsoft-com:office:office" =
xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns:m=3D"http://schemas.microsoft.com/office/2004/12/omml" =
xmlns=3D"http://www.w3.org/TR/REC-html40"><head><meta =
http-equiv=3DContent-Type content=3D"text/html; charset=3Dutf-8"><meta =
name=3DGenerator content=3D"Microsoft Word 15 (filtered =
medium)"><style><!--
/* Font Definitions */
@font-face
	{font-family:"Cambria Math";
	panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
	{font-family:Calibri;
	panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0in;
	margin-bottom:.0001pt;
	font-size:12.0pt;
	font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
	{mso-style-priority:99;
	color:blue;
	text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
	{mso-style-priority:99;
	color:purple;
	text-decoration:underline;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
	{mso-style-priority:34;
	margin-top:0in;
	margin-right:0in;
	margin-bottom:0in;
	margin-left:.5in;
	margin-bottom:.0001pt;
	font-size:12.0pt;
	font-family:"Times New Roman","serif";}
span.EmailStyle17
	{mso-style-type:personal-reply;
	font-family:"Calibri","sans-serif";
	color:#1F497D;}
.MsoChpDefault
	{mso-style-type:export-only;
	font-family:"Calibri","sans-serif";}
@page WordSection1
	{size:8.5in 11.0in;
	margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
	{page:WordSection1;}
/* List Definitions */
@list l0
	{mso-list-id:1448424008;
	mso-list-type:hybrid;
	mso-list-template-ids:-1684106582 67698705 67698713 67698715 67698703 =
67698713 67698715 67698703 67698713 67698715;}
@list l0:level1
	{mso-level-text:"%1\)";
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	text-indent:-.25in;}
@list l0:level2
	{mso-level-number-format:alpha-lower;
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	text-indent:-.25in;}
@list l0:level3
	{mso-level-number-format:roman-lower;
	mso-level-tab-stop:none;
	mso-level-number-position:right;
	text-indent:-9.0pt;}
@list l0:level4
	{mso-level-tab-stop:none;
	mso-level-number-position:left;
	text-indent:-.25in;}
@list l0:level5
	{mso-level-number-format:alpha-lower;
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	text-indent:-.25in;}
@list l0:level6
	{mso-level-number-format:roman-lower;
	mso-level-tab-stop:none;
	mso-level-number-position:right;
	text-indent:-9.0pt;}
@list l0:level7
	{mso-level-tab-stop:none;
	mso-level-number-position:left;
	text-indent:-.25in;}
@list l0:level8
	{mso-level-number-format:alpha-lower;
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	text-indent:-.25in;}
@list l0:level9
	{mso-level-number-format:roman-lower;
	mso-level-tab-stop:none;
	mso-level-number-position:right;
	text-indent:-9.0pt;}
ol
	{margin-bottom:0in;}
ul
	{margin-bottom:0in;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext=3D"edit" spidmax=3D"1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext=3D"edit">
<o:idmap v:ext=3D"edit" data=3D"1" />
</o:shapelayout></xml><![endif]--></head><body lang=3DEN-US link=3Dblue =
vlink=3Dpurple><div class=3DWordSection1><p class=3DMsoListParagraph =
style=3D'text-indent:-.25in;mso-list:l0 level1 lfo1'><![if =
!supportLists]><span =
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497=
D'><span style=3D'mso-list:Ignore'>1)<span style=3D'font:7.0pt "Times =
New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
</span></span></span><![endif]><span =
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497=
D'>None that I know of =E2=80=93 shaders are data-parallel and =
accordingly you only get the information of the piece you=E2=80=99re =
processing<o:p></o:p></span></p><p class=3DMsoListParagraph =
style=3D'text-indent:-.25in;mso-list:l0 level1 lfo1'><![if =
!supportLists]><span =
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497=
D'><span style=3D'mso-list:Ignore'>2)<span style=3D'font:7.0pt "Times =
New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
</span></span></span><![endif]><span =
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497=
D'>Filtering is disabled for heightmaps iirc (to prevent awkward =
interpolation) =E2=80=93 you can do it manually, though (query the =
adjacent texels and interpolate manually using the properly converted =
height value) <o:p></o:p></span></p><p class=3DMsoListParagraph =
style=3D'text-indent:-.25in;mso-list:l0 level1 lfo1'><![if =
!supportLists]><span =
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497=
D'><span style=3D'mso-list:Ignore'>3)<span style=3D'font:7.0pt "Times =
New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
</span></span></span><![endif]><span =
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497=
D'>Once you have the mesh you can set a material on it (either create a =
new one and set the shader, textures, etc. as desired or grab one you =
loaded or got elsewhere and simply set it on the =
mesh)<o:p></o:p></span></p><p class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497=
D'><o:p>&nbsp;</o:p></span></p><p class=3DMsoNormal><b><span =
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif"'>From:</span=
></b><span =
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif"'> Naman =
Gupta [mailto:[email protected]] <br><b>Sent:</b> Monday, May 12, =
2014 22:12<br><b>To:</b> =
[email protected]<br><b>Subject:</b> =
[Crystal-develop] Few Questions<o:p></o:p></span></p><p =
class=3DMsoNormal><o:p>&nbsp;</o:p></p><div><p =
class=3DMsoNormal>Hi,<br><br>&nbsp; &nbsp; I encountered few problem =
would appreciate if someone could answer.<br><br>1). Is there a way to =
retrieve information&nbsp;about the adjacent vertex in vertex =
shader?<br><br>2). The water waves are created by translating heightmaps =
in waterdemo2, upon closing looking, you could see the waves aren't =
translating smoothly because color values are discrete. This is the =
shader code<br>&quot; ...<br>vec2 Texcord =3D texCoord + =
waveInput.time*10.0 ;<br>position_object.y +=3D texture2D(texHeight, =
Texcord/128).r * 2.0;<br>...&quot;<br>Is there are way to like =
interpolate the values between two consecutive colors to make waves go =
smoother?&nbsp;&nbsp;<br><br>2). How do we add texture to the inner side =
of a box generated like this&nbsp;<br>&quot;...<br>&nbsp; =
CS::Geometry::DensityTextureMapper mapper (0.3f);<o:p></o:p></p><div><p =
class=3DMsoNormal>&nbsp; CS::Geometry::TesselatedBox box (csVector3 (0, =
0, 0), csVector3 (10, 10, 10));<o:p></o:p></p></div><div><p =
class=3DMsoNormal>&nbsp; box.SetLevel (3);<o:p></o:p></p></div><div><p =
class=3DMsoNormal>&nbsp; box.SetMapper =
(&amp;mapper);<o:p></o:p></p></div><div><p class=3DMsoNormal>&nbsp; =
box.SetFlags =
(CS::Geometry::Primitives::CS_PRIMBOX_INSIDE);<o:p></o:p></p></div><div><=
p class=3DMsoNormal><o:p>&nbsp;</o:p></p></div><div><p =
class=3DMsoNormal>&nbsp; // Now we make a factory and a mesh at =
once.<o:p></o:p></p></div><div><p class=3DMsoNormal>&nbsp; =
csRef&lt;iMeshWrapper&gt; walls =3D &nbsp; =
CS::Geometry::GeneralMeshBuilder::CreateFactoryAndMesh =
(<o:p></o:p></p></div><p =
class=3DMsoNormal>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0 &nbsp;engine, room, &quot;walls&quot;, =
&quot;walls_factory&quot;, &amp;box);<br>...&quot;<br><br>I'm trying to =
make a skybox.&nbsp;<br><br><br>Also, Could someone get the search =
functionality working on the documentation given in the link &quot;<a =
href=3D"http://www.crystalspace3d.org/docs/online/manual/">http://www.cry=
stalspace3d.org/docs/online/manual/</a>&quot;?<br><br>~N<o:p></o:p></p></=
div></div></body></html>
------=_NextPart_000_0037_01CF6ED2.869A7250--


--===============8473784035605271814==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

------------------------------------------------------------------------------
"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.
Get unparalleled scalability from the best Selenium testing platform available
Simple to use. Nothing to install. Get started now for free."
http://p.sf.net/sfu/SauceLabs
--===============8473784035605271814==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Crystal-develop mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/crystal-develop

--===============8473784035605271814==--