<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
	<channel>
		<title><![CDATA[Maratis forum - materials and meshes]]></title>
		<link>http://forum.maratis3d.com/viewtopic.php?id=36</link>
		<description><![CDATA[The most recent posts in materials and meshes.]]></description>
		<lastBuildDate>Fri, 25 Feb 2011 13:02:59 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: materials and meshes]]></title>
			<link>http://forum.maratis3d.com/viewtopic.php?pid=131#p131</link>
			<description><![CDATA[<p>Hi,</p><p>yes, mesh is the same for each cube, materials too,<br />there is no entities-materials, but you can duplicate the mesh and apply each copy to a different cube.</p><p>- or by using a different .mesh file where you can change the material value using a text editor or Blender</p><p>- or by code, creating a MMeshRef manually :</p><p>MMeshRef * meshRef = MMeshRef::getNew(NULL, filename);<br />level-&gt;getMeshManager()-&gt;addRef(meshRef); // force without checking if the mesh already exist<br />meshRef-&gt;update();</p>]]></description>
			<author><![CDATA[dummy@example.com (anael)]]></author>
			<pubDate>Fri, 25 Feb 2011 13:02:59 +0000</pubDate>
			<guid>http://forum.maratis3d.com/viewtopic.php?pid=131#p131</guid>
		</item>
		<item>
			<title><![CDATA[materials and meshes]]></title>
			<link>http://forum.maratis3d.com/viewtopic.php?pid=130#p130</link>
			<description><![CDATA[<p>Hi, <br />I&#039;m asking this question in the forum so other people can benefit.</p><p>I&#039;m trying to create a simple c++ app (starting the ManualUse example) to play a little with the physics and investigate on camera manipulators.<br />The app simply create a bunch of cubes and make them fall into a box<br />It has been very simple (with your help...) to setup the scene and make it running; but now I tried to assign a different color to each cube, setting the diffuse value</p><p>I tried with the following call:<br />box-&gt;getMesh()-&gt;getMaterial(0)-&gt;setDiffuse(0.6,0.5,0.4));</p><p>but this is affecting all the cubes, not only the one referenced by the *box entity pointer; the reason I believe is that one single mesh is used for all the cubes.<br />Is there a way to assign a different material to each entity, even if the entities refer to the same mesh?</p><p>thanks!!</p>]]></description>
			<author><![CDATA[dummy@example.com (dbacchet)]]></author>
			<pubDate>Fri, 25 Feb 2011 11:21:53 +0000</pubDate>
			<guid>http://forum.maratis3d.com/viewtopic.php?pid=130#p130</guid>
		</item>
	</channel>
</rss>
