Remember me
You are here: HomeForumCyberix3D ForumGeneral DiscussionAbout terrain
Welcome, Guest
Username: Password: Remember me

TOPIC: [PLUGIN] Grass Area Generator

[PLUGIN] Grass Area Generator 7 years 8 months ago #905

  • ViraX
  • ViraX's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 154
  • Thank you received: 119
A plugin that automatically generates a grass area, (square only for now !)
where you wish it in your world, you can edit the area in the editor.

- area size
- area position
- difference between two models grass
- height grass
- radius grass
- material


e.g


Editor
EditGAG.png


Test Render
RenderGAG.png


Final Render
FinalGAG.png


Final with multi-layered Render
FinalMC_GAG.png



Δ WARNING Δ

- The plugin is not perfect and still in development,
They have some bugs, its main flaw is that it is greedy and the generation is quite slow, but effect is very nice for (exterior) surrounding !

- You can modify several parameters in order to improve the optimization or to have a better rendering.

- It is possible to make multi-layer, 2 layers maximum at the moment.


############


The algorithm is said to be 'naive' as simple as possible but efficient enough

e.g
-------------
0000000000
0        0
0        0
0        0
0        0
0        0
0        0
0        0
0        0
0000000000

0000011111
0        0
0        0
0        0
0        0
0        0
0        0
0        0
0        0
0000000000

etc ...

1111111111
1111111111
1111111111
1111111111
1111111111
1111111111
1111111111
1111111111
1111111111
1111111111

-------------



How to have GAG ?

- GAG 'view source' copy the code
- in Editor, New Plugin.
- paste the code
- save Plugin with name 'GAG' (or other)
- ENJOY !

- 'view-source' > >>> > 'save Project As Plugin ...'

How to use a Plugin ?
www.gamemaker3d.com/forum/examples/82-plugins


How to use GAG ?

You have at your disposal 8 parameters,


- [0] 'THE RED PLANE'
This is the position of your future area, you can move it or you want it. plane.x, plane.z, plane.y.
[WARNING, Rotations are not taken into account]

- [1] SIZE_X, SIZE_Z, DIV_
change the size of the area, [WARNING, 'size_x' & 'size_z' must have the same value, 'div_' must be worth half]
e.g

size_x = 500
size_z = 500
div_ = 250


- [2] DIFF
The value of 'diff' will be the difference between two models grass. ('root')

- [3] RADIUS_GRASS
As its name indicates, allows to modify the radius of the roots.

- [4] HEIGHT_GRASS
Allows to modify the size of grass strands.

- [5] ALPHA_GRASS
Allows you to change the transparency of the grass

- [6] GROUP_MATERIALS
Edit the material.

- [7] GROUP_NOGRASS_absciss & NOGRASS
creates a grass-free zone inside the 'grass area'
[WARNING, nograss var must have a value of 1]
in GROUP_NOGRASS_absciss there are 4 points that represent your zone






#UPDATE
+ nograss (creates a grass-free zone inside the 'grass area')
1111111111
1120000021
1100000001
1100000001
1100000001
1100000001
1100000001
1120000021
1111111111
1111111111



DEMO 'in real-time' : www.gamemaker3d.com/player?pid=04502425297
Source : www.gamemaker3d.com/player?pid=04502425273

(You can also use this plugin for other models ;))
Last Edit: 7 years 8 months ago by ViraX.
The administrator has disabled public write access.
The following user(s) said Thank You: cyberix3d

[PLUGIN] Grass Area Generator 7 years 8 months ago #912

  • cyberix3d
  • cyberix3d's Avatar
  • OFFLINE
  • Administrator
  • Posts: 700
  • Thank you received: 694
Thank you!
The plugin you have created is really amazing.
The grass looks very realistic and beautiful.
Thank you for your contribution to the Cyberix3D community.
Regards,
Cyberix3D team
The administrator has disabled public write access.
Time to create page: 0.124 seconds