I’ve been looking at Freeworld3d for terrain creation. I’ve had a little experience modding with CryEngine and liked their terrain editor. Freeworld3d has similar tools as the CryEngine terrain editor and it exports to .X so it should work pretty well. I especially love their texture tools!
Anyone have any experience with it in Panda3d yet?
I just bought it and will begin to use it within the next week.
Right now, Im using geoscape 3D which is making some interesting lands. What I dont get is how to generate faraway textures (ala 512x512 terrain texture) AND do localized higher-rez textures at the same time?
Do you mean how one goes about generating low-quality textures for objects at a distance, but having them become high-quality when you get closer?
If you’re talking about within the Panda engine, that’s a technique called “mipmapping.” Panda3D supports this (I believe) through the mipmap filter options on the Texture class. I’m afraid I’ve never used them before, so I can’t be more helpful. Does anyone know more about Panda3D’s mipmap support?
Usually, people use multitexture to solve this sort of problem. Paint a detail texture, for instance 512x512, but design it so that it can repeat, and tile it over the entire surface at a fine resolution. The detail texture would just have some high-resolution noise in it to suggest grains of sand or blades of grass or something.
Use multitexture to layer both of the textures together. The Panda3D manual describes how to do this at runtime.
You can also, of course, set up all the texture layers in your modeling package, but this requires that your modeling package and exporting tool understand multitexture. I don’t think the X file format supports multitexture, so if you are converting via .x files, you can’t go this route.
This is a bit more of a challenge. Fundamentally, a texture has to be applied to all of a piece of geometry, or none of it. That’s the reality of real-time graphics rendering. But there are two basic approaches to creating the appearance of a texture on just a portion of your geometry:
(1) Apply the texture over all of the geometry, but do it in such a way so that it is only visible over the part where you want it, and completely transparent everywhere else. One way to do this is by using tex.setWrapU/V(Texture.WMBorderColor), for instance, so that the texture isn’t visible beyond its 0…1 UV range, and then using the appropriate nodePath.setTexScale()/setTexOffset() to make the texture the size you want, and slide it around to the place you want.
(2) Cut out the piece of geometry that you want to have this small texture, and make it a separate Geom (or GeomNode, for convenience). Then apply your texture just to that Geom or GeomNode.
The downside of (1) is that you can only layer so many textures on a given piece of geometry, so if you want to have one little texture here, and another little texture there, and a third little texture over there, you’ve just used up three of your available texture stages.
The downside of (2) is that overly subdividing your geometry can result in impaired frame rate. It may also be more complicated to do this.
In practice, many games opt for a combination of (1) and (2). You might cut the terrain into fairly large grid squares, for instance, and then apply the texture just to the appropriate grid square(s), in such a way that it is transparent where it is not wanted. Then you can apply as many different texture pieces as you like, as long as you apply them all to different grid squares (or no more than some pre-defined n on the same grid square).