|
regress
|
 |
« on: January 08, 2003, 07:15:18 PM » |
|
Passing the color argument when using SetVertex on a mesh appears to do nothing. No matter what color I pass, all vertexes remain white.
Cheers, Ben
|
|
|
|
|
Logged
|
|
|
|
JohnnyC
Community Member

Posts: 1488
|
 |
« Reply #1 on: January 08, 2003, 07:16:06 PM » |
|
Was fixed today 
|
|
|
|
|
Logged
|
|
|
|
|
regress
|
 |
« Reply #2 on: January 08, 2003, 07:28:11 PM » |
|
Right on. Here's a associated question: Would it be a possible to also add an optional argument to the SetColor call, or alternately, a SetVertexColor call, which allows one to set color by vertex (pass vertex ID) as well? If it's no big deal to add it, it would help me out tremendously, e.g. I'd be able to change the color of a vertex at any time.
Cheers, Ben
|
|
|
|
|
Logged
|
|
|
|
JohnnyC
Community Member

Posts: 1488
|
 |
« Reply #3 on: January 08, 2003, 07:30:31 PM » |
|
No idea - i just park the cars and sell popcorn...... ask 'The Code God'
|
|
|
|
|
Logged
|
|
|
|
Dreddnafious
Community Member

Posts: 24
|
 |
« Reply #4 on: January 08, 2003, 08:01:43 PM » |
|
ummm Johhny, i said extra butter and no salt, not extra salt and no butter. and 40 quid was missing from my car's console. Im afraid im going to have to speak to your boss about this... 
|
|
|
|
|
Logged
|
|
|
|
JohnnyC
Community Member

Posts: 1488
|
 |
« Reply #5 on: January 08, 2003, 08:04:24 PM » |
|
Yeah but I got a tight butt and look cool in these skates so f... mat your hard disk buddy 
|
|
|
|
|
Logged
|
|
|
|
Dreddnafious
Community Member

Posts: 24
|
 |
« Reply #6 on: January 08, 2003, 09:06:27 PM » |
|
bragger :lol:
|
|
|
|
|
Logged
|
|
|
|
|
SylvainTV
|
 |
« Reply #7 on: January 09, 2003, 07:24:12 AM » |
|
Regress, now the TVMesh doesn't support any more a color/vertex, it caused too much overhead in the code to support and wasn't flexible really. So that's why you can use only SetColor/SetMaterial to set the color on meshs.
Hmm maybe there is a workaround though, what were you trying to do?
|
|
|
|
|
Logged
|
|
|
|
|
regress
|
 |
« Reply #8 on: January 09, 2003, 11:02:04 AM » |
|
I'm working on my TreeFactory code again; I can still change color, given a fairly generic bark texture, of a given tree (each tree is one mesh group) using SetMaterial, but setting color on individual vertexes would be helpful for:
- easily "darkening" the tops and bottoms of trunks and branchs - changing color/alpha to different levels of transparency at vertexes which hinder the camera perspective (can do it with the whole tree itself I believe with SetMaterial, but haven't tried that yet) - since individual mesh groups in one mesh cannot take advantage of the shadow functionality you've built into the TVMesh object, having per-vertex color operations would also help with creating gradient home-grown shadows for the trees
Cheers, Ben
|
|
|
|
|
Logged
|
|
|
|
|
shellshock
|
 |
« Reply #9 on: January 10, 2003, 01:13:17 PM » |
|
Sylvain, now the TVMesh doesn't support any more a color/vertex, it caused too much overhead in the code to support and wasn't flexible really. If the TVMesh no longer supports color veritces, I would recommend removing the color args from the addvertex method. It is confusing to have a required arguement that does nothing. I also have been using colored vertices in a couple of RC2 apps, primarily with multi-colored line strips, and some meshes with Tristrips that are vertex colored as opposed to textured. Unlike regress, I am not trying to change the vertex colors dynamically, just set them when I add the vertex. Since the color of the vertex is determined by a number of factors at the time it is added, it is impossible to "Pre-create" a texture. I am essentially using the line strip to provided quick visual analysis of events in an entities history (Engine on = color_1, coast = color_2, detected by sensor = color_3, Targetted by missile = color_4, etc). In this manner, I can look at the history trail any element and quickly determine if it is behaving appropriately, or if I have a problem in my simulation, without digging into the binary results data. I know that I can add a new mesh with the approptiate color for each line segment, but this gets really ugly( and slow) when I have 1000 entities in my simulation. I know that there was some overhead, but the functionality that you had in RC2 was really working well for me. Any idea for a work around would be greatly appreciated.
|
|
|
|
|
Logged
|
|
|
|
|
shellshock
|
 |
« Reply #10 on: January 10, 2003, 01:16:51 PM » |
|
@JohnnyC Was fixed today
Vertex color setting is fixed, or unused vertex color args removed? Sylv seemed to indicate that the ability to set vertex colors had been intentionally removed.
|
|
|
|
|
Logged
|
|
|
|
|
regress
|
 |
« Reply #11 on: January 20, 2003, 10:19:37 AM » |
|
bump... any suggestions/clarifications?
cheers, ben
|
|
|
|
|
Logged
|
|
|
|
|
shellshock
|
 |
« Reply #12 on: January 27, 2003, 01:02:43 PM » |
|
bump
|
|
|
|
|
Logged
|
|
|
|
|
regress
|
 |
« Reply #13 on: January 31, 2003, 09:26:08 PM » |
|
bumpidy-bump
|
|
|
|
|
Logged
|
|
|
|
|
Zaknafein
|
 |
« Reply #14 on: February 05, 2007, 01:50:46 AM » |
|
Is this still true? I find it pretty limitative, I wanted to implement precomputed ambient occlusion into the vertex color channel and I just cannot set it with SetVertex. At least I don't get any effect.
Is there any workaround? I tried writing to tu2/vu2 and didn't get any more success, accessing it with the TEXCOORD1 set has blank (1, 1) values everytime.
Edit : Oops, didn't see this was in the 6.2 section. I'm having this problem in 6.5.
|
|
|
|
|
Logged
|
|
|
|
|
Hypnotron
|
 |
« Reply #15 on: February 05, 2007, 01:55:51 AM » |
|
You can successfully set the vertex color in 6.5 using a custom mesh vertex format. I've done it and it works.
|
|
|
|
|
Logged
|
|
|
|
|
Zaknafein
|
 |
« Reply #16 on: February 06, 2007, 03:35:41 AM » |
|
Indeed it does.  Just had to set the right mesh format... hehe.
|
|
|
|
|
Logged
|
|
|
|
|
|
jviper
Community Member

Posts: 1276
Discipline in training
|
 |
« Reply #18 on: March 10, 2008, 09:00:00 AM » |
|
I can't see the code. The scroll bar is in the way. Hey uh that may have to be fixed because I notice that happening often when posting code.
So anyway....the other option ofourse would be simply to use a custom shader.
|
|
|
|
|
Logged
|
JAbstract.....Don't just imagine, make it happen!
|
|
|
|