Page 2 of 2
Re: static geometry vs grouped entities in a node
Posted: Mon Mar 17, 2014 1:42 pm
by Comtois
Re: static geometry vs grouped entities in a node
Posted: Mon Mar 17, 2014 3:18 pm
by T4r4ntul4
yes, that would be the ultimate solution. do i need to bump your topic(s) with a +1 ?
@ Comtois
yes i tried the mineclone, but its very slow unfortunate. but there are always little bits i can learn from it.
Re: static geometry vs grouped entities in a node
Posted: Mon Mar 17, 2014 5:00 pm
by PMV
I don't think that Comtois (or Fred) will be faster if you bump that thread.
Just wait for the PB5.30 and then, if it hasn't been implemented
...we all can bump it

Re: static geometry vs grouped entities in a node
Posted: Tue Mar 18, 2014 1:15 am
by T4r4ntul4
...we all can bump it
haha okay.
iam now exploring the limits of PB-Ogre

having 200 static geometrys with 400 entities each seems no problem lol (takes only 1.7GB ram, oops

)
but i have another question:
is there a way to determine the ID of a certain static geometry, in realtime ingame?
because that would be the difference to write and build a whole grid system or just look up the ID.
and what are the max entities in a world?
Re: static geometry vs grouped entities in a node
Posted: Tue Mar 18, 2014 11:40 am
by Bananenfreak
Hmm, the maximum entitynumber depends on your cpu and RAM (Perhaps also maximum number of RAM adress

)
Hmm, for which reason do you want the ID of an StaticGeometry? It could be possible that IsStaticGeometry() gives you the ID.
Re: static geometry vs grouped entities in a node
Posted: Tue Mar 18, 2014 3:42 pm
by T4r4ntul4
Bananenfreak wrote:Hmm, the maximum entitynumber depends on your cpu and RAM (Perhaps also maximum number of RAM adress

)
than i have no problems with that i think, got 16GB of ram, and my cpu is i7-4820K @ 3.7GHz
Bananenfreak wrote:Hmm, for which reason do you want the ID of an StaticGeometry?
because i want to rebuild it after i delete and added a few objects to it.
Bananenfreak wrote:It could be possible that IsStaticGeometry() gives you the ID.
IsStaticGeometry() gives me a strange long number instead of just the ID of the Static Geometry
Re: static geometry vs grouped entities in a node
Posted: Wed Mar 19, 2014 9:36 am
by Samuel
T4r4ntul4 wrote:
what are the max entities in a world?
Lot's of entities won't be a problem. As long as your batch count doesn't get too high.
Nvidia has a nice article on batches if you'd like to read a little about it.
http://www.nvidia.de/docs/IO/8230/BatchBatchBatch.pdf
I don't know of a command to obtain the StaticGeometry ID. Wouldn't the handle you give it during creation suffice?
You could store that and then use it when needed. Or is there a reason that wouldn't work?
Re: static geometry vs grouped entities in a node
Posted: Wed Mar 19, 2014 11:24 am
by Bananenfreak
T4r4ntul4, I don´t know why you want the ID. In PB, we have the ID, that´s the address to this Thing (Entity, StaticGeometry,...) and we also have the PB-intern ...-Number (Entitynumber, Materialnumber, Staticgeometrynumber,...), because PB lays down everything in a list or Array (I don´t know the exact behavior).
So, I believe you want the Staticgeometrynumber. We can´t rebuild a staticgeometry. So just create a variable and receive the number from CreateStaticGeometry(). If you wanna add something, you can free this staticgeometry and create another.
Re: static geometry vs grouped entities in a node
Posted: Wed Mar 19, 2014 12:47 pm
by T4r4ntul4
@samuel
that was indeed an interesting read.
I don't know of a command to obtain the StaticGeometry ID. Wouldn't the handle you give it during creation suffice?
You could store that and then use it when needed. Or is there a reason that wouldn't work?
but it seems there is no command for it, so iam gonna build a array grid for it.
a@ Bananenfreak
yes but iam using
AddStaticGeometryEntity(
#StaticGeometry, EntityID, x, y, z [, ScaleX, ScaleY, ScaleZ [, RotationX, RotationY, RotationZ]])
if i have 50 (or 200) static geometrys, i would like to know to
what static geometry iam adding to.
what i said before, its similar to minecraft, the static geometrys are like chunks to hold the entitys. if iam done building i create from the entities a static geometry. if i need to build again and add things to that static geometry, i convert it to the original entities. and so on and so on.
to bad theres no command for it, but i have already ideas to solve this

Re: static geometry vs grouped entities in a node
Posted: Thu Mar 20, 2014 6:19 pm
by Bananenfreak
You could create an integerarray for handling with your static geometries.
Now you can do this:
Code: Select all
Array() = CreateStaticGeometry(#PB_Any,... bla)
I don´t know what you want to do with a staticgeometry and converting it?! You can´t convert it. If you add an Entity to a static geometry, you still have this entity in your world; You also got an entry in your static geometry.
So, what I do is, I Keep my entities I added to the static geometry and make them invisible (HideEntity()). So they´re still in RAM, you can "touch" them with RayCast, MousePick,... but the GPU doesn´t render these Entities.
@Samuel:
I´ve read Nvidias presentation you posted here, but one question:
According to Nvidia, more triangles in one Batch are rendered with same Speed (rendertime). Only Batchcount is (Rendered Batches per sec.) is important.
So, if I add all Static Entities of an TerrainTile to one big Batch, there should be an increasement in renderspeed contemplable to , hmm, 5-10 Batches (only for static things), or not?
Re: static geometry vs grouped entities in a node
Posted: Thu Mar 20, 2014 10:27 pm
by Samuel
@Bananenfreak
Yes, a single batch should be quite a bit faster then multiple batches.
Kojack managed to render 16,777,216 cubes in a single batch. At first it was a little slow, but after he added some shader optimizations the speed improved.
It's related to minecraft which is something that T4r4ntul4 might be interested in.
http://ogre3d.org/forums/viewtopic.php?p=404631#p404631
Re: static geometry vs grouped entities in a node
Posted: Fri Mar 21, 2014 8:02 am
by Bananenfreak
What´s a 3D-texture?!
I've got 2 textures. One is a 16x16 texture atlas of tiles, which I "borrowed" from a minecraft mod page. The second is a 256x256x256 3d texture. I have a shader which uses the 3d position of each pixel to look up the second texture, take that colour and treat the green and blue channels as tile index values in the texture atlas
Re: static geometry vs grouped entities in a node
Posted: Fri Mar 21, 2014 5:46 pm
by Samuel
A 3D texture is literally a solid cube of texture. A 2D texture only has U and V coordinates, but with 3D you add on the W coordinate.
The DDS format should support 3D textures. As far as I know you can only use a 3D texture in a shader.