Quantcast

Jump to content

» «
Photo

Gims EVO, Terrain shader.

17 replies to this topic
Michno
  • Michno

    Player Hater

  • Members
  • Joined: 08 May 2017
  • Denmark

#1

Posted 08 May 2017 - 08:18 PM Edited by Michno, 08 May 2017 - 09:57 PM.

So i've been testing out the terrain shader religiously these past days. and i've come to a halt i've tried every single thing i could think off

Multiple UV maps
Vertex Colors
Different shader paramerteres.

And i simple cant get any other outcome than this.

http://prntscr.com/f5lm0b

Any help will be greatly appriciated.


Edit1*

This is what i found out so far

Version 165 31
{
    Shaders
    {
        terrain_cb_w_4lyr_2tex_blend_pxm_spm.sps
        {
            TextureSampler_layer0 cs_rsn_sl_mntvegscrub002
            BumpSampler_layer0 cs_rsn_sl_mntvegscrub001_n
            HeightMapSamplerLayer0 nxg_cs_rsn_sl_mntvegscrub001_h
            TextureSampler_layer1 TF_Bushcover_3
            BumpSampler_layer1 TF_Bushcover_3_n
            HeightMapSamplerLayer1 nxg_TF_Bushcover_3_h
            TextureSampler_layer2 cs_TF_rsn_RedGrass1
            BumpSampler_layer2 cs_TF_rsn_RedGrass1_N
            HeightMapSamplerLayer2 nxg_cs_tf_rsn_redgrass1_h
            TextureSampler_layer3 CS_TF_RSN_TrazGrass3
            BumpSampler_layer3 nxg_CS_TF_RSN_TrazGrass3_n
            HeightMapSamplerLayer3 nxg_cs_rsn_tf_tranzbsh2_h
            LookupSampler CS1_TF_RSN_HillsMask1
            MaterialWetnessMultiplier 0.20000000 0.30000000 0.30000000 0.40000000
            BumpSelfShadowAmount 0.30000000
            HeightBias3 0.01500000
            HeightScale3 0.03000000
            HeightBias2 0.01500000
            HeightScale2 0.03000000
            HeightBias1 0.01500000
            HeightScale1 0.03000000
            HeightBias0 0.01500000
            HeightScale0 0.03000000
            ParallaxSelfShadowAmount 0.95000000
            Bumpiness 1.30000000
            SpecIntensityAdjust 1.00000000
            SpecularIntensityMult 0.01000000
            SpecFalloffAdjust 1.00000000
        }


This is a GTA V original shader in open format

Version 165 31
{
	Shaders
	{
		terrain_cb_w_4lyr_2tex_blend_pxm_spm.sps
		{
			BumpSampler_layer0 Asphalt\grassgreennormal.otx
			BumpSampler_layer1 Asphalt\grassgreennormal.otx
			BumpSampler_layer2 Asphalt\grassgreennormal.otx
			BumpSampler_layer3 Asphalt\grassgreennormal.otx
			HeightMapSamplerLayer0 *NULL*
			HeightMapSamplerLayer1 *NULL*
			HeightMapSamplerLayer2 *NULL*
			HeightMapSamplerLayer3 *NULL*
			LookupSampler *NULL*
			TextureSampler_layer0 Asphalt\Asphalt2.otx
			TextureSampler_layer1 Asphalt\SKIDS.otx
			TextureSampler_layer2 Asphalt\SKIDS.otx
			TextureSampler_layer3 Asphalt\SKIDS.otx
			BumpSelfShadowAmount 0.3000000
			Bumpiness 1.0000000
			HeightBias0 0.0150000
			HeightBias1 0.0150000
			HeightBias2 0.0150000
			HeightBias3 0.0150000
			HeightScale0 0.0300000
			HeightScale1 0.0300000
			HeightScale2 0.0300000
			HeightScale3 0.0300000
			MaterialWetnessMultiplier 0.0000000 0.0000000 0.0000000 0.0000000
			ParallaxSelfShadowAmount 0.9500000
			SpecFalloffAdjust 1.0000000
			SpecIntensityAdjust 1.0000000
			SpecularIntensityMult 0.1250000
		}
	}

And this is my made one

now the only diffrence i see is the way it references the image

Dont pay attetion to the *Null* ones. as i've already tried having something there (an image thats power of 2)


Edit2

I now tried making it have no .otx or place reference. but to no help.
 


3Doomer
  • 3Doomer

    GIMS developer

  • Members
  • Joined: 04 Apr 2007
  • None
  • Best Tool 2016 [OpenIV]
    Major Contribution Award [Mods]

#2

Posted 08 May 2017 - 08:44 PM

It would be very nice too see different terrain shaders research and/or tutorial in a topic like this  :lol:  :lol:  :lol:

#IfYouKnowWhatIMean


Michno
  • Michno

    Player Hater

  • Members
  • Joined: 08 May 2017
  • Denmark

#3

Posted 08 May 2017 - 08:45 PM

I will update this thread if i find any news ^^


Mr.Arrow
  • Mr.Arrow

    God Save the Penis

  • Members
  • Joined: 08 Nov 2011
  • United-Kingdom

#4

Posted 09 May 2017 - 12:01 AM Edited by Mr.Arrow, 09 May 2017 - 12:02 AM.

For what are you trying to achieve here? Can you be more explicit please.

Jestic
  • Jestic

    Chris

  • GTA Mods Staff
  • Joined: 16 Oct 2005
  • Netherlands
  • Helpfulness Award
    Contribution Award [Mods]
    Best Conversion 2014 [ViIV for GTANY Contribution]
    Best Map 2011 [IVSA]
    Modding Milestone [IVSA/Ped Paths]
    Best Map 2013 [ViceCityStories PC Edition][Contribution]

#5

Posted 09 May 2017 - 01:05 AM

Can you post a part of the .MESH file? Can't do anything without it.

You're using a blend map ("lookup sampler") so it's crucial you actually exported any UV1 data, as well as VCOL1.


Michno
  • Michno

    Player Hater

  • Members
  • Joined: 08 May 2017
  • Denmark

#6

Posted 09 May 2017 - 01:07 AM Edited by Michno, 09 May 2017 - 01:08 AM.

I want blended textures. You know how the terrain uses several different textures blended ontop of each other. I would give an example but i'm at another pc currently.<

 

i'm working on converting maps from asetto corsa. and i want to shine those maps up. with blended textures. lights and so on.

The only thing left i need to figure out is the terrain shader. everything else seems to work.
well grass fur doesnt show up either actually.



I will see if i can use teamviewer to send it 2 min


Michno
  • Michno

    Player Hater

  • Members
  • Joined: 08 May 2017
  • Denmark

#7

Posted 09 May 2017 - 01:13 AM

But in anycase Jestic. i've tried all of the shaders. and none of them seems to show anything besides the black thing.

And i've got 3 uv layers on this file.

The Vcol i expect to be vertex colors wich i also have.


https://ufile.io/9dpjmHere are the files. plus all of the other ones. sorry if it's too big


Jestic
  • Jestic

    Chris

  • GTA Mods Staff
  • Joined: 16 Oct 2005
  • Netherlands
  • Helpfulness Award
    Contribution Award [Mods]
    Best Conversion 2014 [ViIV for GTANY Contribution]
    Best Map 2011 [IVSA]
    Modding Milestone [IVSA/Ped Paths]
    Best Map 2013 [ViceCityStories PC Edition][Contribution]

#8

Posted 09 May 2017 - 01:26 AM Edited by Jestic, 09 May 2017 - 02:21 AM.

Which .odr\.mesh should I be looking at?


Michno
  • Michno

    Player Hater

  • Members
  • Joined: 08 May 2017
  • Denmark

#9

Posted 09 May 2017 - 01:30 AM

The asphalt one


Michno
  • Michno

    Player Hater

  • Members
  • Joined: 08 May 2017
  • Denmark

#10

Posted 09 May 2017 - 01:40 AM Edited by Michno, 09 May 2017 - 01:40 AM.

Version 43 31
{
    Type BoundComposite
    AABBMin -47131.2187500 -47131.2187500 0.0000000
    AABBMax 47131.2187500 47131.2187500 0.0000000
    Radius 66653.6
    Centroid 0.0000000 0.0000000 0.0000000
    CG 0.0000000 0.0000000 2.7929466
    VertexColors null
    MaterialColors null
    ChildTransforms 1
    {




Version 165 31
{
    Locked false
    Skinned false
    BoneCount 0
    Mask 255
    Bounds
    {
        Aabb
        {
            Min -199.4165649 -199.4165649 0.0000000
            Max 199.4165649 199.4165649 0.0000000
        }
    }
    Geometries
    {
        Geometry
        {
            ShaderIndex 0
            Flags -
            VertexDeclaration N3ED26480
            Indices 17496
            {


These are the .bounds and .mesh

I see that vertex colors says none. but i did assign them in blender.


 


Jestic
  • Jestic

    Chris

  • GTA Mods Staff
  • Joined: 16 Oct 2005
  • Netherlands
  • Helpfulness Award
    Contribution Award [Mods]
    Best Conversion 2014 [ViIV for GTANY Contribution]
    Best Map 2011 [IVSA]
    Modding Milestone [IVSA/Ped Paths]
    Best Map 2013 [ViceCityStories PC Edition][Contribution]

#11

Posted 09 May 2017 - 01:51 AM

I suggest doing some more research on existing GTAV models that use the various terrain shaders, a lot of things are currrently missing\wrong. There's isn't any UV data, so that explans the look it has ingame. The red channel of  the 2nd vertex color must be 0, currently it's 255, otherwise it'll be completely black.


.bound
.mesh

These are the .bounds and .mesh

I see that vertex colors says none. but i did assign them in blender.

Note that i'm only interested in the actual vertex data, not the header.

 

-44.3147888 -29.5431938 0.0000000 / 0.0000000 0.0000000 1.0000000 / 255 0 144 255 / 255 255 255 255 / 1.0000000 -1.0000000 1.0000000 -1.0000000 / 1.0000000 -1.0000000 / 1.0000000 0.0000000 0.0000000 1.0000000
110.7869797 147.7159729 0.0000000 / 0.0000000 0.0000000 1.0000000 / 255 0 250 255 / 255 255 255 255 / 0.0000000 0.0000000 0.0000000 0.0000000 / 0.0000000 0.0000000 / 1.0000000 0.0000000 0.0000000 1.0000000
59.0863876 125.5585709 0.0000000 / 0.0000000 0.0000000 1.0000000 / 255 0 250 255 / 255 255 255 255 / 1.0000000 -1.0000000 1.0000000 -1.0000000 / 1.0000000 -1.0000000 / 1.0000000 0.0000000 0.0000000 1.0000000
 
That tells me exactly how are your uv's and vertex colors are setup.

Michno
  • Michno

    Player Hater

  • Members
  • Joined: 08 May 2017
  • Denmark

#12

Posted 09 May 2017 - 01:54 AM Edited by Michno, 09 May 2017 - 02:13 AM.

How can there not be any UV data when i've got assigned textures that show ?

Just wondering :) ty for taking the time to answer


Also note that the mesh is just a test mesh for me to be able to test and export quickly



In anycase thanks for the help ^^ atleast this gives me some ideas of what to look for.




http://prntscr.com/f5oqm6

Just to show that it should have a UV map



Ahhh alright so the 0 in the mesh is basicly what the bottom texture will be applied to ?


Jestic
  • Jestic

    Chris

  • GTA Mods Staff
  • Joined: 16 Oct 2005
  • Netherlands
  • Helpfulness Award
    Contribution Award [Mods]
    Best Conversion 2014 [ViIV for GTANY Contribution]
    Best Map 2011 [IVSA]
    Modding Milestone [IVSA/Ped Paths]
    Best Map 2013 [ViceCityStories PC Edition][Contribution]

#13

Posted 09 May 2017 - 02:13 AM

How can there not be any UV data when i've got assigned textures that show ?

Just wondering :) ty for taking the time to answer


Also note that the mesh is just a test mesh for me to be able to test and export quickly



In anycase thanks for the help ^^ atleast this gives me some ideas of what to look for.

 

My mistake, I was looking at the bound mesh in 3ds max, which has no uvs, for obvious reasons.

 

So, you either need to use a LookupSampler and\or add some variation to your 2nd vertex color channel, start by changing the green channel so you can get 2 layers working at least.

 

The vertex alpha of the first vertex color channel is also crucial here, it controls wether to use the LookupSampler or the 2nd vertex color channel, 255 means it uses the vertex colors and 0 means it's using the LookupSampler (I suppose you could use 'grey' values, but I haven't tested it not have I seen it in any V mesh)


Michno
  • Michno

    Player Hater

  • Members
  • Joined: 08 May 2017
  • Denmark

#14

Posted 09 May 2017 - 02:36 AM Edited by Michno, 11 May 2017 - 07:09 PM.

Alright. thanks for the help, seems to be the same results so far tho.

Here are the new files if anyone is interested.

https://ufile.io/u0tne




Small update for anyone following this.


No changes so far i found out that blender has some issues with their vertex color so i tried using 3ds max for making the plane. it didint change anything sadly.
i am now trying to use a normal gta v model to use my own textures on. if i cant get that to work. i think it may have something to do with how i load the terrain in.


Michno
  • Michno

    Player Hater

  • Members
  • Joined: 08 May 2017
  • Denmark

#15

Posted 12 May 2017 - 08:15 PM Edited by Michno, 13 May 2017 - 03:34 PM.

Figured it out !

All that needed to be changed was the name of the UV channel ^^

it needs to be UVChannel_001



Seems i still need to change some stuff as this only fixed some of the issues ^^ but it's a step in the right direction


nkjellman
  • nkjellman

    OG

  • Members
  • Joined: 28 Aug 2008
  • United-States

#16

Posted 16 May 2017 - 12:52 AM

Blended textures would be fantastic on custom maps. I hope you continue to make progress.

 

It will definitely make the maps look more natural, and less artificial.


Michno
  • Michno

    Player Hater

  • Members
  • Joined: 08 May 2017
  • Denmark

#17

Posted 18 May 2017 - 11:32 PM

Still doing work. ^^ i got alot of it working. 3ds seems to be needed. and have 2 layers of vertex colors. one color and one illumination.


Michno
  • Michno

    Player Hater

  • Members
  • Joined: 08 May 2017
  • Denmark

#18

Posted 2 weeks ago

Still trying to make progress. Not much is working tho. ripping my hair out here.

Any help will be greatly appricated.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users