Forums Gallery Downloads LOGIN |REGISTER

change surface type ingame

Particle Effects Setup and Customization. Material Editor and Shader Properties.


 

User avatar
Mael8
Just getting started
Just getting started
 
Posts: 10
Member since: 27.07.2009, 19:42
Likes: 1

change surface type ingame

Postby Mael8 » 24.06.2012, 04:57

Hi,

I'm trying to change the surface type (mat_concrete => mat_water) of a GeomEntity using a event with a DestroyableObject.

First, I tried using a Entity:Material : when the game start, the GeomEntity has the texture floor.cfg with a surface type mat_concrete ; and when the DestroyableObject is dead, the texture is suppose to change to floorwet.cfg (where of course the surface type is mat_water). It didn't work.

Second, I tried using 2 GeomEntity : when the game start, the GeomEntity which has the texture floor.cfg is unhidden and the GeomEntity which has the mat_water surface type is hide. When the DestroyableObject is dead the first GeomEntity is hide and the second one is unhidden. It didn't work too.

The two options is in the same flowgraph in the attached files.

One precision very odd. If, instead of only change the surface type, I changed the diffuse color in the lighting settings it works, the diffuse color change with the both option with the same flowgraph (so I suppose my flowgraph is correct). Of course if I change the diffuse color AND the surface type, only the diffuse color is changes.
Another precision : I'm using sandbox with crysis 2, not the CryEngine3 SDK

I don't know if I'm doing bad or if it's "normal"

I'm open to any suggestions.

Thank you

edit : show options in the picture
Attachments
flowgraph.png
flowgraph
Last edited by Mael8 on 12.07.2012, 15:31, edited 1 time in total.
Spify
Not my first Rodeo
Not my first Rodeo
 
Posts: 489
Member since: 20.07.2011, 10:22
Location: Frankfurt am Main
Likes: 5

Re: change surface type ingame

Postby Spify » 25.06.2012, 11:54

You flowgraph contains a logical flaw. In your FG you hide GeomEntity1 and apply some material to it...of course you won't see any result because the entity is hidden.
So what's the point in applying the material when you hide the object?
User avatar
Mael8
Just getting started
Just getting started
 
Posts: 10
Member since: 27.07.2009, 19:42
Likes: 1

Re: change surface type ingame

Postby Mael8 » 06.07.2012, 16:24

Hi, thanks for your answer,

Ok, it's my bad : the FG I put here is not the FG I used, it showed the 2 options in the same picture. The first options is only with the Entity:Material and the second one is only with entity:GeomEntity.
User avatar
Mael8
Just getting started
Just getting started
 
Posts: 10
Member since: 27.07.2009, 19:42
Likes: 1

Re: change surface type ingame

Postby Mael8 » 06.07.2012, 21:22

Ok, I think I find where the problem is. It's like if the editor can't put different surface type to geomEntity if they are from the same cgf.

It's may hard to explain, so I made a video to expose it (40sec) :


As you can see, if I made 2 different cgf (in the left), I can have two different surface type. But in the right where there is only one cgf for both geomEntity, the surface type "ingame" is the last material loaded.

I found it very odd, but is that normal ???
Attachments
surface type.png
surface type problem ?


 
Connect and collaborate with CRYENGINE developers in the official Forums.
Visit the Gallery to share what you have created and be inspired by what others are creating with CRYENGINE.
Community