• Welcome to PiBoSo Official Forum. Please login or sign up.
 
April 28, 2024, 08:17:28 AM

3d grass & shaders problem

Started by JJS209, July 01, 2015, 09:11:10 AM

Previous topic - Next topic

JJS209

hi everyone,

i figured it out how to add 3D grass and shaders to textures.
now i have two problems:

1st one is that the reflection of the sun on the tarmac is much to intensive i think and i would like to know if i just need to change some of the settings in the *.shd file? when yes, which values are good to use?
the second problem is the draw distance of the 3d grass, yea, i really dont know what to do about this thing :(

https://www.youtube.com/v/a351Z5pGcmw

thanks for help!

cheers
jan

PiBoSo

Quote from: JJS209 on July 01, 2015, 09:11:10 AM
hi everyone,

i figured it out how to add 3D grass and shaders to textures.
now i have two problems:

1st one is that the reflection of the sun on the tarmac is much to intensive i think and i would like to know if i just need to change some of the settings in the *.shd file? when yes, which values are good to use?
the second problem is the draw distance of the 3d grass, yea, i really dont know what to do about this thing :(

https://www.youtube.com/v/a351Z5pGcmw

thanks for help!

cheers
jan

A specular map must be used to tune the light reflections.

Is the 3D grass black on purpose?
"La perfezione non è il nostro obiettivo, è la nostra tendenza".

JJS209

its the 3d grass outta your mxbikes track example.

JJS209

July 01, 2015, 12:00:10 PM #3 Last Edit: July 01, 2015, 03:20:36 PM by JJS209
ok i use a *.shd file with this content:
bump
{
map = road_tarmac_bump01.tga
}

and it works.



but i dont understand this spec map thing, anyone got a good tutorial?


and what am i doing wrong with the 3d grass files?
i used the ones out of the grassfx.tga (grass_blades.tga) and grass.tga (grass_color.tga) out of the maps folder with this settings in the *.grs file:

max_density = 12
height = 0.35
height_diff = 0.1
width = 0.4
width_diff = 0.05
texture = grass_blades.tga
colormap = grass_color.tga


€: tried out the 3D grass from johor and it makes not difference. yes, the grass is another but its still only visible in a radius of ~25m.

€€: its really hard for me to make progress. i can figure out all my problems only halfway through.
      3d grass not working correctly. what does it take to see it for more than 25m?
      textures working but shininess is the next mystery.

Steven

July 01, 2015, 08:39:18 PM #4 Last Edit: July 01, 2015, 09:09:58 PM by Steven
I'll try to tell you what I know, maybe it helps.

The strenght of the shininess is controlled by the value for shininess in the .shd and the color/transparency of the alpha channel of the specular map.
The shininess gets less with a higher value - there seems to be no real limit.
And the shininess gets less with a alpha channel closer to black - black is not shiny and white very shiny (all the shininess-value allows).
I don't know how both influence each other, but maybe it's a start to use a value of about 10 and do the rest with the specular map.

I found it very good for example to make several planes in 3ds Max with a stone or street texture or something but each with another .shd file connected so you can see the differences. And you can use the Map Viewer to see it immediately.

For changing the textures/alpha channel for example I use GIMP.

About the grass:
I think the distance is as it is. (I never have 3D Grass on so I don't know - maybe it changes with the drawing distance?)
You could try to make the grass fit to the ground texture a bit better and/or make it smaller so it vanishes in the distance and doesn't just stop.
It looks like you used the color map as well. The color map colors the grass texture (with black, yellow, red, blue on your color map you get black, yellow, red, blue grass ...). Maybe delete that first to see wether it looks a bit less eye-catching.

If something is unclear or you need some further explanation just ask.

JJS209

i think the 3D grass "problem" is not a problem, i seems to be normal that the grass is not drawn over that 25m radius.

PiBoSo

Quote from: JJS209 on July 01, 2015, 12:00:10 PM
and what am i doing wrong with the 3d grass files?
i used the ones out of the grassfx.tga (grass_blades.tga) and grass.tga (grass_color.tga) out of the maps folder with this settings in the *.grs file:

max_density = 12
height = 0.35
height_diff = 0.1
width = 0.4
width_diff = 0.05
texture = grass_blades.tga
colormap = grass_color.tga


€: tried out the 3D grass from johor and it makes not difference. yes, the grass is another but its still only visible in a radius of ~25m.

€€: its really hard for me to make progress. i can figure out all my problems only halfway through.
      3d grass not working correctly. what does it take to see it for more than 25m?
      textures working but shininess is the next mystery.

3D grass draw distance is limited to save rendering time. It is supposed to blend with the base texture at distance.
The main problem is that mipmapping makes it disappear faster than it should.
Rendering will be improved in future releases.
"La perfezione non è il nostro obiettivo, è la nostra tendenza".

JJS209


Hawk

Quote from: JJS209 on July 02, 2015, 02:19:02 PM
thank you for clearing that.

I really want to say it, but I won't.  :P ;D

Hawk.