Community Forum

Applying water shader turns custom river black

Forum Overview >> Farming Simulator 19

CategoryFarming Simulator 19
Created08.11.2019 13:17


Ola Haldor Solvik Voll (OlaHaldor) 08.11.2019 13:17
I have a river flowing through my map, and I imported the river mesh from mapDE. They look fantastic, however when I apply the same shader on my custom river mesh, it turns black. I can see the normal map working and flowing though.

Bilbo Beutlin (BBeutlin) 09.11.2019 03:26
Compare your waterplane with a default one, espec. heed
- user attribute "onCreate:Environment.onCreateWater"
- setup of shape flags/properties
- setup of used material, usually "waterXX_mat"

Ola Haldor Solvik Voll (OlaHaldor) 10.11.2019 21:31
I've checked and checked again. All flags, attributes and settings are exactly the same. The material name as well.

Bilbo Beutlin (BBeutlin) 10.11.2019 22:34
You have checked merely in GE?
Load the i3d into text editor. The water material should have entries like (example)
<Material name="water_mat" materialId="206" diffuseColor="1 1 1 1" specularColor="1 1 1" customShaderId="388">
<Normalmap fileId="387"/>
<Reflectionmap lodDistanceScaling="0.5" viewDistanceScaling="0.5" type="planar" scaling="1" refractiveIndex="1.03" bumpScale="0.1" shapesObjectMask="256" lightsObjectMask="16777216"/>
<Refractionmap coeff="1" bumpScale="0.1"/>
<CustomParameter name="bumpSpeedScale" value="-1 -3.75 0.02 1"/>
<CustomParameter name="underwaterFogColor" value="0.05 0.103 0.13 1"/>
<CustomParameter name="windScale" value="0.25 0 0 0"/>
</Material>
At least Normalmap and Reflectionmap are necessary.

Also make sure, the map has ONE waterplane with user attribute "isMainWater: true" and this should be the plane with the lowest y-value/translation.

Ola Haldor Solvik Voll (OlaHaldor) 10.11.2019 23:48
Are you saying I must make my custom river mesh as an i3D file, instead of importing as an FBX?
I thought this was the sole reason for FBX import being possible in the first place. :)

Yes, I've only checked in GE. I opened the river I exported from mapDE in a text editor and it's all there. I don' think it would populate the data and values in GE if it wasn't ?


Please have a look. https://youtu.be/ex6nkZqo2FM
I noticed I didn't apply the main water or oncreate attributes, but that really has no effect whether its there or not, in this case.

Ola Haldor Solvik Voll (OlaHaldor) 11.11.2019 00:45
I made a new model, just to see if there can be something wrong with the one I made originally.

On import of the fbx I got this: Error: 'Orkla' () doesn't have all required vertex attributes for material 'waterOrkla_mat'.

Not sure what that means. The GE documentation is pretty... limited.. Hopefully it's a clue in the right direction.

Derek Squire (dezza069) 11.11.2019 02:53
Not wanting to sound smart, but to help you understand the answer is presented in the error message.

(object) "doesn't have all required vertex attributes for material"

what is a:

vertex??

attribute??

doesn't have all required??

material??

-----------

(A: The vertex's in the mesh do not have the correct number of attributes to hold the material you're trying to use, you'll need to add another UV-map layer to the vertex's in the object's mesh.)

Ola Haldor Solvik Voll (OlaHaldor) 11.11.2019 10:43
I get why you're putting question marks behind that. That error message is so generic it's hard to understand WHAT exactly is missing in vertex info. It could've been weight map, vertex color map, tangent map, or a whole lot of other things.

And this is evidence the GE documentation is poor, lacking, and does require a lot of asking around to get stuff done.

I'm really glad you guys hop in and answer, being more educated in GE than I am. I just wish a lot of these things were covered properly.
A list of requirements for water mesh, a list of attributes that can be used on fields etc. would go a long way, and you veterans wouldn't feel you're repeating yourself answering "noob questions" :)

That said; I'll try to make a second UV channel and see how it goes.
I would never have guessed it, because exporting OBJ will only export one UV channel. If I had seen a second UV channel when I loaded the mesh in Modo, I would of course have tried that too.

Ola Haldor Solvik Voll (OlaHaldor) 11.11.2019 11:05
I made a second UV channel. It had no visible effect. I'm at a loss here.


I can send you the FBX file for you to investigate if you like. Or if you could send me a sample FBX you know for a fact is working so I can have a look at it.

Ola Haldor Solvik Voll (OlaHaldor) 12.11.2019 11:22
Okay, I uploaded the fbx here. Please have a look, see if you can get it working on your end, or tell me what's wrong with it?

http://www.olahaldor.net/prjct/fs19/orkla.fbx

Ola Haldor Solvik Voll (OlaHaldor) 15.11.2019 12:36
Have you had a chance to open the file?

Do you have some actual knowledge of what could be missing except the obvious "use same attributes and material" ?

As I said; exporting an OBJ of the river mesh from mapDE does not include what info might be missing. Wish GE could export FBX as that can contain a lot more vertex info.

Allen J Romine (Unknown) 15.11.2019 22:08
ok

Ed Weatherup (Blue_Painted) 18.11.2019 09:25
Jumping in with a question: does the main water plane have to be the whole size of the map? Or just the lowest?

Bilbo Beutlin (BBeutlin) 18.11.2019 10:53
The size and form doesn't matter. Recommanded for main water is the lowest plane.


Note: Log in to post. Create a new account here.