General CE3 Discussion

View unanswered posts | View active topics


Post a new topicPost a reply
Previous topic | Next topic 

  Beginner BeginnerMember since: 14.12.2011, 18:48Posts: 77 Likes: 8
 

 Post Topic: Change terrain C++ code
PostPosted 24.03.2012, 20:14 
Good afternoon, I was wondering in which file is the terrain code included?
I'm thinking of making it deform in real time, hence I need to know where its code lies.

Thanks for your time.

User avatar   Skilled Modder Skilled ModderMember since: 29.05.2010, 11:46Posts: 768Location: Germany Likes: 11
 

 Post Topic: Re: Change terrain C++ code
PostPosted 25.03.2012, 00:43 
Its in the part of the engine that is not accessible for SDK users.



C++ Video tutorials - Plugin SDK - Videoplayer Plugin - Direct3D Plugin - OpenOutcast Oasis 1.1

-
Don't PM for help, post so that everyone can respond.
  Beginner BeginnerMember since: 14.12.2011, 18:48Posts: 77 Likes: 8
 

 Post Topic: Re: Change terrain C++ code
PostPosted 25.03.2012, 11:45 
Indeed I too though of that, but according to CryEngine's SDK FAQ (files/CryENGINE_3_Free_FAQ.pdf):
Quote:
2. Is it the same Engine Crytek use in their Games?
Yes, we'll be giving you access to an up to date version of CryENGINE 3 − the engine we use, the engine we give to our licensees and the same engine that powers Crysis®2 and Warface®. This will be a complete version of our technology including C++ game code access, our content exporters, script samples, new improved Flowgraph and a host of great asset examples, which will allow teams to build complete games from scratch for PC.


"be a complete version of our technology including C++ game code access" , guess they mean access to the game's C´++ core, not to the engine's.
User avatar   Crytek Staff Member Crytek Staff MemberMember since: 02.08.2005, 19:01Posts: 2162Location: Crytek HQ Likes: 2
 

 Post Topic: Re: Change terrain C++ code
PostPosted 25.03.2012, 12:12 
Quote:
be a complete version of our technology...

Binary version (DLLs).
Quote:
...including C++ game code access

Gamelogic Sourcecode.

Releasing the full engine sourcecode for free would be a bit...too much i think. ;)


User avatar   Hardcore Modder Hardcore ModderMember since: 28.10.2007, 15:25Posts: 844Location: Denmark Likes: 1
 

 Post Topic: Re: Change terrain C++ code
PostPosted 25.03.2012, 14:44 
It is an interesting question though, with CryEngine being all "realtime all the time" you'd think terrain deformation would be right up your alley.
  Beginner BeginnerMember since: 14.12.2011, 18:48Posts: 77 Likes: 8
 

 Post Topic: Re: Change terrain C++ code
PostPosted 25.03.2012, 19:46 
Indeed BmB, there are two issues with it:
1st - It can't be used by the current technology which most users have, only by what is the current top of the line in terms of hardware, perhaps in a couple of years its doable for most users.
2nd - Replicating that info over the network is a pain in the butt since there are major security issues with it.

Fortunately my team and I are thinking of implementing this and we've already came across a good reliable,efficient and secure solution, but useless to be used for now ^^
User avatar   Crytek Staff Member Crytek Staff MemberMember since: 02.08.2005, 19:01Posts: 2162Location: Crytek HQ Likes: 2
 

 Post Topic: Re: Change terrain C++ code
PostPosted 28.03.2012, 21:03 
Quote by BmB:
It is an interesting question though, with CryEngine being all "realtime all the time" you'd think terrain deformation would be right up your alley.

It is (the terrain system supports modifications on the fly, even in pure game mode). It was even used in CryENGINE 1 (FarCry). Never really used afterwards though. Still "realtime all the time" :P


User avatar   Crytek Staff Member Crytek Staff MemberMember since: 11.07.2008, 20:25Posts: 11646Location: Frankfurt am MainStatus: Online Likes: 21
 

 Post Topic: Re: Change terrain C++ code
PostPosted 28.03.2012, 21:11 
Code:
ITerrain::SetTerrainElevation(int x1, int y1, int nSizeX, int nSizeY, float *pTerrainBlock, unsigned char *pSurfaceData, uint32 *pResolMap, int nResolMapSizeX, int nResolMapSizeY)

looks like it ought to do what you want. Not entirely sure on the parameters however.

You can access the terrain via gEnv->p3DEngine->GetITerrain() (though note that some terrain stuff is done directly in the 3D engine).


Junior server programmer, ex-community rep
User avatar   Uber Modder Uber ModderMember since: 21.10.2011, 23:50Posts: 1728Location: Bikini Bottom, Germany Likes: 0
 

 Post Topic: Re: Change terrain C++ code
PostPosted 28.03.2012, 22:21 
Quote by Horus_:
Indeed BmB, there are two issues with it:
1st - It can't be used by the current technology which most users have, only by what is the current top of the line in terms of hardware, perhaps in a couple of years its doable for most users.

Battlefield 3?! BFBC2?! :rolleyes: ru s even on consoles


[cryorange]Cheers from Germany
[center]ImageImage


Last edited by NeoLegends on 29.03.2012, 13:26, edited 1 time in total.
User avatar   Experienced Modder Experienced ModderMember since: 13.12.2011, 19:25Posts: 511Location: Argentina Likes: 0
 

 Post Topic: Re: Change terrain C++ code
PostPosted 29.03.2012, 02:00 
Quote by Cry-JR:
Quote by BmB:
It is an interesting question though, with CryEngine being all "realtime all the time" you'd think terrain deformation would be right up your alley.

It is (the terrain system supports modifications on the fly, even in pure game mode). It was even used in CryENGINE 1 (FarCry). Never really used afterwards though. Still "realtime all the time" :P


Interesting...So, in theory, I can change a dry ground to sticky mud and then to some kind of lagoon after the fall of a lot of rain.
User avatar   Uber Modder Uber ModderMember since: 21.10.2011, 23:50Posts: 1728Location: Bikini Bottom, Germany Likes: 0
 

 Post Topic: Re: Change terrain C++ code
PostPosted 29.03.2012, 13:24 
You should be able to place decals via FG...


[cryorange]Cheers from Germany
[center]ImageImage
  Beginner BeginnerMember since: 14.12.2011, 18:48Posts: 77 Likes: 8
 

 Post Topic: Re: Change terrain C++ code
PostPosted 04.04.2012, 15:25 
[quote="NeoLegends]
Battlefield 3?! BFBC2?! :rolleyes: ru s even on consoles[/quote]

True NeoLegends, but its done at a very small scale, terribly limited and in BF3's case, they had to 'hack' their way through, which created a ton of bugs which even today are present. Most of them got eliminated in the Beta - Operation Metro, I'm sure you're familiar with the bugs - but some remain, due to the fact that its mostly a hack instead of a feature.
User avatar   Hardcore Modder Hardcore ModderMember since: 28.10.2007, 15:25Posts: 844Location: Denmark Likes: 1
 

 Post Topic: Re: Change terrain C++ code
PostPosted 04.04.2012, 18:12 
Well as far as I know the biggest problem is hardly performance (hl2 originally had terrain deformation but it was scrapped after the leak and all that) but rather the fact that you usually have a bunch of data tied to the terrain, lightmaps, decals, detail objects etc. and deforming it would make the level look very weird indeed because that data can't follow the terrain.