Gamestudio Links
Zorro Links
Newest Posts
Blobsculptor tools and objects download here
by NeoDumont. 03/28/24 03:01
Issue with Multi-Core WFO Training
by aliswee. 03/24/24 20:20
Why Zorro supports up to 72 cores?
by Edgar_Herrera. 03/23/24 21:41
Zorro Trader GPT
by TipmyPip. 03/06/24 09:27
VSCode instead of SED
by 3run. 03/01/24 19:06
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (Quad, aliswee), 835 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
sakolin, rajesh7827, juergen_wue, NITRO_FOREVER, jack0roses
19043 Registered Users
Previous Thread
Next Thread
Print Thread
Rating: 5
Page 348 of 554 1 2 346 347 348 349 350 553 554
Re: What are you working on? [Re: sivan] #434505
12/19/13 19:59
12/19/13 19:59
Joined: Aug 2002
Posts: 3,258
Mainz
oliver2s Offline
Expert
oliver2s  Offline
Expert

Joined: Aug 2002
Posts: 3,258
Mainz
I already tried almost every approach to generate fast, massive grass for use in a real commercial(!) game, but no approach was satifiing. The approach mentioned above with placing grass via heightmap and seedmap in vertex shader is something I didn't try yet. I will make some tests upcoming weeks.

Re: What are you working on? [Re: oliver2s] #434515
12/20/13 00:05
12/20/13 00:05
Joined: Apr 2007
Posts: 3,751
Canada
WretchedSid Offline
Expert
WretchedSid  Offline
Expert

Joined: Apr 2007
Posts: 3,751
Canada
So, ummm, we are like doing grass now? May I join?



Code:
void World::CreateGrass()
{
	RN::Model *grass = RN::Model::WithFile("models/dexsoft/grass/grass_1.sgm");
	grass->GetMaterialAtIndex(0, 0)->culling = false;
	grass->GetMaterialAtIndex(0, 0)->discard = true;
	grass->GetMaterialAtIndex(0, 0)->override = RN::Material::OverrideGroupDiscard | RN::Material::OverrideCulling;
	
	RN::InstancingNode *node = new RN::InstancingNode(grass);
	RN::Random::MersenneTwister random;
	
	for(int i = 0; i < 50000; i ++)
	{
		RN::Vector3 pos = RN::Vector3(random.RandomFloatRange(-100.0f, 100.0f), 0.0f, random.RandomFloatRange(-100.0f, 100.0f));

		RN::Entity *ent = new RN::Entity(grass, pos);
		entity->SetScale(random.RandomFloatRange(2.5f, 3.0f));
		entity->SetRotation(RN::Vector3(random.RandomFloatRange(0, 360.0f), -90.0f, 0.0f));
		
		node->AttachChild(entity);
	}
	
	
	_camera->ambient = RN::Vector4(0.127, 0.252, 0.393, 1.0f) * 2.0f;
	
	_sunLight = new RN::Light(RN::Light::Type::DirectionalLight);
	_sunLight->SetRotation(RN::Quaternion(RN::Vector3(60.0f, -60.0f, 0.0f)));
}



