Gamestudio Links
Zorro Links
Newest Posts
Trading Journey
by howardR. 04/28/24 09:55
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
Help with plotting multiple ZigZag
by M_D. 04/26/24 20:03
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
M1 Oversampling
by jcl. 04/26/24 11:12
Why Zorro supports up to 72 cores?
by jcl. 04/26/24 11:09
Eigenwerbung
by jcl. 04/26/24 11:08
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (AndrewAMD, alibaba, Quad), 761 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
wandaluciaia, Mega_Rod, EternallyCurious, howardR, 11honza11
19049 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 3 1 2 3
Re: need Input about Entitys [Re: CocaCola] #459890
06/10/16 09:11
06/10/16 09:11
Joined: May 2005
Posts: 868
Chicago, IL
Dooley Offline
User
Dooley  Offline
User

Joined: May 2005
Posts: 868
Chicago, IL
Thanks! I'm glad you like it. It is on Steam: Greenlight right now if anyone's interested:https://steamcommunity.com/sharedfiles/filedetails/?id=700074180

I have a whole bunch of small grass models, each one with this function as part of the action. I am not using the waving feature at this point, but I might try it in the future. They simply wait until the player moves a certain distance away, then they re-position themselves at a distance from the player. it's pretty seamless. I also added a feature that checks if they would appear under the water level, or on a steep angle, and it turns them invisible in case they do. I think I'm using around 900 different grass models or so...

Quote:

grass_drop = c_trace(vector(my.x + 1536,my.y,my.z + 1000),vector(my.x + 1536,my.y,my.z -1000),IGNORE_ME|IGNORE_PASSABLE|USE_POLYGON|IGNORE_FLAG2);
if(var_boiled == -1 && hit.z <= ice_level)
{
set(my,INVISIBLE);
my.x = hit.x;
my.y = hit.y;
my.z = hit.z;
}
else if(hit.z < fog_level || normal.z < .95)
{
set(my,INVISIBLE);
my.x = hit.x;
my.y = hit.y;
my.z = hit.z;
}
else
{
reset(my,INVISIBLE);
my.x = hit.x;
my.y = hit.y;
my.z = hit.z;

vec_to_angle (my.pan, normal); // and align it properly
}


This function runs in a while loop in the grass action, and it checks the player's position as compared to the grass position like this: if(planet_character.x > my.x + 768) in all four directions.

Re: need Input about Entitys [Re: Dooley] #459901
06/10/16 13:51
06/10/16 13:51
Joined: Mar 2014
Posts: 359
CocaCola Offline OP
Senior Member
CocaCola  Offline OP
Senior Member

Joined: Mar 2014
Posts: 359
Your Project is realy interesting.
to place my trees Iīm usind the Hair Partice in Blender and export the Models as one Model, the limit of vertces is <64k, more and my system crashed.
Hair Prticle are very simple for beginners, du you have experience with blender?
The Basik Steps are these:
klick on the Gras models right and press Strg+G, to group your Models Pool.
Chose your Terain Model and (1&2in picture) add a Particle system.

in Type: you chose Hair.
in Renderer you chose Group chose in the empty mini window your Group with grasses.
Ready.

You can make/chose many different settings:
Random Object from the Pool group
Random Size
parant by normal Angle or not

at last you have to make hair to vertex convert, sorry I donīt konow how this funktion is callig but you find it in the left down popupmenue.

Re: need Input about Entitys [Re: CocaCola] #459902
06/10/16 16:27
06/10/16 16:27
Joined: May 2005
Posts: 868
Chicago, IL
Dooley Offline
User
Dooley  Offline
User

Joined: May 2005
Posts: 868
Chicago, IL
I use Blender to do most of my modelling. I would not have thought to use hair particles in a game though...

My grass is about 900 models, which are each 80 vertices, and use an overlay effect on the grass bitmap.



Having one huge model with that many vertices might cause your frame-rate to crash. I'm not sure exactly how that works, but I think the engine handles a lot of small models better than a small number of huge models...

Re: need Input about Entitys [Re: Dooley] #459904
06/10/16 17:52
06/10/16 17:52
Joined: Mar 2014
Posts: 359
CocaCola Offline OP
Senior Member
CocaCola  Offline OP
Senior Member

Joined: Mar 2014
Posts: 359
have you a example for hair particle in 3dgs?

Re: need Input about Entitys [Re: CocaCola] #459908
06/11/16 18:34
06/11/16 18:34
Joined: May 2005
Posts: 868
Chicago, IL
Dooley Offline
User
Dooley  Offline
User

Joined: May 2005
Posts: 868
Chicago, IL
In most games I've seen, grass is handled with low poly models with transparent bitmaps, rather than articulated models/individual particles.

However, you could use a particle emitter. I tried this successfully, but I did not like the results. Also, particles die by default, and it felt strange to make them stay alive by extending their lifetime with code.

