<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Maratis forum - Light is present in Maratis editor, in project models are black]]></title>
	<link rel="self" href="http://forum.maratis3d.com/extern.php?action=feed&amp;tid=442&amp;type=atom"/>
	<updated>2012-09-13T13:20:47Z</updated>
	<generator>PunBB</generator>
	<id>http://forum.maratis3d.com/viewtopic.php?id=442</id>
		<entry>
			<title type="html"><![CDATA[Re: Light is present in Maratis editor, in project models are black]]></title>
			<link rel="alternate" href="http://forum.maratis3d.com/viewtopic.php?pid=2607#p2607"/>
			<content type="html"><![CDATA[<p>Yes, a spot cannot be more than 89.9 because it cannot be more than 180 degrees (fact 90x2 = 180° total angle)</p>]]></content>
			<author>
				<name><![CDATA[anael]]></name>
				<uri>http://forum.maratis3d.com/profile.php?id=2</uri>
			</author>
			<updated>2012-09-13T13:20:47Z</updated>
			<id>http://forum.maratis3d.com/viewtopic.php?pid=2607#p2607</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Light is present in Maratis editor, in project models are black]]></title>
			<link rel="alternate" href="http://forum.maratis3d.com/viewtopic.php?pid=2606#p2606"/>
			<content type="html"><![CDATA[<p>I tested my real app scene with one spot light with angle &lt; 90.0. It works fine on the device, light is working.<br />I will use this approach in my scenes for now (only one light in scene, spot, with angle &lt; 90.0).</p>]]></content>
			<author>
				<name><![CDATA[Petr]]></name>
				<uri>http://forum.maratis3d.com/profile.php?id=1081</uri>
			</author>
			<updated>2012-09-13T13:10:09Z</updated>
			<id>http://forum.maratis3d.com/viewtopic.php?pid=2606#p2606</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Light is present in Maratis editor, in project models are black]]></title>
			<link rel="alternate" href="http://forum.maratis3d.com/viewtopic.php?pid=2605#p2605"/>
			<content type="html"><![CDATA[<p>I tried to remove torch from scene , and lighting works.<br />Now I have in scene one mesh (box), one spot light with angle 89 and camera, and light works ok on the device. If I set spot angle of spot light to 90.0, light stops working.</p><p>On iOS simulator that code works fine both for 89 and 90 spot angles.</p>]]></content>
			<author>
				<name><![CDATA[Petr]]></name>
				<uri>http://forum.maratis3d.com/profile.php?id=1081</uri>
			</author>
			<updated>2012-09-13T12:45:13Z</updated>
			<id>http://forum.maratis3d.com/viewtopic.php?pid=2605#p2605</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Light is present in Maratis editor, in project models are black]]></title>
			<link rel="alternate" href="http://forum.maratis3d.com/viewtopic.php?pid=2604#p2604"/>
			<content type="html"><![CDATA[<p>Wait, I taught there was only one light in your scene,<br />if there is more than one I think I know what is going on,<br />in Maratis each entity use only the closest light around :</p><p>For desktop it&#039;s the 4 closest lights, but on iOS because it slower, it&#039;s only the closest.<br />So that&#039;s why you can see a different behavior than on Maratis editor.<br />Try to use less number of light for ios, or to be sure the lights radius don&#039;t overlap too much.</p>]]></content>
			<author>
				<name><![CDATA[anael]]></name>
				<uri>http://forum.maratis3d.com/profile.php?id=2</uri>
			</author>
			<updated>2012-09-13T12:38:09Z</updated>
			<id>http://forum.maratis3d.com/viewtopic.php?pid=2604#p2604</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Light is present in Maratis editor, in project models are black]]></title>
			<link rel="alternate" href="http://forum.maratis3d.com/viewtopic.php?pid=2603#p2603"/>
			<content type="html"><![CDATA[<p>Only difference I have found in execution when the spot angle &lt; 90 and when the spot angle is 90 is that <br /></p><div class="codebox"><pre><code>                    render-&gt;getLightSpotDirection(i, &amp;LightSpotDirection\[i\]);</code></pre></div><p>in MiOSStandradRenderer::drawDisplay&nbsp; line 405<br />returns non-zero vector when spot angle &lt; 90 and&nbsp; {0,0,0} when angle = 90<br />After that LightSpotDirection\[i\] is passed to shader, where is is used in computeLight.<br />May be there are other differences, but I couldn&#039;t find them.<br />In Simulator values of LightSpotDirection is the same as on the device, but the light is present for both scenes.<br />Also I cannot understand now how the presence of torch object affects on scene light.</p>]]></content>
			<author>
				<name><![CDATA[Petr]]></name>
				<uri>http://forum.maratis3d.com/profile.php?id=1081</uri>
			</author>
			<updated>2012-09-13T12:26:46Z</updated>
			<id>http://forum.maratis3d.com/viewtopic.php?pid=2603#p2603</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Light is present in Maratis editor, in project models are black]]></title>
			<link rel="alternate" href="http://forum.maratis3d.com/viewtopic.php?pid=2599#p2599"/>
			<content type="html"><![CDATA[<p>I have found that if I remove omni light (light above the box) from the scene, and move spot light above the box (so the box is lighted), light is work ok on the device.<br />I think the reason may be in cooperative behavior of spot light and torch object (latter has transparency in one of its sub meshes, as I noticed).</p><p>I found that if in addition I set spot angle of spot light to 90.0, light remains on editor/player, and disappears on device.</p>]]></content>
			<author>
				<name><![CDATA[Petr]]></name>
				<uri>http://forum.maratis3d.com/profile.php?id=1081</uri>
			</author>
			<updated>2012-09-13T09:34:38Z</updated>
			<id>http://forum.maratis3d.com/viewtopic.php?pid=2599#p2599</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Light is present in Maratis editor, in project models are black]]></title>
			<link rel="alternate" href="http://forum.maratis3d.com/viewtopic.php?pid=2597#p2597"/>
			<content type="html"><![CDATA[<div class="quotebox"><cite>anael wrote:</cite><blockquote><p>can you check that your camera is looking at the objects and that the clipping is correct,<br />also, just try the light with a big radius (in case)...</p><p>You are not using a custom shader with the mesh or something like that ?</p></blockquote></div><p>Al is correct as I can see with camera, and light radius is quite big.</p><p>I created small scene. <a href="http://www.sendspace.com/file/vvpqlb">scene</a><br />Light is ok on that scene both in editor,player and on the iOS device.<br />On device however the torch is not animating.<br />If I remove torch from scene or make the spot light&nbsp; non-spot or remove this spot light from scene, the box become black on the device, in editor and player all is ok.<br />On iOS Simualtor all is ok in all cases, so I think this somehow related to realization of&nbsp; GL ES on iOS devices.<br />I will try to find the reason of such behavior now and fix it.</p>]]></content>
			<author>
				<name><![CDATA[Petr]]></name>
				<uri>http://forum.maratis3d.com/profile.php?id=1081</uri>
			</author>
			<updated>2012-09-13T07:57:58Z</updated>
			<id>http://forum.maratis3d.com/viewtopic.php?pid=2597#p2597</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Light is present in Maratis editor, in project models are black]]></title>
			<link rel="alternate" href="http://forum.maratis3d.com/viewtopic.php?pid=2594#p2594"/>
			<content type="html"><![CDATA[<p>can you check that your camera is looking at the objects and that the clipping is correct,<br />also, just try the light with a big radius (in case)...</p><p>You are not using a custom shader with the mesh or something like that ?</p>]]></content>
			<author>
				<name><![CDATA[anael]]></name>
				<uri>http://forum.maratis3d.com/profile.php?id=2</uri>
			</author>
			<updated>2012-09-12T15:25:16Z</updated>
			<id>http://forum.maratis3d.com/viewtopic.php?pid=2594#p2594</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Light is present in Maratis editor, in project models are black]]></title>
			<link rel="alternate" href="http://forum.maratis3d.com/viewtopic.php?pid=2593#p2593"/>
			<content type="html"><![CDATA[<p>I found that if I add one of my models to Demos.mproj , lighting for whole scene works ok (include my model) both in Maratis Editor/Player and on my iOS device, <br /> and if I load&nbsp; my own scene (in that scene ~10 such models and ~ 5 lights) it&nbsp; displays fine in Maratis Editor/player, but models appears black (as without lighting) on device. <br />I&#039;m loading both scenes (Demos.mproj with my model and my scene) in the same project, so I think the code is ok, and error something in settings of my scene.<br />I tried to compare .mproj. files and .level files, but cannot find error.</p>]]></content>
			<author>
				<name><![CDATA[Petr]]></name>
				<uri>http://forum.maratis3d.com/profile.php?id=1081</uri>
			</author>
			<updated>2012-09-12T12:39:38Z</updated>
			<id>http://forum.maratis3d.com/viewtopic.php?pid=2593#p2593</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Light is present in Maratis editor, in project models are black]]></title>
			<link rel="alternate" href="http://forum.maratis3d.com/viewtopic.php?pid=2587#p2587"/>
			<content type="html"><![CDATA[<p>I have one light in my scene in Maratis editor. Models are look fine.<br />When I&#039;m loading project on iOS, models are black (looks like there is no light in scene).<br />I set breakpoint in drawScene method, and I see that scene contains one light (lSize = 1).<br />Looks like that models textures are loading fine (I added debug output in MMeshRef ).<br />Where should I look at to solve this problem?<br />What may be wrong?</p>]]></content>
			<author>
				<name><![CDATA[Petr]]></name>
				<uri>http://forum.maratis3d.com/profile.php?id=1081</uri>
			</author>
			<updated>2012-09-12T08:24:09Z</updated>
			<id>http://forum.maratis3d.com/viewtopic.php?pid=2587#p2587</id>
		</entry>
</feed>
