About Store Forum Documentation Contact
Donations:
345$/mo



Post Reply 
Terrain Decal Clipping Problem
Author Message
fatcoder Offline
Member

Post: #1
Terrain Decal Clipping Problem
I've noticed that when scaling up terrain decals, they appear to be getting clipped by the view near plane.

For example, add the following line of code to the Update() method in the Pathfind tutorial. Just after the decal.matrix.setPosDir(...) line.

Code:
decal.matrix.scaleOrn(32);

Then run the tutorial and click on the terrain to display the yellow star decal. Move the camera around and you'll see the decal getting clipped.

If you then change the scale so it only scales in the xz plane, the clipping goes away. Like this.

Code:
decal.matrix.scaleOrn(Vec(32,1,32));

However then the decal only applies to 1 unit (on the y-axis) of geometry. Try clicking on the rocks to see what I mean. You'll also notice it if you add a hill to the terrain.

Is there any way to scale a decal up to cover a large area of the terrain without clipping?
05-28-2012 04:02 AM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #2
RE: Terrain Decal Clipping Problem
Thanks, fixed for next SDK
05-30-2012 05:00 PM
Find all posts by this user Quote this message in a reply
Post Reply