Jump to content

2/4 Lights Not Loading


Shard
 Share

Recommended Posts

As stated before, Lua now loads all the lights in Leadwerks.

 

I've found that directional and ambient lights are not loading automatically. Even though the point and spot work just fine without the need for processing.

 

I've also tried to load them using a Process Scene but it doesn't recognize any of the class names.

 

//Directional light
	else if (classname=="light_directional") 
	{
		light=CreateDirectionalLight(this->level->GetScene());
		SetEntityMatrix(light,GetEntityMatrix(entity));
		CopyEntityKeys(entity,light);
		HideEntity(entity);
		entity=light;
	}

 

Am I doing something wrong or is something up with the engine?

simpleSigPNG.png

 

Programmer/Engineer/Student

www.reikumar.com

 

2.6 GHz Intel Core Duo - nVidia GeForce 8600 GT - Windows 7 64-bit - 4 Gigs RAM

C++ - Visual Studio Express - Dark GDK - Leadwerks SDK

Link to comment
Share on other sites

You have to create ini file for this two entities with your default values.

 

A what?

 

Do I need to parse them in code and then interpret them myself?

simpleSigPNG.png

 

Programmer/Engineer/Student

www.reikumar.com

 

2.6 GHz Intel Core Duo - nVidia GeForce 8600 GT - Windows 7 64-bit - 4 Gigs RAM

C++ - Visual Studio Express - Dark GDK - Leadwerks SDK

Link to comment
Share on other sites

When you look inside folder Models/Entities/Light, you have ini file only for Point and Spot light, for Ambient and Directional misssing.

When you need parse classname like above - create missing ini file light_directional.ini and light_ambient.in with classname="light_directional" and classname="light_ambient".

 

 

 

 

Note: Because you have scene created with this lights, you need fix (add classname to entity in sbx file) manualy or remove it and drag to scene again, then will be classname added to scene.

[HW] C2D Q6600, 4GB RAM, NV8800GTX, Vista Ultimate x64

[sW] Blide Plus, BlitzMax, Delphi, C++, 3DWS 5.53, Leadwerks 2.xx

 

76561197970156808.pngAndyGFX.png

Link to comment
Share on other sites

When you look inside folder Models/Entities/Light, you have ini file only for Point and Spot light, for Ambient and Directional misssing.

When you need parse classname like above - create missing ini file light_directional.ini and light_ambient.in with classname="light_directional" and classname="light_ambient".

 

 

 

 

Note: Because you have scene created with this lights, you need fix (add classname to entity in sbx file) manualy or remove it and drag to scene again, then will be classname added to scene.

 

 

Thanks for replying, AndyGFX.

 

Three questions.

1) The ini file is just a text doc with a different extension, right?

2) What are the default values I should put in the ini file?

3) I'm having a little trouble parsing the name: http://leadwerks.com/werkspace/index.php?/topic/274-parsing-from-a-scene-with-2-3-editor/page__gopid__2351entry2351

simpleSigPNG.png

 

Programmer/Engineer/Student

www.reikumar.com

 

2.6 GHz Intel Core Duo - nVidia GeForce 8600 GT - Windows 7 64-bit - 4 Gigs RAM

C++ - Visual Studio Express - Dark GDK - Leadwerks SDK

Link to comment
Share on other sites

Three questions.

1) The ini file is just a text doc with a different extension, right?

2) What are the default values I should put in the ini file?

3) I'm having a little trouble parsing the name: http://leadwerks.com/werkspace/index.php?/topic/274-parsing-from-a-scene-with-2-3-editor/page__gopid__2351entry2351

 

1) yes

2) add this and save as light_directional.ini inside the folder for the directional light gmf:

color=255,255,255,255
intensity=1
range=10
resolution=2
linearoffset=0.31,0.4,0.7
shadowdistance=6.0,20.0,100.0
inversesquarefalloff=1

3) answered it already

Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590

LE / 3DWS / BMX / Hexagon

macklebee's channel

Link to comment
Share on other sites

1) yes

2) add this and save as light_directional.ini inside the folder for the directional light gmf:

color=255,255,255,255
intensity=1
range=10
resolution=2
linearoffset=0.31,0.4,0.7
shadowdistance=6.0,20.0,100.0
inversesquarefalloff=1

