Jump to content

Grass :)


wh1sp3r
 Share

Recommended Posts

Hey,

i have problem to make a grass, which is good for sway shader :( whole grass polygon is usually moving .. but i don't want to move with grass roots, how can i make it 3ds max ? It's somekind of game with pivot ? :) thank you :)

 

Change the vertex colors of the models. To get sway working, make sure the vertex color of the parts you want to sway is white and I believe the roots' vertex colors should be black.

Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590

LE / 3DWS / BMX / Hexagon

macklebee's channel

Link to comment
Share on other sites

Won't this also cause the part of the model that you don't want to sway to appear black? Changing the vertex color effects the color of the model at that vertex and not just the shader attributes, right? Is there a way to tell the engine to use the vertex color for the shader only? I guess this would be easy enough to perform some tests on, but I am not at my LE dev computer so I thought I would ask.

Vista | AMD Dual Core 2.49 GHz | 4GB RAM | nVidia GeForce 8800GTX 768MB

Online Portfolio | www.brianmcnett.com

Link to comment
Share on other sites

Vertex colors eh? I didn't know that. I wonder if they will export properly from blender?

 

Also if nothing else works... you could just give the roots of the grass a different material, though I don't think that's a good way of doing it.

Core I5 2.67 / 16GB RAM / GTX 670

Zbrush/ Blender / Photoshop CS6 / Renoise / Genetica / Leadwerks 3

Link to comment
Share on other sites

I didn't know it did either until I learned how to bake AO into the vertex color and was happy to discover that it did.

 

It might look ok in the case of grass due to the contact shadow with the ground (I still tend to think black would be too strong), but what about other objects that you would want to "pin" specific vertices with the sway shader, like drapes to their rods, or flags to their poles? The black definitely wouldn't look right in those cases. This is something I have been meaning to try and figure out how to do for a little while now and just haven't gotten around to doing it.

 

Also, you can't give the roots a different material or the grass that is swaying will look severed or disconnected from the roots where the swaying verts meet the non swaying verts.

Vista | AMD Dual Core 2.49 GHz | 4GB RAM | nVidia GeForce 8800GTX 768MB

Online Portfolio | www.brianmcnett.com

Link to comment
Share on other sites

As a simple test, I created a 5x5 grid plane, and attached a simple black-to-white gradient texture to it. Then using uu3d, I converted the texture to vertex colors. Then I changed the gradient texture to another texture and saved it as a gmf. After creating the mat file with the sway shader, I placed the model into an editor scene. The edge of the plane that had the black vertex colors did not move, while the opposite edge with the white vertex color made it move the maximum amount dictated by the sway shader. The gradient vertex colors in between varied in movement with the lighter colors moving more than the darker colors. Also, since I had a texture actually assigned in the gmf/mat file, it didn't show a black-to-white gradient but the texture that I had assigned.

 

Also, I agree that black may be too much in some instances as well as the white would be... but for a grass root, I would assume one wouldn't want that to move at all.

Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590

LE / 3DWS / BMX / Hexagon

macklebee's channel

Link to comment
Share on other sites

That sounds great, especially that gradients effect the sway shader too. Thanks for the test.

 

I was still curious how exactly vertex color effects the color of the model because I was getting slightly different results than what you described. I am working on a house model where I am assigning the color of the different walls by vertex color (it also has AO baked into the vertex colors), and then having a single texture that is mostly white overlay that so that every room can be a different color without using multiple textures. Only I am getting both vertex color and the texture I assigned in the mat file multiplied together. Then I assigned the sway shader to it instead, and all the walls lost their vertex color (and started swaying). So apparently the sway shader is what is turning the vertex color off from effecting the color of the model, not having a texture assigned.

 

Also, for the black roots I was referring to pure black as a contact shadow being too strong (if the vertex color was effecting the color making it look like a shadow), not as a weight for the sway shader, which you are correct that you wouldn't want them to be moving at all. But now I know that the color gets turned off when you have the sway shader assigned anyway, so it shouldn't be an issue.

Vista | AMD Dual Core 2.49 GHz | 4GB RAM | nVidia GeForce 8800GTX 768MB

Online Portfolio | www.brianmcnett.com

Link to comment
Share on other sites

just to get off topic slightly, but why are you adding a texture to your wall when you are dictating the color by the vertex color? Are you doing something in particular in the mat file like adding a bumpmap or adding specular that requires a texture... just curious...

Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590

LE / 3DWS / BMX / Hexagon

macklebee's channel

Link to comment
Share on other sites

just to get off topic slightly, but why are you adding a texture to your wall when you are dictating the color by the vertex color? Are you doing something in particular in the mat file like adding a bumpmap or adding specular that requires a texture... just curious...

 

I think his vertex colors are for AO only, the textures will give the rooms different diffuse colors.

 

I like to jump into others' conversations :)

Core I5 2.67 / 16GB RAM / GTX 670

Zbrush/ Blender / Photoshop CS6 / Renoise / Genetica / Leadwerks 3

Link to comment
Share on other sites

I am using the vertex colors for AO and for basic color, but the textures add more detail than simple vertex color allows. I am also adding bump and spec with textures.

 

post-230-12684941603114_thumb.jpg

 

The diffuse is mostly white, but does have some grunge detail and coloring to blend over the top of the flat colors you get with vertex color. It looks like this:

 

post-230-12684942127048_thumb.jpg

 

There is a little more information on this here:

 

http://leadwerks.com/werkspace/index.php?/topic/1326-vertex-baked-ao/

Vista | AMD Dual Core 2.49 GHz | 4GB RAM | nVidia GeForce 8800GTX 768MB

Online Portfolio | www.brianmcnett.com

Link to comment
Share on other sites

  • 3 weeks later...
  • 1 month later...

Somehow in topic I guess:

I'm trying to create a fantasy-looking grass. Epic failure, mine looks out of place and grungy (I think I could blame the lack of AA, but OGL2.3 is merely a dream from what I heard.)

 

Example (yes, GW2. But look at the screenshots please, they represent exactly what I mean in terms of grass cover):

http://www.guildwars2.com/en/the-game/professions/elementalist/

Link to comment
Share on other sites

  • 3 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...