Programming Questions

Anything related to Wolfire Games and/or its products
Post Reply
D.V.D
Posts: 2
Joined: Sat Oct 06, 2012 7:31 pm

Programming Questions

Post by D.V.D » Sat Oct 06, 2012 7:36 pm

Hey guys, Im trying to develop my own little demos as a hobby and I read through a few of your tutorials (especially the one on decals, that was a interesting read). But I have 2 questions. One, since you guys use opengl and im assuming c++, do you guys use glut, freeglut, glew, or some other wrapper library?? And my second question, when you guys have object tinting, do you have separate textures on the model that can be individually tinted? So, for a hat model, you can have a design and background. Do you guys create two textures that you overlap, and tint each one separately?

User avatar
Glabbit
Posts: 4917
Joined: Sun Feb 06, 2005 8:38 am
Location: A mile away, with your shoes!

Re: Programming Questions

Post by Glabbit » Sun Oct 07, 2012 2:24 am

The devs are currently unavailable due to awesome.
Some of the regular geeks will be with you shortly.

User avatar
Endoperez
Posts: 5668
Joined: Sun Jan 11, 2009 7:41 am
Location: cold and dark and lovely Finland

Re: Programming Questions

Post by Endoperez » Sun Oct 07, 2012 3:22 am

You can check the texture files yourself. Go to /Data/Textures/stuff. Most objects use a single diffuse texture, I don't remember seeing any object using two different diffuse textures. I have seen two objects using different parts of the same diffuse map though.

Do you do any 3D modeling yourself? I'm a modeler more than a programmer, and for me a different UV unwrapping or a different texture would be easier than a more complicated shader for tinting two diffuse textures at once.

User avatar
Korban3
Posts: 4146
Joined: Tue May 31, 2011 9:14 pm
Location: 42nd St E, Hell

Re: Programming Questions

Post by Korban3 » Sun Oct 07, 2012 4:40 am

Glabbit wrote:The devs are currently unavailable due to awesome.
Some of the regular geeks will be with you shortly.
Someone holler?
David uses SDL for Overgrowth. SDL is a more common choice simply because it's been used more. I've got more time behind SFML though and it has done just fine as well. So, either one of those would be a reasonable choice for you.
As far as I know, the tinting is done via a weightmap. A separate texture is used to tell the shader what areas of the mesh's color map should be tinted. So, the artist can set different parts of a single texture to be tintable or not or somewhere in between.
If you want more info, you can talk to David or Aubrey on the IRC channel. They're on there and pretty available most days.

D.V.D
Posts: 2
Joined: Sat Oct 06, 2012 7:31 pm

Re: Programming Questions

Post by D.V.D » Sun Oct 07, 2012 7:19 pm

Yea I checked the alpha where this was posted. He said then they used the alpha channel of the texture but a weight map would work to. Pretty useful technique to!! Thanks for the replies!

Post Reply