3) answered it already

 

 

Thanks, macklebee.

 

After doing as you said, I ran the program and got a shadow rendering error which a Frapped for you:

http://www.youtube.com/watch?v=G6yd85tgP70

simpleSigPNG.png

 

Programmer/Engineer/Student

www.reikumar.com

 

2.6 GHz Intel Core Duo - nVidia GeForce 8600 GT - Windows 7 64-bit - 4 Gigs RAM

C++ - Visual Studio Express - Dark GDK - Leadwerks SDK

Link to comment
Share on other sites

After doing as you said, I ran the program and got a shadow rendering error which a Frapped for you:

http://www.youtube.com/watch?v=G6yd85tgP70

 

You need to adjust your shadowdistance, shadowmapsize, and possible the shadowoffset. Play with the numbers until you get something that works for you... but essentially, what you see in the Editor should be what you are getting in your program.

Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590

LE / 3DWS / BMX / Hexagon

macklebee's channel

Link to comment
Share on other sites

Using the code on this Thread

 

DL, Spot, Directional and ambient all parsed and loaded with loadscene:

 

post-12-12600950444246_thumb.jpg

AMD Bulldozer FX-4 Quad Core 4100 Black Edition

2 x 4GB DDR3 1333Mhz Memory

Gigabyte GeForce GTX 550 Ti OC 1024MB GDDR5

Windows 7 Home 64 bit

 

BlitzMax 1.50 • Lua 5.1 MaxGUI 1.41 • UU3D Pro • MessiahStudio Pro • Silo Pro

3D Coat • ShaderMap Pro • Hexagon 2 • Photoshop, Gimp & Paint.NET

 

LE 2.5/3.4 • Skyline UE4 • CE3 SDK • Unity 5 • Esenthel Engine 2.0

 

Marleys Ghost's YouTube Channel Marleys Ghost's Blog

 

"I used to be alive like you .... then I took an arrow to the head"

Link to comment
Share on other sites

You need to adjust your shadowdistance, shadowmapsize, and possible the shadowoffset. Play with the numbers until you get something that works for you... but essentially, what you see in the Editor should be what you are getting in your program.

 

Can I get an example of the values you generally use?

simpleSigPNG.png

 

Programmer/Engineer/Student

www.reikumar.com

 

2.6 GHz Intel Core Duo - nVidia GeForce 8600 GT - Windows 7 64-bit - 4 Gigs RAM

C++ - Visual Studio Express - Dark GDK - Leadwerks SDK

Link to comment
Share on other sites

Using the code on this Thread

 

DL, Spot, Directional and ambient all parsed and loaded with loadscene:

 

post-12-12600950444246_thumb.jpg

 

 

hehe... this is your post shard! someone's not reading very closely :)

 

 

I did exactly as that code said but the directional light didn't appear until I created the ini file.

 

The problem now is figuring out why the shadows are doing what they are doing.

http://www.youtube.com/watch?v=G6yd85tgP70

simpleSigPNG.png

 

Programmer/Engineer/Student

www.reikumar.com

 

2.6 GHz Intel Core Duo - nVidia GeForce 8600 GT - Windows 7 64-bit - 4 Gigs RAM

C++ - Visual Studio Express - Dark GDK - Leadwerks SDK

Link to comment
Share on other sites

Can I get an example of the values you generally use?

 

so far the settings in the ini file i gave you seem to be working just fine for me... you could try using the values found in the wiki explanation examples for SetShadowmap/SetShadowdistancce etc... and see if those work out better for you...

Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590

LE / 3DWS / BMX / Hexagon

macklebee's channel

Link to comment
Share on other sites

what you need to do is delete all of your lights in your scene and recreate them... there could be an issue of older stuff conflicting with the newer INI config settings...

 

 

Nope, didn't help.

simpleSigPNG.png

 

Programmer/Engineer/Student

www.reikumar.com

 

2.6 GHz Intel Core Duo - nVidia GeForce 8600 GT - Windows 7 64-bit - 4 Gigs RAM

C++ - Visual Studio Express - Dark GDK - Leadwerks SDK

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...