Crystal Space
Welcome,
Guest
. Please
login
or
register
.
May 26, 2013, 12:40:32 am
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Search:
Advanced search
9224
Posts in
2230
Topics by
5390
Members
Latest Member:
Okvepkke6
Crystal Space
Crystal Space Projects
Project Discussion
Set color
« previous
next »
Pages:
[
1
]
Author
Topic: Set color (Read 3694 times)
mik
Newbie
Posts: 36
Set color
«
on:
November 06, 2008, 07:26:41 pm »
Hi again,
until now i have setting the color of my meshes loading a texture of that color from a file and then creating a material from these texture, but now i'm interested on set the color of a mesh (in particular a submesh of a General Mesh) using code (i.e., using a RGB format). How can i do that? I can't find it in the documentation.
Thank you.
Logged
Vincent
Full Member
Posts: 191
Re: Set color
«
Reply #1 on:
November 09, 2008, 02:28:41 pm »
Code:
<material name="red">
<color red="1" green="0" blue="0" />
</material>
Logged
mik
Newbie
Posts: 36
Re: Set color
«
Reply #2 on:
November 10, 2008, 10:36:22 am »
That method is for loading the objects from a file, but i need set the color while programming the object in c++. Any idea? I'm using General Mesh.
Logged
bookeater2
Newbie
Posts: 45
Re: Set color
«
Reply #3 on:
November 10, 2008, 04:34:21 pm »
There are different ways with different benefits. Vertex colors for example, I think they can be set with iMeshObject.SetColor()? Those only work with a shader that reads them, like std_lighting. You could also change the texture it's self, like by drawing on it. You could just modify any shader to use a custom value.
Logged
Pages:
[
1
]
« previous
next »
Jump to:
Please select a destination:
-----------------------------
Crystal Space Development
-----------------------------
=> General Crystal Space Discussion
=> Support
-----------------------------
Crystal Space Project Development
-----------------------------
=> Feature Requests
=> Plugins
=> Bug Reports
-----------------------------
Crystal Space Development
-----------------------------
=> Game Content Creation
-----------------------------
Miscellaneous
-----------------------------
=> Article/Tutorial Requests
=> Article/Tutorial Discussion
-----------------------------
Crystal Space Project Development
-----------------------------
=> Development Discussion
-----------------------------
Crystal Space Projects
-----------------------------
=> Project Discussion
=> WIP Projects
=> Finished Projects
-----------------------------
Associate Projects
-----------------------------
=> CEL Discussion
=> Crystal Core Discussion
=> CrystalBlend Discussion
-----------------------------
Crystal Space Project Development
-----------------------------
=> Google Summer of Code
-----------------------------
Associate Projects
-----------------------------
=> Apricot (Open Game)
=> Ares Project
Loading...