Gamestudio Links
Zorro Links
Newest Posts
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (7th_zorro, AndrewAMD, Ayumi), 750 guests, and 8 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
shade-c evo flashlight #438962
03/24/14 16:39
03/24/14 16:39
Joined: Feb 2010
Posts: 886
Random Offline OP
User
Random  Offline OP
User

Joined: Feb 2010
Posts: 886
I know how to create lights ect..
But I don`t know how to move lights (in while loop)

What I meen:
Code:
sc_light_create(vector(camera.x, camera.y, camera.z), 1000, vector(25,25,25), SC_LIGHT_SPOT | SC_LIGHT_SPECULAR | SC_LIGHT_SHADOW , vector(camera.pan, camera.tilt, camera.roll), 90);



This creates a light. I can`t put it in a while loop, otherwise it would constantly create lights and kill my fps.

Is there a way to set shade-c lights to moving objects without killing fps?

Random



Re: shade-c evo flashlight [Re: Random] #438965
03/24/14 17:57
03/24/14 17:57
Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
Kartoffel Offline
Expert
Kartoffel  Offline
Expert

Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
a guess: this function returns the light entity which you can move around.
if guess #1 is true: guess #2: shadomapping depth-views are updated automatically so just moving around the light entity should work


POTATO-MAN saves the day! - Random
Re: shade-c evo flashlight [Re: Random] #438967
03/24/14 18:48
03/24/14 18:48
Joined: Oct 2004
Posts: 900
Lgh
rojart Offline
User
rojart  Offline
User

Joined: Oct 2004
Posts: 900
Lgh
Originally Posted By: Random
I know how to create lights ect..
But I don`t know how to move lights (in while loop)

What I meen:
Code:
sc_light_create(vector(camera.x, camera.y, camera.z), 1000, vector(25,25,25), SC_LIGHT_SPOT | SC_LIGHT_SPECULAR | SC_LIGHT_SHADOW , vector(camera.pan, camera.tilt, camera.roll), 90);



This creates a light. I can`t put it in a while loop, otherwise it would constantly create lights and kill my fps.

Is there a way to set shade-c lights to moving objects without killing fps?

Random


You need pointer of this function to work in a while loop like this:

Code:
ENTITY* spotlight1 = sc_light_create(vector(camera.x, camera.y, camera.z), 1000, vector(25,25,25), SC_LIGHT_SPOT | SC_LIGHT_SPECULAR | SC_LIGHT_SHADOW , vector(0, -45, 0), 90);

	while(1)
	{
		spotlight1.pan += time_step*.5;
		//update the spotlight
		sc_light_update(spotlight1);
		wait(1);
	}



Regards, Robert

Quote
Everything should be made as simple as possible, but not one bit simpler.
by Albert Einstein

PhysX Preview of Cloth, Fluid and Soft Body

A8.47.1P
Re: shade-c evo flashlight [Re: rojart] #439095
03/26/14 18:24
03/26/14 18:24
Joined: Feb 2010
Posts: 886
Random Offline OP
User
Random  Offline OP
User

Joined: Feb 2010
Posts: 886
Perfect!
It is smooth and I have no preformens loses.




Moderated by  Blink, Hummel, Superku 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1