ScriptSpot

Forum topic · General Scripting

PNG Generation from material

By dgu · 2013-04-22

Description

Dear Team and Users,

i would like to kow if it is possible to generate a png or jpg directly from material COLOR properties (ambiant diffuse, specular )

Will it be possible to have a script or a path pointing the right direction ?

thanks in advance

david

Comments (2)

miauu · 2013-04-22

You want to create png image with the color equal to diffuse color of material? This is possible.
Adapt this to you needs:


(
	b = bitmap 100 100 color:red
	b.filename = "C:\\qqq\\1234.png"
	save b quiet:true
)

image creation

dgu · 2013-04-23

Thanks alot that is wonderfull and seems super easy
from your sample the only thing to do is getting the diffuse, specular value from material? ,is it easy ?
i will dig this more.

thanks again