Custom terrain by MeshVertextCoordinates

Everything related to 3D programming
User avatar
Samuel
Enthusiast
Enthusiast
Posts: 755
Joined: Sun Jul 29, 2012 10:33 pm
Location: United States

Re: Custom terrain by MeshVertextCoordinates

Post 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.
User avatar
Lexicon
User
User
Posts: 98
Joined: Mon Jul 22, 2013 6:16 am
Contact:

Re: Custom terrain by MeshVertextCoordinates

Post 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.
PureBasic 5.11 | WinXP | 2GB RAM | GForce GT240
User avatar
Lexicon
User
User
Posts: 98
Joined: Mon Jul 22, 2013 6:16 am
Contact:

Re: Custom terrain by MeshVertextCoordinates

Post 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:
PureBasic 5.11 | WinXP | 2GB RAM | GForce GT240
User avatar
Bananenfreak
Enthusiast
Enthusiast
Posts: 519
Joined: Mon Apr 15, 2013 12:22 pm

Re: Custom terrain by MeshVertextCoordinates

Post 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.
Image
User avatar
Samuel
Enthusiast
Enthusiast
Posts: 755
Joined: Sun Jul 29, 2012 10:33 pm
Location: United States

Re: Custom terrain by MeshVertextCoordinates

Post 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.
User avatar
Lexicon
User
User
Posts: 98
Joined: Mon Jul 22, 2013 6:16 am
Contact:

Re: Custom terrain by MeshVertextCoordinates

Post 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?
PureBasic 5.11 | WinXP | 2GB RAM | GForce GT240
User avatar
Samuel
Enthusiast
Enthusiast
Posts: 755
Joined: Sun Jul 29, 2012 10:33 pm
Location: United States

Re: Custom terrain by MeshVertextCoordinates

Post 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.
User avatar
Lexicon
User
User
Posts: 98
Joined: Mon Jul 22, 2013 6:16 am
Contact:

Re: Custom terrain by MeshVertextCoordinates

Post 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.
PureBasic 5.11 | WinXP | 2GB RAM | GForce GT240
User avatar
Samuel
Enthusiast
Enthusiast
Posts: 755
Joined: Sun Jul 29, 2012 10:33 pm
Location: United States

Re: Custom terrain by MeshVertextCoordinates

Post 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.
applePi
Addict
Addict
Posts: 1404
Joined: Sun Jun 25, 2006 7:28 pm

Re: Custom terrain by MeshVertextCoordinates

Post 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
User avatar
Lexicon
User
User
Posts: 98
Joined: Mon Jul 22, 2013 6:16 am
Contact:

Re: Custom terrain by MeshVertextCoordinates

Post 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

:(
PureBasic 5.11 | WinXP | 2GB RAM | GForce GT240
User avatar
Lexicon
User
User
Posts: 98
Joined: Mon Jul 22, 2013 6:16 am
Contact:

Re: Custom terrain by MeshVertextCoordinates

Post 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:
PureBasic 5.11 | WinXP | 2GB RAM | GForce GT240
applePi
Addict
Addict
Posts: 1404
Joined: Sun Jun 25, 2006 7:28 pm

Re: Custom terrain by MeshVertextCoordinates

Post 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.
User avatar
Lexicon
User
User
Posts: 98
Joined: Mon Jul 22, 2013 6:16 am
Contact:

Re: Custom terrain by MeshVertextCoordinates

Post 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?
PureBasic 5.11 | WinXP | 2GB RAM | GForce GT240
applePi
Addict
Addict
Posts: 1404
Joined: Sun Jun 25, 2006 7:28 pm

Re: Custom terrain by MeshVertextCoordinates

Post 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 ??
Post Reply