Default Camera Material

Posted By: yorisimo

Default Camera Material - 11/15/13 20:11

When I assign a non-default material to a VIEW (camera), it no longer uses the default camera material, resulting in a much brighter scene. The simple script below shows the effect. How do I find the default camera material settings (e.g. ambient_blue, ambient_green...diffuse_blue, etc), so that I can assign them to my material.

Trying to access camera.material.ambient_blue causes the engine to crash.

Code:
#include <acknex.h>
#include <windows.h>


MATERIAL* my_mat=
{
	
}

function main()
{
	var temp;
	level_load("world.wmb");
	camera.material = my_mat; //comment out this line to see without non default material assigned
	while(1)
	{
		//temp = camera.material.ambient_blue;  //causes crash
		DEBUG_VAR(temp,10);
		wait(1);
	}	
}

Posted By: yorisimo

Re: Default Camera Material - 11/15/13 20:23

It looks like I just have to set albedo=0; in my material to get the same look.
albedo default is 50.
The other defaults in the manual seem to be the same as the camera defaults.
© 2024 lite-C Forums