Maybe someone else has some thoughts on this...

Re: need Input about Entitys [Re: Dooley] #459917
06/12/16 01:24
06/12/16 01:24

M
Malice
Unregistered
Malice
Unregistered
M



Well a single (joined group) grass model with up to a 1000 polys shouldn't be a bad thing. The trouble is making it line to the terrain. You can place the grass in 3dsmax(blender, ect) , right on the terrain in place, then group them into one model.(Of course delete the terrain before exporting the grass model and bring each on it's own to WED/MED/Engine).

I'm currently testing functions to just reshape the grass model to the terrain at level-load(run-time). That way I won't need special models for each area/level and random levels can us grass. Also to save time and energy I've hacked up the ent_seed() function and made a my own mod version for placing this stuff. )(ent_seed() in includes/level.c).

BTW you 2 guys should compare(PM) the specs on your test machines.My old one couldn't render 10% of the grass my current one can. But it was a simple student laptop.

I'll share some results if I get any with y'all.

Re: need Input about Entitys [Re: ] #459945
06/12/16 20:26
06/12/16 20:26

M
Malice
Unregistered
Malice
Unregistered
M



@Thread Group

So part of the issue here is a lack of definition to the problem.

I mean - how to make lots of grass/trees is not The actual problem.?!
for example - Last night I covered a level and terrain (small.hmp), size of 1200x1200 in a clip field of the same size, with fields of waving grass. I ran a smooth 60 fps at x1080 HD . I used a grouped grass model that had (almost) 9,000 verts each. And I ran it through the (minor twitched) animTree shader.

So - We need to understand each part of the problem. See in a 1200x1200 level-box I can run grass but in a 12,000 x 12,000 -> lol fields of grass kill fps and must be made into patches of grass. Also we have to account for differences in cpu+gpu+ram+vram. It's not just a limit of model/poly size count on the engine, the gpu plays it's part in that.

So the better we can define and box-in the problem, is the only way we can solve it.

@ Dooley, I am current running a group grass made out of "stands" like in your post above. Baking the image with normal and specular data can help in the final look. Using many skins you can have a shader that runs bump mapping on it, that can help. In the end how much focus is the grass really getting? The games tend to have more focus elsewhere. When I play games like (shadow warrior), many times I do play session just to look at the level, because I miss so much beauty in full-run-and-gun play sessions.

@CocaCola - I've use the hair system in 3dsmax to make grass. The process is to covert the grass patch to geometry, then run it through a polygon reducer. You can end up with a low poly model, that way. However, you can also leave it high poly -> then render it both as image and normal map. From there you can use the rendered images in the "stands" like Dooley did.


EDIT - pictures all at 1080 HD and all running at 60 fps (sorry I could capture the fraps fps counter)
edit-> all grass is using the animTree shader( I did a tweak to it)
Sorry I've not the gift for art... A little time would help as I did this grass model quick and dirty.

They are
bare
normal
double -> grass models overlap by using 2x in the space
insane4x-> grass models overlap by place 4-times as many in the level area




Last edited by Malice; 06/13/16 01:20.
Re: need Input about Entitys [Re: ] #459968
06/13/16 09:32
06/13/16 09:32

M
Malice
Unregistered
Malice
Unregistered
M



Hi so the last map was tiny. So I used the bigger terrain and added badly optimized-ugly-as-hell trees. I'm still able to pull 60fps with many models and the shader. I'm using over-kill numbers of models just for testing, so I'm making up in clip ranges. It's got full clip at 4000 and half_cutting for models in then 2000. I ran it 6000 clip and it did knock fps down to 50 +- 5.
Of course I'd never try to use bad model or carpet the ground with grass (I need that extra cpu/gpu power for gun blast and zombie guts laugh )

Here is another image roll. Just a walk to the woods lol laugh







Anyway I was working on obj->ground place and shape, not making ugly levels. I got side tracked in this , so I'm done now and back to the work.

Re: need Input about Entitys [Re: ] #459977
06/13/16 10:07
06/13/16 10:07
Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
Kartoffel Offline
Expert
Kartoffel  Offline
Expert

Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
Do you have transparency / alphablending enabled?

Because the overdraw caused by alphablending with densely placed geometry kills your fps.

In your screenshots it looks like it's disabled, though.

Last edited by Kartoffel; 06/13/16 10:08.

POTATO-MAN saves the day! - Random
Re: need Input about Entitys [Re: Kartoffel] #460027
06/13/16 19:53
06/13/16 19:53
Joined: May 2005
Posts: 868
Chicago, IL
Dooley Offline
User
Dooley  Offline
User

Joined: May 2005
Posts: 868
Chicago, IL
I've found that "overlay" with bigger bitmaps works better than using an alpha transparency. I always get weird artifacts if I use alpha transparency.

Page 2 of 3 1 2 3

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1