Page 2 of 3

Re: Custom terrain by MeshVertextCoordinates

Posted: Tue Mar 11, 2014 8:16 pm
by Samuel
All three light types work in the example I posted above. So, it must be something else.
Are you using EntityRenderMode(#Entity, 0) on the spheres too? If you did that's what caused your problem.

TextureAdditive shadows have a limitation where they can only cast or receive shadows, but they can't do both at the same time.
When you use EntityRenderMode(#Entity, 0) your saying you want this entity to receive shadows, but then it can't cast them.
So, when using TextureAdditive you need to make choices. Which entities will receive shadows and which ones will cast shadows.

This limitation does not exist with Additive or Modulative types because they are stencil shadows.

Re: Custom terrain by MeshVertextCoordinates

Posted: Wed Mar 12, 2014 4:41 am
by Lexicon
Samuel wrote:All three light types work in the example I posted above. So, it must be something else.
Are you using EntityRenderMode(#Entity, 0) on the spheres too? If you did that's what caused your problem.

TextureAdditive shadows have a limitation where they can only cast or receive shadows, but they can't do both at the same time.
When you use EntityRenderMode(#Entity, 0) your saying you want this entity to receive shadows, but then it can't cast them.
So, when using TextureAdditive you need to make choices. Which entities will receive shadows and which ones will cast shadows.

This limitation does not exist with Additive or Modulative types because they are stencil shadows.
Thanks Samuel! I'm ready to use an Additive mode, i.e. fantastic view.

http://radium3dengine.com/img/shot_2014 ... -33-10.JPG

http://radium3dengine.com/img/shot_2014 ... -44-04.JPG

I'll sort out my program gradually for find error.

Re: Custom terrain by MeshVertextCoordinates

Posted: Wed Mar 12, 2014 10:25 am
by Lexicon
YES! :D

http://radium3dengine.com/img/shot_2014 ... -11-47.JPG

I have replace EntityRenderMode() by BuildMeshShadowVolume() and shadows are present.
I don't know why. :|

Thanks comrades! :wink:

Re: Custom terrain by MeshVertextCoordinates

Posted: Wed Mar 12, 2014 10:31 am
by Bananenfreak
So, you only added BuildMeshShadowVolume() and you can use other shadowtypes? I will try it.

EDIT: No Change for me, I don“t see any shadow on Default Terrain.

Re: Custom terrain by MeshVertextCoordinates

Posted: Wed Mar 12, 2014 10:47 am
by Samuel
The default terrain only supports Modulative shadows for now. The other two give graphic issues.

Lexicon is using his own terrain which is why he can use all three types of shadows.
The BuildMeshShadowVolume() is sometimes required if you created the mesh in a modeling software.
I forget why though.

Re: Custom terrain by MeshVertextCoordinates

Posted: Thu Mar 13, 2014 9:12 am
by Lexicon
Samuel wrote:Lexicon is using his own terrain which is why he can use all three types of shadows.
Yes. I saved my terrain by SaveMesh() and try to convert it into *.xml format by OgreXMLConverter.

Result

14:02:25: Creating resource group General
14:02:25: Creating resource group Internal
14:02:25: Creating resource group Autodetect
14:02:25: Registering ResourceManager for type Mesh
14:02:25: Registering ResourceManager for type Material
14:02:25: Registering ResourceManager for type Skeleton
14:02:25: OGRE EXCEPTION(7:InternalErrorException): Cannot find serializer implementation for current version [MeshSerializer_v1.8] in MeshSerializer::importMesh at ..\..\..\..\OgreMain\src\OgreMeshSerializer.cpp (line 118)
14:02:25: Unregistering ResourceManager for type Skeleton
14:02:25: Unregistering ResourceManager for type Material
14:02:25: Unregistering ResourceManager for type Mesh

:( What's wrong I do?

Re: Custom terrain by MeshVertextCoordinates

Posted: Thu Mar 13, 2014 9:12 pm
by Samuel
What version of OgreXMLConverter are you using?
I think most versions of Ogre have had changes to their mesh format. If your using an older version of the converter it can't understand the newer mesh formats.
I have OgreCommandLineTools 1.7.2 and last time I checked it was working. It has been a while since I've used it though. So, I'll have to do a double check on it later.

Re: Custom terrain by MeshVertextCoordinates

Posted: Thu Mar 13, 2014 9:45 pm
by Lexicon
Samuel wrote:What version of OgreXMLConverter are you using?
I think most versions of Ogre have had changes to their mesh format. If your using an older version of the converter it can't understand the newer mesh formats.
I have OgreCommandLineTools 1.7.2 and last time I checked it was working. It has been a while since I've used it though. So, I'll have to do a double check on it later.
Try to download this mesh:

http://radium3dengine.com/img/terrain_01.mesh

Save as... Load to your program, and try to convert. And help me please.

Re: Custom terrain by MeshVertextCoordinates

Posted: Fri Mar 14, 2014 3:32 am
by Samuel
With 1.7.2 I get the same error as you. I'm not sure if they have released a newer version of the converter.
If you can't get the converter to work. You could always try creating your own XML file with the required mesh information.

Re: Custom terrain by MeshVertextCoordinates

Posted: Fri Mar 14, 2014 6:09 am
by applePi
i don't have knowledge with the xml, but download ogre sdk from http://www.ogre3d.org/download/sdk
this one: OGRE 1.9 SDK for Visual C++ 2008 (32-bit)
extract it to some folder and copy your mesh to its bin\Release and apply OgreXMLConverter to it , here is the output

Code: Select all

C:\ogre\OgreSDK_vc9_v1-9-0\bin\Release>OgreXMLConverter terrain_01.mesh

-- OPTIONS --
source file      = terrain_01.mesh
destination file = terrain_01.mesh.xml
log file         = OgreXMLConverter.log
interactive mode = false
lod levels       = none (or use existing)
Generate edge lists  = 1
Generate tangents = 0
 semantic = TANGENT
 parity = 0
 split mirror = 0
 split rotated = 0
Reorganise vertex buffers = 1
Optimise animations = 1
-- END OPTIONS --

Creating resource group General
Creating resource group Internal
Creating resource group Autodetect
Registering ResourceManager for type Mesh
Registering ResourceManager for type Material
Registering ResourceManager for type Skeleton
XMLMeshSerializer writing mesh data to terrain_01.mesh.xml...
Populating DOM...
Writing submesh...
Dedicated geometry bone assignments exported.
Submesh exported.
DOM populated, writing XML file..
XMLMeshSerializer export successful.
Unregistering ResourceManager for type Skeleton
Unregistering ResourceManager for type Material
Unregistering ResourceManager for type Mesh

C:\ogre\OgreSDK_vc9_v1-9-0\bin\Release>
attached the converted file
http://www.2shared.com/file/HvyOlqec/te ... 1mesh.html

EDIT: here is the OgreXMLConverter.exe + OgreMeshUpgrader + OgreMain.dll taken from the above sdk, it may needs visual C++ 2008 run time
http://www.2shared.com/file/kMaChobH/Og ... erter.html

Re: Custom terrain by MeshVertextCoordinates

Posted: Fri Mar 14, 2014 10:30 am
by Lexicon
1. Downloading SDK
2. Extracting
3. Copy to C:\OgreSDK
4. Run OgreXMLConverter terrain_01.mesh
5. Error executing program
6. Run OgreXMLConverter
7. Error executing program

WinXP 32 bit

:(

Re: Custom terrain by MeshVertextCoordinates

Posted: Fri Mar 14, 2014 10:34 am
by Lexicon
applePi wrote:EDIT: here is the OgreXMLConverter.exe + OgreMeshUpgrader + OgreMain.dll taken from the above sdk, it may needs visual C++ 2008 run time
http://www.2shared.com/file/kMaChobH/Og ... erter.html
It's working fine! :shock:

Re: Custom terrain by MeshVertextCoordinates

Posted: Fri Mar 14, 2014 11:19 am
by applePi
i find that drag and drop your mesh file over the OgreXMLConverter.exe icon will run it in a command prompt then it will convert your mesh to xml. but the command prompt will close immediately.

Re: Custom terrain by MeshVertextCoordinates

Posted: Fri Mar 14, 2014 1:54 pm
by Lexicon
applePi wrote:i find that drag and drop your mesh file over the OgreXMLConverter.exe icon will run it in a command prompt then it will convert your mesh to xml. but the command prompt will close immediately.
No, OgreXMLConverter.exe from your link is working. But the same file from Ogre official site is not!
What's going on?

Re: Custom terrain by MeshVertextCoordinates

Posted: Fri Mar 14, 2014 2:16 pm
by applePi
have you downloaded the sdk which are refered to by the arrow:
Image
surely you have the vc++ 2008 run time files because you are able to run the files i have posted which are they made for vc++ 2008 (ie vc9)
this is the path for my files:
C:\ogre\OgreSDK_vc9_v1-9-0\bin\Release
what is the error message from the command prompt ??