Jump to content

Painting groups of vertixes in-game.


Nexerade
 Share

Recommended Posts

As I can see - Leadwerks can read vertex groups and you can paint them in editor. I just wanna know what function editor uses to make this.

 

I want to be able to paint groups in textures right in real time in game, by player choise.

 

And 2nd question - is it possible to make invisible textures on model? On example I want to have a function to turn off helmet in real time. I'd tried to use 0 0 0 0 RGBA .png texture and ...+alphamask shader, but in editor my texture is just white.

I am not silly. My english is just not really great. T_T

But I'm learning! :D

Link to comment
Share on other sites

For the first question, look at the API for surface:

http://www.leadwerks.com/werkspace/page/api-reference/_/surface/

I can't give you a detailed answer on how to do it though, sorry.

 

For the second question, the FPS template uses this code to hide the player. You can do the same with the helmet.

 

local material = Material:Create()
material:SetBlendMode(5)--Blend.Invisible
self.entity:SetMaterial(material)
material:Release()
self.entity:SetShadowMode(0)

  • Upvote 1
Link to comment
Share on other sites

For the first question, look at the API for surface:

http://www.leadwerks.com/werkspace/page/api-reference/_/surface/

I can't give you a detailed answer on how to do it though, sorry.

 

For the second question, the FPS template uses this code to hide the player. You can do the same with the helmet.

 

local material = Material:Create()
material:SetBlendMode(5)--Blend.Invisible
self.entity:SetMaterial(material)
material:Release()
self.entity:SetShadowMode(0)

 

Thank you, that's all I needed to know!

I am not silly. My english is just not really great. T_T

But I'm learning! :D

Link to comment
Share on other sites

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.

 Share

×
×
  • Create New...