• Trace ignoring displacement/Getting texture from displacement?
    2 replies, posted
I'm having issues with getting the correct material/texture of the ground beneth me due to .MatType returning 67 (MAT_CONCRETE) and .HitTexture returns *displacement* on displacements. What I'm trying to do is to identify if the ground is grass or not. Does anyone know any better way of doing this?
A lot of mats incorrectly set materials or the texture data incorrectly sets them. If the texture returns something like displacement or studio, I wouldn't worry about it. If it returns a string then use string operations to search it for text such as dirt / grass, etc... Don't trust mat-type unless there is no other option.
[QUOTE=Acecool;47017185]A lot of mats incorrectly set materials or the texture data incorrectly sets them. If the texture returns something like displacement or studio, I wouldn't worry about it. If it returns a string then use string operations to search it for text such as dirt / grass, etc... Don't trust mat-type unless there is no other option.[/QUOTE] Yeah I noticed that, thanks for the help. I "solved" it by setting up areas for each grass area. It isn't precise, but it will do for now.
Sorry, you need to Log In to post a reply to this thread.