Jump to content

Terrain Class Color Information


Recommended Posts

Hey Guys!

I have a feeling that only Squad will be able to answer this, but does anyone have any info on fetching the terrain color information?

I'm working on replacing the terrain and ocean shaders with something a tad more advanced, but I need the terrain class colors to be able to use the correct texture for the area. If I don't have them, I'll just have to end up guessing the colors used. I can't get them from the material unfortunately as I don't have the name for the shader property.

Anyone have any info on this?

Thanks!

Link to comment
Share on other sites

You could try fecthing the terrain texture directly and reading the pixels? Might want to take a look at TextureReplacer, you can probably get the textures by the same way you change them.

So I have debugged the PQS terrain mesh, and the only thing item available per-vertex is the color of the vertex, given that the terrain also uses land classes and textures for them, I assume it uses the color to determine what texture to use. Hence, I need a way to get those colors to mimic what the existing terrain shader does.

Don't think terrains *have* colors set in the shader; they're assigned by PQSMod, either colormap or landclass. See this dump of components of PQSs ZRM made.. The shader just modifies those colors (and only in brightness), AFAIK.

AH! I think that is what I'm looking for. I'll have to see if there is some connection to the textures used. If not, this is basically the next best thing. Thanks!

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

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.

×
×
  • Create New...