I am trying to compile SPT2 with Ogre 1.6 SDK and Visual Studio 2008 and I am getting a lot of errors.
One of them is:
Code: Select all
..\src\QNode.cpp(28) : error C2027: use of undefined type 'SPT::Terrain'
Any idea about this?
Code: Select all
..\src\QNode.cpp(28) : error C2027: use of undefined type 'SPT::Terrain'
Buckcherry wrote:Well, I found the problem.
I had defined "..\include" AFTER "$(OGRE_HOME)\include", so it was taking the Terrain.h from the Ogre folder rather than from the SPT include folder.
By the way, is it possible to change the texture of the terrain dinamically?
I'm afraid this isnt going to work, you will need to get the actual TextureUnitState of the texture you want to change and just call SetTextureName(newTextureName) on that unit state or using terrain->setSelectedTexture(newTextureName)lvlnx wrote:yeah like this:
"terrain->setMaterial("Material.003/TEXFACE/books.png");"
I'm not sure I understand this correctly. How would one than move the camera letting the terrain stay in place?now the camera is always at 0,0,0 and the world moves with it and adjusts new tile geometry based on how far away from the center the camera has accumulated over time. This keeps that stupid vertex jittering from happening at huge distances.
Code: Select all
Ogre::String Terrain::getDefaultMaterialScheme()
{
if (mTerrainMaterial.isNull() == false)
{
if (mTerrainMaterial->getCompilationRequired())
// It falls through and performs this when it gets called.
mTerrainMaterial->compile();
return mTerrainMaterial->getBestTechnique()->getSchemeName();
}
return "";
}
[SOLVED - this part]HexiDave wrote:A lot of the OpenGL compatibility may be missing from the SVN copy, but I think you're at the spot where older graphics cards fail a test to use non-Power-of-Two textures and it resizes. However, due to some odd-ball issue, I think it just explodes. I had started adding ETM's light-mapper code (for CPU-side where GPU fails), but it got lost in a sea of project tests and ideas.
Ha yea I had the light commented out . The only way I can get it to run is under D3D with the light on but with it on the world texture is all sorts of messed up. When I move the texture does this weird splitting and swimming thing. Hard to explain so I attached a few images.HexiDave wrote:I'm guessing the new method of using base materials (using "import * from blah.material" at the top of material files) isn't on the SVN copy.
Edit: Heh, you got your edit in before my post.
Do you have the directional light pointing downwards in the scene? There's a lot of funky issues with the materials I created because I was trying so many shader tests out at the time.
There's actually nothing wrong with doing that - in a commercial project I worked on we used code-level material generators and ubershaders which would build new variants of materials depending on the options selected. OgreSpeedTree does something very similar actually - so when you request that fog is enabled for example, it generates a new shader compiled with different options and wraps it in a new material - a simple hierarchical naming scheme means I can re-use that next time so switching back and forth is fast.HexiDave wrote:I couldn't find a reasonable method to switch them on and off inside the running engine without creating separate materials/shaders for each thing.
Yeah I've had the same problem when I compiled SPT on my own.HexiDave wrote:Oh GOD. I don't even know with that one. Probably Cg trying to stuff textures where they don't belong (which was the reason I had made so many different shaders - couldn't figure out why things looked wrong, and it was just Cg trying to use the wrong textures).
I've been following this topic since '07, definitely looking forward to checking out whatever you come up withHexiDave wrote:I will say this, though: SPT is going through an overhaul over the next months - and this time I'll have help. I won't say who or when, but it will get done even if SPT is just used as a starting point.
sources are in ogreaddons (as jacmoe said a few posts up ):MaxWave wrote:Where i can to download binary and does sources avaible?