<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[GMan's Mods & Stuff — Directional Lighting?]]></title>
		<link>https://gprogs.com/viewtopic.php?id=67</link>
		<atom:link href="https://gprogs.com/extern.php?action=feed&amp;tid=67&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in Directional Lighting?.]]></description>
		<lastBuildDate>Tue, 22 Aug 2006 00:16:08 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Directional Lighting?]]></title>
			<link>https://gprogs.com/viewtopic.php?pid=401#p401</link>
			<description><![CDATA[]]></description>
			<author><![CDATA[null@example.com (gman)]]></author>
			<pubDate>Tue, 22 Aug 2006 00:16:08 +0000</pubDate>
			<guid>https://gprogs.com/viewtopic.php?pid=401#p401</guid>
		</item>
		<item>
			<title><![CDATA[Re: Directional Lighting?]]></title>
			<link>https://gprogs.com/viewtopic.php?pid=399#p399</link>
			<description><![CDATA[<p>I still need to create a Directional Light. I have gotten a light to show.<br />If I use the Point or Directional Light, the light does&#039;nt appear at the correct position or rotation. Also the specular and diffuse colors don&#039;t show, only the ambient.<br />The Blide IDE returns &quot;Invalid Directionial Light Direction&quot; but still executes.<br />What could be wrong with my code?<br /></p><div class="codebox"><pre><code>&#039;Add Directional Light
Local LightNode:T_irrILightSceneNode = Scene.addLightSceneNode()
Local Light:T_irrSLight = LightNode.getLightData()
Light.setType(ELT_DIRECTIONAL)
Light.getAmbientColor().set(.5, .7, .5)
Light.getDiffuseColor().set(0, .5, 0)
Light.getSpecularColor().set(.5, .5, 1)
Light.getPosition().set(0, 0, 10)
&#039;light.setRadius(30)</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (HondaDirtBiker)]]></author>
			<pubDate>Sat, 19 Aug 2006 17:07:34 +0000</pubDate>
			<guid>https://gprogs.com/viewtopic.php?pid=399#p399</guid>
		</item>
		<item>
			<title><![CDATA[Re: Directional Lighting?]]></title>
			<link>https://gprogs.com/viewtopic.php?pid=381#p381</link>
			<description><![CDATA[<p>there is unfortunately no access to the angles.&nbsp; there are only two native light types in Irrlicht, point and directional.&nbsp; for directional, the position of the light is the vector the light is coming from.&nbsp; point emits light in all directions, but only for the radius the light is set at.&nbsp; use setRadius() to set the radius.&nbsp; to get at the colors, you need to use the get() methods on SLight.<br /></p><div class="codebox"><pre><code>Method getAmbientColor:T_irrSColorf()
Method getDiffuseColor:T_irrSColorf()    
Method getSpecularColor:T_irrSColorf()</code></pre></div><p>you then use the returned T_irrSColorf to set the values.&nbsp; so it looks something like:<br /></p><div class="codebox"><pre><code>light.getAmbientColor().set(.4,0,.8)</code></pre></div><p>HTH!&nbsp; love seeing folks using Irrlicht <img src="https://gprogs.com/img/smilies/smile.png" width="15" height="15" alt="smile" /></p>]]></description>
			<author><![CDATA[null@example.com (gman)]]></author>
			<pubDate>Mon, 24 Jul 2006 11:51:01 +0000</pubDate>
			<guid>https://gprogs.com/viewtopic.php?pid=381#p381</guid>
		</item>
		<item>
			<title><![CDATA[Re: Directional Lighting?]]></title>
			<link>https://gprogs.com/viewtopic.php?pid=379#p379</link>
			<description><![CDATA[<p>I need more help. How would I set the angles and colors? I could only get as far as you showed me.<br /></p><div class="codebox"><pre><code>&#039;Create Directional Light
Local Light:T_irrSLight=T_irrSLight.Create()
Video.addDynamicLight(Light)
Light.setType(ELT_DIRECTIONAL)</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (HondaDirtBiker)]]></author>
			<pubDate>Sun, 23 Jul 2006 13:27:16 +0000</pubDate>
			<guid>https://gprogs.com/viewtopic.php?pid=379#p379</guid>
		</item>
		<item>
			<title><![CDATA[Re: Directional Lighting?]]></title>
			<link>https://gprogs.com/viewtopic.php?pid=363#p363</link>
			<description><![CDATA[<p>ill see if i can take a more thorough look tonight.&nbsp; as for the last bit of code, you need to create an instance of T_irrSLight before you can use it.&nbsp; to do that, use the create() function on the type.&nbsp; so change your code to:<br /></p><div class="codebox"><pre><code>&#039;Add Directional Light (white)
Local Light:T_irrSLight=T_irrSLight.create()
Video.addDynamicLight(light)
light.setType(ELT_DIRECTIONAL)</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (gman)]]></author>
			<pubDate>Mon, 10 Jul 2006 15:00:09 +0000</pubDate>
			<guid>https://gprogs.com/viewtopic.php?pid=363#p363</guid>
		</item>
		<item>
			<title><![CDATA[Re: Directional Lighting?]]></title>
			<link>https://gprogs.com/viewtopic.php?pid=361#p361</link>
			<description><![CDATA[<p>I tried some different code that seemed right. When I run it I get a &quot;Unhandled Exception:Attempt to access field or method of Null object&quot;.</p><p>How do I setup the light handle for a dynamic light?<br /></p><div class="codebox"><pre><code>&#039;Add Directional Light (white)
Local Light:T_irrSLight
Video.addDynamicLight(light)
light.setType(ELT_DIRECTIONAL)</code></pre></div><p>Thank you.</p>]]></description>
			<author><![CDATA[null@example.com (HondaDirtBiker)]]></author>
			<pubDate>Sun, 09 Jul 2006 05:38:44 +0000</pubDate>
			<guid>https://gprogs.com/viewtopic.php?pid=361#p361</guid>
		</item>
		<item>
			<title><![CDATA[Re: Directional Lighting?]]></title>
			<link>https://gprogs.com/viewtopic.php?pid=356#p356</link>
			<description><![CDATA[<p>How would I set the light type and change the SLight structure?<br />This is some code I thought would work.<br /></p><div class="codebox"><pre><code>&#039;Add Directional Light (white)
Local Light:T_irrISceneNode = ..
    Env.addLightSceneNode (Null, T_irrVector3df.createFromVals (0, 0, -40), ..
    T_irrSColorf.createFromRGBA (1.0, 1.0, 1.0, 1.0),ELT_DIRECTIONAL)</code></pre></div><p>BTW, gman your awesome!</p>]]></description>
			<author><![CDATA[null@example.com (HondaDirtBiker)]]></author>
			<pubDate>Fri, 30 Jun 2006 02:02:37 +0000</pubDate>
			<guid>https://gprogs.com/viewtopic.php?pid=356#p356</guid>
		</item>
		<item>
			<title><![CDATA[Re: Directional Lighting?]]></title>
			<link>https://gprogs.com/viewtopic.php?pid=295#p295</link>
			<description><![CDATA[<p>greetings <img src="https://gprogs.com/img/smilies/smile.png" width="15" height="15" alt="smile" />&nbsp; there should be nothing in the mods that would limit the lights to only point.&nbsp; could you paste some code?&nbsp; the default light is a point light.&nbsp; you will need to alter the SLight structure associated with the light scene node and set the light type to ELT_DIRECTIONAL.&nbsp; after that, the position vector in the SLight structure is now the direction vector so use that to set the direction the light is coming from.&nbsp; i believe this is different than using setPosition on the light scene node.&nbsp; that will only reposition the light itself.</p>]]></description>
			<author><![CDATA[null@example.com (gman)]]></author>
			<pubDate>Sat, 01 Apr 2006 16:11:05 +0000</pubDate>
			<guid>https://gprogs.com/viewtopic.php?pid=295#p295</guid>
		</item>
		<item>
			<title><![CDATA[Directional Lighting?]]></title>
			<link>https://gprogs.com/viewtopic.php?pid=294#p294</link>
			<description><![CDATA[<p>Irrlicht 0.14.0 has directional lighting. I cant get it to work with the mods though.<br />Was it added since 0.13.0?</p>]]></description>
			<author><![CDATA[null@example.com (HondaDirtBiker)]]></author>
			<pubDate>Sat, 01 Apr 2006 06:15:53 +0000</pubDate>
			<guid>https://gprogs.com/viewtopic.php?pid=294#p294</guid>
		</item>
	</channel>
</rss>
