Gamestudio Links
Zorro Links
Newest Posts
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
M1 Oversampling
by 11honza11. 04/30/24 08:16
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (AndrewAMD), 1,135 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Are view entities no longer affected by sunlight? #394170
02/10/12 17:17
02/10/12 17:17
Joined: Dec 2008
Posts: 1,660
North America
Redeemer Offline OP
Serious User
Redeemer  Offline OP
Serious User

Joined: Dec 2008
Posts: 1,660
North America
Hiya,

It seems view entities are no longer affected by sunlight, so they only reflect flat diffuse lighting. The albedo variable seems to have no effect on view entities.

Is this true, or have I done something wrong? If it is true, is there any way I can fix it?

Thanks.


Eats commas for breakfast.

Play Barony: Cursed Edition!
Re: Are view entities no longer affected by sunlight? [Re: Redeemer] #394296
02/11/12 18:01
02/11/12 18:01
Joined: Dec 2008
Posts: 1,660
North America
Redeemer Offline OP
Serious User
Redeemer  Offline OP
Serious User

Joined: Dec 2008
Posts: 1,660
North America
Does no one have an answer to this? I still haven't been able to solve this issue myself.


Eats commas for breakfast.

Play Barony: Cursed Edition!
Re: Are view entities no longer affected by sunlight? [Re: Redeemer] #394297
02/11/12 18:17
02/11/12 18:17
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline
Senior Expert
Superku  Offline
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Hm I don't know how the lighting used to be or should be from your perspective, but as they are not present in your level, IMO they should not be affected by sunlight. You can check if the sunlight has any influence on your view entities by setting sun_light and similar parameters (in particular the angle) dynamically and assign a material that has sunlight relevant properties set to a high value.


"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends
Re: Are view entities no longer affected by sunlight? [Re: Superku] #394304
02/11/12 18:40
02/11/12 18:40
Joined: Dec 2008
Posts: 1,660
North America
Redeemer Offline OP
Serious User
Redeemer  Offline OP
Serious User

Joined: Dec 2008
Posts: 1,660
North America
I've tried playing around with the sun variables, but that didn't produce any useful results. View entities don't seem to be affected by sunlight at all, which is strange because they used to be affected in A6.

I suppose I should mention that my project doesn't load WMB levels. I load empty levels (level_load(NULL)) and then populate the world space with entities. I wonder if that makes any difference?


Eats commas for breakfast.

Play Barony: Cursed Edition!
Re: Are view entities no longer affected by sunlight? [Re: Redeemer] #394317
02/11/12 20:14
02/11/12 20:14
Joined: Jan 2002
Posts: 4,225
Germany / Essen
Uhrwerk Offline
Expert
Uhrwerk  Offline
Expert

Joined: Jan 2002
Posts: 4,225
Germany / Essen
The difference is that sun's variables don't get set.

Did you try:
-sun_color
-sun_light
-sun_angle

Did you ensure the view entities material is mtl_model?


Always learn from history, to be sure you make the same mistakes again...
Re: Are view entities no longer affected by sunlight? [Re: Uhrwerk] #394325
02/11/12 21:53
02/11/12 21:53
Joined: Dec 2008
Posts: 1,660
North America
Redeemer Offline OP
Serious User
Redeemer  Offline OP
Serious User

Joined: Dec 2008
Posts: 1,660
North America
Yup, did all that. It makes no difference.

Does anyone have any other suggestions?


Eats commas for breakfast.

Play Barony: Cursed Edition!
Re: Are view entities no longer affected by sunlight? [Re: Redeemer] #394348
02/12/12 10:56
02/12/12 10:56
Joined: Oct 2004
Posts: 900
Lgh
rojart Offline
User
rojart  Offline
User

Joined: Oct 2004
Posts: 900
Lgh
I've noticed the same problem, like code below.

Code:
#include <acknex.h>

function main() {
	
	vec_set(sky_color,COLOR_BLUE);
	video_set(200, 200, 32, 2);
	
	level_load(0);
	
	you = ent_createlayer(SPHERE_MDL,0,5);
	vec_set(you.blue,COLOR_RED);
	you.x = 25;
	
	while(1)	{
		sun_angle.pan += 10 * time_step;
		wait(1);
	}
}


But in A7 works very well:




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: Are view entities no longer affected by sunlight? [Re: rojart] #394371
02/12/12 16:02
02/12/12 16:02
Joined: Dec 2008
Posts: 1,660
North America
Redeemer Offline OP
Serious User
Redeemer  Offline OP
Serious User

Joined: Dec 2008
Posts: 1,660
North America
So I was right after all. Well, that sucks.

I was trying to create some first person weapons for a splitscreen game. I found that I couldn't use level entities since they had to remain invisible on every other view, so I decided to use view entities. But without any lighting, the models look extremely ugly...

Maybe I should try baking some simple "lighting" right onto the model. It's better than nothing, I suppose.


Eats commas for breakfast.

Play Barony: Cursed Edition!
Re: Are view entities no longer affected by sunlight? [Re: Redeemer] #394377
02/12/12 16:13
02/12/12 16:13
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline
Senior Expert
Superku  Offline
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Why don't you apply a shader then?
This diffuse lighting shader should be pretty much like the default mat_model material: http://www.conitec.net/shaders/shader_work2.htm
You may/ certainly have to replace the sun vectors and variables with custom vectors (that you declare and set in your script).


"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends
Re: Are view entities no longer affected by sunlight? [Re: Superku] #394380
02/12/12 16:34
02/12/12 16:34
Joined: Jan 2002
Posts: 4,225
Germany / Essen
Uhrwerk Offline
Expert
Uhrwerk  Offline
Expert

Joined: Jan 2002
Posts: 4,225
Germany / Essen
He could use the predefined vectors as well, can't he? He just had to transform them to screen space before, right?


Always learn from history, to be sure you make the same mistakes again...

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

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