Home › Forums › Programming › How to change emission color in verge3d?
- This topic has 4 replies, 2 voices, and was last updated 4 years, 1 month ago by derekwang0605.
-
AuthorPosts
-
2020-10-03 at 10:06 am #33795derekwang0605Customer
Hi,
I have Verge3DCamMat material in Blender which did not use Principled BSDF.
mat = bpy.data.materials.new(‘Verge3DCamMat’)
mat.use_nodes = True
bsdf = mat.node_tree.nodes[“Principled BSDF”]
mat.node_tree.nodes.remove(bsdf)
matOutput= mat.node_tree.nodes[“Material Output”]
matOutput.location=(600,0)mixShader = mat.node_tree.nodes.new(‘ShaderNodeMixShader’)
mixShader.location=(400,0)diffuseBSDF = mat.node_tree.nodes.new(‘ShaderNodeBsdfDiffuse’)
diffuseBSDF.location=(200,0)
diffuseBSDF.inputs[‘Color’].default_value=(1,1,1,1)emission = mat.node_tree.nodes.new(‘ShaderNodeEmission’)
emission.location=(200,-200)
emission.inputs[‘Color’].default_value=emissioncolorlightPath = mat.node_tree.nodes.new(‘ShaderNodeLightPath’)
lightPath.location=(0,300)#link
mat.node_tree.links.new(mixShader.outputs[0], matOutput.inputs[0])
mat.node_tree.links.new(lightPath.outputs[0], mixShader.inputs[0])
mat.node_tree.links.new(diffuseBSDF.outputs[0], mixShader.inputs[1])
mat.node_tree.links.new(emission.outputs[0], mixShader.inputs[2])
How to change emission color in Verge3D? And also how to list the nodes in Verge3D?
var mats = v3d.SceneUtils.getMaterialsByName(app,’Verge3DCamMat’);
mats[’emission’]=(0.5,0.5,0.5)
But it did not work.2020-10-04 at 3:56 am #33802GLiFTeKCustomerYou’d use a change color puzzle from the materials section to change an rgb color node that you plug into the emission node’s color input.
Change value puzzle will work as well.
Visit the GLIFTEK Verge3D Plugins Store!
GLIFTEK.com for Plugin Documentation & LIVE DEMOS!
LIKE The GLIFTEK Facebook Page for updates!
Join the Verge 3D Discord Server!
plz share Discord link & on your signature!2020-10-04 at 7:38 am #33804derekwang0605CustomerThanks! I tried by your way as I did not use principled BSDF so set color has <no colors> option.
2020-10-04 at 9:23 pm #33806GLiFTeKCustomerThanks! I tried by your way as I did not use principled BSDF so set color has <no colors> option.
Well like I said, you have to use another RGB Color node plugged into the emission channel input plug in the PBR, then THAT one will show up in the Verge puzzle.
Also, if you need a numerical value for alpha or a Fac, you would plug in a “Value” node into them, and name it accordingly in the side panel, then choose that name in the value puzzle.
Visit the GLIFTEK Verge3D Plugins Store!
GLIFTEK.com for Plugin Documentation & LIVE DEMOS!
LIKE The GLIFTEK Facebook Page for updates!
Join the Verge 3D Discord Server!
plz share Discord link & on your signature!2020-10-04 at 11:53 pm #33807derekwang0605CustomerThanks a lot! It works well.
-
AuthorPosts
- You must be logged in to reply to this topic.