Search Home Members Contacts
About Us
Products
Downloads
Community
Support
Pages: [1]
  Print  
Author Topic: Is this how?  (Read 944 times)
Illusion
Customers
Community Member
*****
Posts: 50


« on: March 09, 2005, 04:04:22 AM »

Hi

Is this how to setup lights? ...
as it doesn't seem to be working for me.. any ideas?

Code:

    Public Sub LoadLights()

        tvLight.CreateLight(SunLight, "sunlight")
        tvLight.SetLightPosition(tvLight.GetLightFromName("sunlight"), 0, 0, 0)
        tvLight.EnableLight(tvLight.GetLightFromName("sunlight"), True)
        tvLight.SetLightProperties(tvLight.GetLightFromName("sunlight"), True, True, True)


    End Sub


Thanks
Dan.
Logged

Illusion
Customers
Community Member
*****
Posts: 50


« Reply #1 on: March 09, 2005, 07:52:07 AM »

Also the tvinput.getmouseposition doesn't seem to be working.. is this being worked on.. ? what does everyone else use?

thanks
Dan.
Logged

AriusMyst
Guest
« Reply #2 on: March 09, 2005, 09:21:20 AM »

The way you're trying to do it you should be filling and then passing a light struct first. Show us the light struct, you should also note that tv has built in quick functions:

Code:
 LightEngine.CreatePointLight(Globals.Vector3(700, 400, 700), 0.63, 0.7, 0.85, 1500, 'light', 1);


Create a point light in one line of code for example.  Smiley
Logged
LAO88
Community Member
*
Posts: 321


WWW
« Reply #3 on: March 09, 2005, 09:31:58 AM »

its better if u use  d3dlight8:

private LightA as d3dlight8
private LE as tvLightengine

With LightA

.Type = D3DLIGHT_DIRECTIONAL
.diffuse = DXColor(1, 1, 1, 1)
.Ambient = DXColor(0.1, 0.1, 0.1, 0.7)
.Direction = Vector3(0.5, -1, 0)
.Attenuation0 = 0.5
.Attenuation1 = 0
.Attenuation2 = 0

End With

LE.CreateLight LightA, "LA"
Logged

Eric
Customers
Community Member
*****
Posts: 807


« Reply #4 on: March 09, 2005, 11:40:13 AM »

make sure your objects have a material set on them as well
Logged
rocky
Customers
Community Member
*****
Posts: 955


« Reply #5 on: March 10, 2005, 06:38:22 AM »

Here's what I've been using (different approach) if it helps.

Set TVLightEngine = New TVLightEngine

Dim TVLightEngine As New TVLightEngine

With TVLightEngine
          i = .CreateDirectionalLight(Vector(-0.2, -1, -0.2), 2.2, 2.2, 3.1, "Light", 1)
          .SetLightPosition i, 0, 1000, 0
          .SetLightRange i, 800
          .SetLightProperties i, False, True, False
         
          .SetBumpLightProperties i, True, True 'Not required unless using bump mapping.
           
           .EnableLight i, True
End With
Logged
Illusion
Customers
Community Member
*****
Posts: 50


« Reply #6 on: March 10, 2005, 10:57:26 AM »

um... well im not sure if its working ...

I suppose I should say I wanted it as sunlight, but when your in space.


Thanks
Dan
Logged

Pages: [1]
  Print  
 
Jump to:  

Powered by SMF 1.1.3 | SMF © 2006-2007, Simple Machines LLC
Seo4Smf v0.2 © Webmaster's Talks