ambiera logo

Ambiera Forum

Discussions, Help and Support.

folder icon Ambiera Forum > CopperLicht
forum topic indicator Lighting
person icon
ty87
Registered User
Quote
2010-07-17 15:06:51

Hi,

I am attempting to port an OpenGL/C++ program that uses lighting (i.e. materials with diffuse/ambient/specular color, vertices with normals, and OpenGL lighting (GL_LIGHT_0...) ) to Copperlicht.

I have found some hints (Vertex3D.Normal and Scene.RENDER_MODE_LIGHTS) but other than that I wasn't able to find any references to lighting.

From reading http://www.ambiera.com/forum.php?t=931 I concluded that at this moment OpenGL lighting is not supported.

First question: Is this reasoning correct? (If I am wrong, I would appreciate it if anybody could give me some help or samples.)

As a workaround (until OpenGL lighting is build into Copperlicht), I have started to play with the idea of hardcoding some constant lights into shaders - not using OpenGL lighting, but by using a shader that calculates the angle between the normals (assuming that normals are correctly processed in the current version of Copperlicht) and some fixed coordinates that describe the lights position and then uses that angle to vary texture color.

Second question: Would this seem doable?

Thanks in advance for any help on this issue,
ty78

person icon
niko
Moderator
Quote
2010-07-17 18:00:53

Hi,
yes, dynamic lighting isn't currently supported in CopperLicht. But you can of course write your own shader (there is a tutorial on that in the documentation) for this, with hardcoded light sources, but even real, dynamic light sources should be possible.


Create reply:










 

  

Possible Codes


Feature Code
Link [url] www.example.com [/url]
Bold [b]bold text[/b]
Image [img]http://www.example.com/image.jpg[/img]
Quote [quote]quoted text[/quote]
Code [code]source code[/code]

Emoticons


icon_holyicon_cryicon_devilicon_lookicon_grinicon_kissicon_monkeyicon_hmpf
icon_sadicon_happyicon_smileicon_uhicon_blink   






Copyright© Ambiera e.U. all rights reserved.
Contact | Imprint | Products | Privacy Policy | Terms and Conditions |