AggrorJorn Posted April 7, 2012 Share Posted April 7, 2012 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. Quote Link to comment Share on other sites More sharing options...
macklebee Posted April 7, 2012 Share Posted April 7, 2012 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 Quote Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590 LE / 3DWS / BMX / Hexagon macklebee's channel Link to comment Share on other sites More sharing options...
AggrorJorn Posted April 8, 2012 Author Share Posted April 8, 2012 Thanks for the reply, Macklebee. Yes that is a bit a weird line. 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. Quote Link to comment Share on other sites More sharing options...
Benton Posted April 9, 2012 Share Posted April 9, 2012 <troll> C# for noobs write it in C++ or go pro and do it in LUA </troll> Quote 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 Link to comment Share on other sites More sharing options...
Recommended Posts
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.