Kart Racing Pro Official Forum

Mods => Track Editing => Topic started by: Nitrox on June 18, 2011, 02:36:17 PM

Title: 3D Grass
Post by: Nitrox on June 18, 2011, 02:36:17 PM
Quote3D Grass

To enable 3D grass, you need 3 files in the same directory as grass texture:

    grass.grs (text file that contains the settings for grass generation)
    grassfx.tga (the blades of grass texture)
    grass_color.tga (defines the colour of the grass blades)

3D grass will be automatically applied to materials assigned texture 'grass.tga' (or any texture name matching the .grs file)

Please PiBoSo, could you give some more information about how to integrate 3D grass? What should the .grs file look like? Should I put the files in track folder before or after exporting from 3Ds Max? (Can't find those files in lonato track folder). What should the grassfx texture look like? Could you post an example?

More and more tracks for KRP appear, but none of them has 3D grass. Maybe it would be implemented if you explain it a bit more in detail.

Thanks!
Title: Re: 3D Grass
Post by: Racehard on June 18, 2011, 03:36:07 PM
Is it very hard to implement 3d grass for non experienced track creators?
Title: Re: 3D Grass
Post by: Aritz on June 19, 2011, 08:37:33 AM
I can try to do it. It is quite similar to the starting light and I could do it time ago in Magescq. My only problem is that GRS file, I suppose that is the location of the grass, but I don't know how to edit this kind of file. Let me some time to try and I will do a tutorial.
Title: Re: 3D Grass
Post by: Nitrox on June 19, 2011, 01:55:51 PM
I tried the following today:

- created grassfx.tga file with a grass blade in it (only blade + alpha channel)
- created grass_color.tga with the color of my grass blade
- created grass.grs with the names of my grass-textures in it
- created solcreteX.grs (name of my grass textures)
- also tried texture = grassfx.tga and color = grass_color.tga in grs files

Does not work so far. I believe you are right and the .grs file needs data like lenght, fill rate, etc to work. Unless PiBoSo post a sample file, we won't find out I think.

Please, PiBoSo! ;)
Title: Re: 3D Grass
Post by: whitham69 on January 25, 2012, 01:29:38 PM
you guys had any suscess making the grass looking good. we got it working but the grass still looks like flat plans and stands out a mile, on piboso track you hardly notice the 3d grass which is how it should be.
Title: Re: 3D Grass
Post by: Nitrox on January 25, 2012, 01:56:07 PM
Its all about trial and error. Play around with blade hight, color and density settings. To make it look good, grass texture and blades need to have the same color. Density affects the color too!
Title: Re: 3D Grass
Post by: EVO on January 25, 2012, 04:04:14 PM
well said Nitrox. my opinion on 3d grass.
I see it as a soccer pitch with layers of grass the lower is dense and packed the upper less dense and more exposed to the sun, therefore it should be slightly brighter, but at the same time in dry climates it can burn and be much lighter or in moist climates it can be thriving be a deeper green, but always brighter. I think a little color difference is good.  I dont like how at lonato and essay you barely notice them, unitl you go in the grass. They are so close to perfect its not worth adjusting. not complaining though i wish i had 3d grass that good i just wish it stood out a little more and said "hello, look how cool i am"
Title: Re: 3D Grass
Post by: whitham69 on January 25, 2012, 07:02:24 PM
So changing the setting will help the grass blend in alot better, i give that a go. also the draw distance is alittle low as you can see from the picture all the graphics are set at max, is there anyway to increase the draw distance for the grass?


max_density = 50
height = 0.05
height_diff = 0.1
width = 0.05
width_diff = 0.03
texture = grass_blades.tga
colormap = grass_color.tga


[url(http://img542.imageshack.us/img542/9739/core2012012517555025.jpg) (http://imageshack.us/photo/my-images/542/core2012012517555025.jpg/)

Uploaded with ImageShack.us (http://imageshack.us)][/url]

Title: Re: 3D Grass
Post by: EVO on January 25, 2012, 08:49:53 PM
Thats way too green.  if your grass texture was more green to match, or your 3d grass_color was less green the 3d grass draw distance wouldnt be noticable.
Title: Re: 3D Grass
Post by: whitham69 on January 25, 2012, 11:14:16 PM
yeah we got that sorted now, grass look ok at last, problem we have now is grass under the tarmac in afew places, there no grass model or texture under the tarmac, were going to try a density map to try and cure this but niether of us have seen a density map before, were guess we can just export a render of the track from max and paint black and white  for grass placement.
Title: Re: 3D Grass
Post by: EVO on January 25, 2012, 11:19:20 PM
is your friend the user "nak"
http://forum.kartracing-pro.com/index.php?topic=11.msg9363#msg9363
my thoughts on density map. 90% sure that how it works
Title: Re: 3D Grass
Post by: whitham69 on January 25, 2012, 11:41:29 PM
Yeah me and Nak work togeather on the bike tracks, i do most the converting and modeling and he does the files structure and pretty handy with Photoshop , most thing we can figure out but sometimes we come across terms and process we struggle to find any good referance for.

Thanks for the help, we (Nak mainly) been trying toget this looking good for a while, it nice to know we can release fully working ok looking tracks at last
Title: Re: 3D Grass
Post by: EVO on January 25, 2012, 11:51:22 PM
I want to get into GP bikes and maybe a real sportbike. My friend is going racing with his real bike.     Do you guys mod steering wheels and use those in the GPbikes?  were you the one who made that gorious Camel Honda looking paint.   I want to buy the game just for that.  Also just realized the 3d grass in my kRP does not look as good as it could becuase I am playing on only 720p with medium graphics. 
when you look at it in mapview up close its amzing.

I think a density map is at work here?
(http://i42.tinypic.com/17tgjm.jpg)
Title: Re: 3D Grass
Post by: whitham69 on January 26, 2012, 09:08:23 AM
i belive most people use game pads, i like my saitek stuff but people use the 360 controlor which is fairly cheap. wheels can be used as well. I never made the honda skin but those skins wont work in the beta we got now,

there could be afew ways to get that effect in the picture, density map, invisible plan, could even be something under the sand model. It's alot to learn and remember it why im glad there two of working on ours.
Title: Re: 3D Grass
Post by: maxrod on April 13, 2012, 02:50:14 PM
Don't know if anyone else has came across this problem but i seem to have problem with the 3d grass going onto the asphalt and in the air, It is only a few blades, is this a bug?.
Title: Re: 3D Grass
Post by: PiBoSo on April 13, 2012, 03:37:44 PM
Quote from: maxrod on April 13, 2012, 02:50:14 PM
Don't know if anyone else has came across this problem but i seem to have problem with the 3d grass going onto the asphalt and in the air, It is only a few blades, is this a bug?.

Yes. Unfortunately it's a bug of the x64 version of the exporter.
The only known workaround is to use the 32 bits version of 3dsmax.
Title: Re: 3D Grass
Post by: maxrod on April 13, 2012, 07:05:42 PM
Thanks for your reply, But the 32bit version seems to crash as file gets bigger, 187,589 polys. Even on the 64bit after exporting map it seems to crash on exporting trp, having to reload 3dsmax then export trp.
Title: Re: 3D Grass
Post by: rainey06au on August 05, 2020, 06:42:40 AM
I know this is a very old topic but it is referenced to from many places. So just to add my little bit of knowledge. 3D Grass will not draw from a mesh object that was converted in FBXtoEDF as a 'mesh'. You need to convert your surfaces as a 'map', and also export a collision 'trp' file seperately.