Jump to content

Recommended Posts

Posted

When I place a building on the scene, I want the model (with texture) to have a greenish color. When I can't build, it has to be red. Any idea how I can achieve this? I tried using PaintEntity, but then I can only color the mesh, and with a solid green color.

Posted

huh.png i dont understand... what else are you expecting to paint other than the mesh? if you are trying to paint a model, then you have to use the recursive parameter in the PaintEntity() to paint the child mesh...

 

require("Scripts/constants/engine_const")
RegisterAbstractPath("")	  
Graphics(800,600)	  
fw=CreateFramework()
fw.main.camera:SetPosition(Vec3(.5,1,-3))
drum1 = LoadModel("abstract::oildrum.gmf")
drum1:SetMass(0)
drum1:SetColor(Vec4(1,0,0,1),1)
drum2 = LoadModel("abstract::oildrum.gmf")
drum2:SetMass(0)
drum2:SetColor(Vec4(0,1,0,1),1)
drum2:SetPosition(Vec3(1,0,0))
while KeyHit(KEY_ESCAPE)==0 do	  
fw:Update()
fw:Render()
  Flip(1)
end

Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590

LE / 3DWS / BMX / Hexagon

macklebee's channel

Posted

Thanks for the reply, Macklebee. Yes that is a bit a weird line.rolleyes.gif

 

What I was trying to say: instead of painting the entire model green, (and therefor, loosing its texture) give it a greenish color. Your program shows exactly what I need to do. Only thing left to figure out is how to set the recursive parameter with SetColor in C#. thanks again for the help.

Posted

<troll> C# for noobs write it in C++ or go pro and do it in LUA </troll>

Windows 7 Professional 64 bit, 16 gigs ram, 3.30GHz Quad Core, GeForce GTX 460 one gig, Leadwerks 2.5, Blender 2.62, Photoshop CS3, UU3D

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...