Edit: We added a fast path that covers exactly these kinds of things. Same code, "little" bit different FPS (it's capped at 1000):


Edit2: Added another fast path. 1 million grass entities, my CPU is bored as fuck... GPU on the other hand is currently crying about the fragment operations.


(to be fair, the screenshot is NOT staged, but the FPS changes quite heavily depending on how good it is with keeping up with all the fragments. But then again, I'm on a shitty HD 6770M, so with an actual GPU this isn't impossible to achieve in a stable way)

Here is how this looks in the profiler: http://cl.widerwille.com/T2lx

Last edited by JustSid; 12/20/13 02:18.

Shitlord by trade and passion. Graphics programmer at Laminar Research.
I write blog posts at feresignum.com
Re: What are you working on? [Re: WretchedSid] #434540
12/20/13 15:53
12/20/13 15:53
Joined: Aug 2002
Posts: 3,258
Mainz
oliver2s Offline
Expert
oliver2s  Offline
Expert

Joined: Aug 2002
Posts: 3,258
Mainz

Re: What are you working on? [Re: oliver2s] #434551
12/20/13 18:23
12/20/13 18:23
Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
Kartoffel Offline
Expert
Kartoffel  Offline
Expert

Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
@^: I don't know what you think but I don't care if people post stuff which was made without gamestudio in here (the forum is almost dead anyway).

It's actually quite interesting, and as long as this thread isn't flooded by non-gamestudio posts I don't think a seperate thread is needed.


POTATO-MAN saves the day! - Random
Re: What are you working on? [Re: Kartoffel] #434552
12/20/13 18:36
12/20/13 18:36
Joined: Aug 2002
Posts: 3,258
Mainz
oliver2s Offline
Expert
oliver2s  Offline
Expert

Joined: Aug 2002
Posts: 3,258
Mainz
Sure, it was just a running gag

Re: What are you working on? [Re: oliver2s] #434553
12/20/13 18:48
12/20/13 18:48
Joined: Nov 2007
Posts: 2,568
Germany, BW, Stuttgart
MasterQ32 Offline
Expert
MasterQ32  Offline
Expert

Joined: Nov 2007
Posts: 2,568
Germany, BW, Stuttgart
Also i think a lot of gamestudio users love to see Rayne news tongue
This looks quite powerful but easy


Visit my site: www.masterq32.de
Re: What are you working on? [Re: MasterQ32] #434554
12/20/13 18:59
12/20/13 18:59
Joined: Aug 2002
Posts: 3,258
Mainz
oliver2s Offline
Expert
oliver2s  Offline
Expert

Joined: Aug 2002
Posts: 3,258
Mainz
Nothing against the hard work of Rayne creators. But I don't think it will be more powerful than 3DGS if no state-of-the-art WYSIWYG editor and easy-to-use shader framework will be implemented. What I've seen so far was only a nice and fast engine for hardcore programmers, not usable for commercial games yet, but I know, it's still in development.

Re: What are you working on? [Re: oliver2s] #434560
12/20/13 20:46
12/20/13 20:46
Joined: Oct 2007
Posts: 5,210
İstanbul, Turkey
Quad Online
Senior Expert
Quad  Online
Senior Expert

Joined: Oct 2007
Posts: 5,210
İstanbul, Turkey
Hah, you are just giving me ideas about what to do with rayne.


3333333333
Re: What are you working on? [Re: oliver2s] #434562
12/20/13 21:05
12/20/13 21:05
Joined: Apr 2007
Posts: 3,751
Canada
WretchedSid Offline
Expert
WretchedSid  Offline
Expert

Joined: Apr 2007
Posts: 3,751
Canada
Originally Posted By: oliver2s
What I've seen so far was only a nice and fast engine for hardcore programmers, not usable for commercial games yet, but I know, it's still in development.

Since we are already this far down the rabbit hole of off-topicness, please don't mind me asking this: Why do you think that?
When creating this post, the biggest real "fuck you" in direction of Gamestudio I could come up with was attaching the actual source used to create the example above. Granted, this is not a real world example, but comparing it with the trickery that both Felix's did before me... Do you really want to tell me that I came up with the hardcore programmer example? Because I, and that may very well be just my opinion, think that it was pretty straight forward. It's written in C++ and uses another API than gamestudio, granted, but so does Unity and it isn't a hardcore programmer engine either. I mean, you don't need to know what happens under the hood in the example: It doesn't matter how the instancing data is created internally, it doesn't matter how the resource loader works and what it does to deduplicate your data. The only real strange thing I can find is the used random number generator, which, honestly, you could've just replace with rand() % 200 and be done with it. Our rng generator just gives you some nice extra functions on top of that (used to generate random floats within a range) and the guarantee that the produced numbers are uniformly distributed. Given that rand() is considered harmful and usually implemented using a cheap LCG, this might not be the worst thing in the world.

So yeah, sorry for the rant, but I'm seriously curious why you think that's more hardcore programmer oriented than Gamestudio. Because for what it's worth, we put a lot of effort into designing the API and the default stuff so that it IS easy to use. Our shader framework may not be on par with Shade-C evo, but load a model with normal maps and/or spec maps and Rayne will automatically generate a shader for you at runtime that supports that. I'll give you the WYSIWYG editor, that is planned, but not there yet. One step at a time, we are just two people...

Besides, who in their right mind creates commercial games with an alpha engine anyways? wink


Edit: Throw in the following two lines and you got LOD and automatic removal of distant grass with the instancing:
Code:
node->SetPivot(_camera); // Use _camera to calculate which LOD stage to take
node->SetLimit(10000); // Max 10k visible around the pivot



Do that with Gamestudio in less lines of code, I dare you tongue

Last edited by JustSid; 12/20/13 21:14.

Shitlord by trade and passion. Graphics programmer at Laminar Research.
I write blog posts at feresignum.com
Re: What are you working on? [Re: WretchedSid] #434563
12/20/13 21:21
12/20/13 21:21
Joined: Aug 2002
Posts: 3,258
Mainz
oliver2s Offline
Expert
oliver2s  Offline
Expert

Joined: Aug 2002
Posts: 3,258
Mainz
My quote wasn't about the usability of the code example above, it was more about the current development state. I know it's alpha status yet. Just saying the current (alpha) state is for hardcore programmers, because of the missing script libraries yet.

Page 348 of 554 1 2 346 347 348 349 350 553 554

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