RenderVertexExpression

All topics about ZGameEditor goes here.

Moderator: Moderators

Post Reply
User avatar
Kjell
Posts: 1883
Joined: Sat Feb 23, 2008 11:15 pm

RenderVertexExpression

Post by Kjell »

:?:

How come the RenderVertexExpression is a separate entity ( or is it .. ) from the MeshExpression functionality? Don't they do practically the same thing ( minus the new Vertex Color feature )? With the exception of MeshExpression being applied to it's Owner Mesh and RenderNet always using the generated Net. Also, using this.V in one and this.Vertex in the other seems a little inconsistent.

K
User avatar
VilleK
Site Admin
Posts: 2277
Joined: Mon Jan 15, 2007 4:50 pm
Location: Stockholm, Sweden
Contact:

Post by VilleK »

You are right, RenderNet and MeshExpression have become more and more similar. Especially since the Grid2DOnly property on MeshBox was introduced for making "net" meshes.

However RenderNet is meant to be used in realtime, while MeshExpression is meant to be part of a potentially complex list of producers for a mesh.

For consistency the vertex should be called "V" in both components but I'd rather not change that now because it would break compatibility. Maybe I can make so that both "V" and "Vertex" works.

Quite a number of new features have been added to ZGE this year so there may come a time where we will need to clean up some stuff to reduce exe-size and remove redundant or duplicate functionality such as this.
User avatar
Kjell
Posts: 1883
Joined: Sat Feb 23, 2008 11:15 pm

Post by Kjell »

Hej Ville,

MeshExpression could also be used for real-time use when using RefreshContent on the Mesh obviously. Anyway, I was just surprised that code wise they don't tap into the same method / function.

By the way, the other way around MeshExpression is missing TexCoords. And perhaps somewhat unrelated, the Generated option of Material's TexCoords property uses a "planar projection"? How difficult would it be to change that to cubic?

K
User avatar
VilleK
Site Admin
Posts: 2277
Joined: Mon Jan 15, 2007 4:50 pm
Location: Stockholm, Sweden
Contact:

Post by VilleK »

Here is the OpenGL documentation for texgen:

http://www.opengl.org/sdk/docs/man/xhtml/glTexGen.xml

The one used in ZGE now is: GL_OBJECT_LINEAR
User avatar
jph_wacheski
Posts: 1005
Joined: Sat Feb 16, 2008 8:10 pm
Location: Canada
Contact:

Post by jph_wacheski »

vertexColor on the renderNet would be very welcome,. . sorta' related,. 2 cents.
iterationGAMES.com
Post Reply