Entity to WorldGeometry convertion

Anything and everything that's related to OGRE or the wider graphics field that doesn't fit into the other forums.
User avatar
NeoPain
Halfling
Posts: 42
Joined: Fri Mar 18, 2005 9:24 pm
Location: Ukraine, Uzhgorod
Contact:

Entity to WorldGeometry convertion

Post by NeoPain »

How to convert entities to WorldGeometry to make rayquery able to intersect it as worldfragment?

User avatar
NeoPain
Halfling
Posts: 42
Joined: Fri Mar 18, 2005 9:24 pm
Location: Ukraine, Uzhgorod
Contact:

Post by NeoPain »

OK. I'll say it another. The ST_EXTERIOR_FAR's world geometry is terrain. So when ray intersects it, RaySceneQueryREsult returns WorldFragment which has Single Intersection value. Can i make such worldGeometry from Entities?

User avatar
jacmoe
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 20570
Joined: Thu Jan 22, 2004 10:13 am
Location: Denmark
x 179
Contact:

Post by jacmoe »

/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.

User avatar
NeoPain
Halfling
Posts: 42
Joined: Fri Mar 18, 2005 9:24 pm
Location: Ukraine, Uzhgorod
Contact:

Post by NeoPain »

No. I read al that tutorials. We get WorldFragment because terrain is WorldGeometry. And i'm asking how to build WorldGeometry from entities. I think Sinbad knows how to explain that.

User avatar
SuprChikn
Bugbear
Posts: 863
Joined: Tue Apr 19, 2005 6:10 am
Location: Melbourne, Aus
Contact:

Post by SuprChikn »

I assume you want this so you can use a ray and see if it hit a face of a mesh, rather than the less accurate method of hitting it's bounding box.
If this is the case, I think you may have to use OPCODE or ODE (or some other physics engine), and use a trimesh of your object, and look for ray intersections with it.
AFAIK you cant simply turn a regular mesh into world geometry to bypasss this. I could be completely wrong here though.

User avatar
NeoPain
Halfling
Posts: 42
Joined: Fri Mar 18, 2005 9:24 pm
Location: Ukraine, Uzhgorod
Contact:

Post by NeoPain »

"....you cant simply turn a regular mesh into world geometry to bypasss this..." Thats what im asking about!!!! How to turn regular mesh to WorldGeometry???????

User avatar
SuprChikn
Bugbear
Posts: 863
Joined: Tue Apr 19, 2005 6:10 am
Location: Melbourne, Aus
Contact:

Post by SuprChikn »

SuprChikn wrote:AFAIK you cant simply turn a regular mesh into world geometry to bypasss this.
can't, cannot, not possible.... um... не може, не можливий

Sinbad or some1 please correct me if I'm wrong.

User avatar
Raven
Goblin
Posts: 203
Joined: Wed Mar 23, 2005 1:07 pm
Location: Melbourne, Australia
Contact:

Post by Raven »

You also don't need to turn it into world geometry, rays will intersect entities, or anything they hit for that matter, it is what you choose to do with them after you have processed the ray.
I used up all my sick days, so I'm calling in dead.

User avatar
SuprChikn
Bugbear
Posts: 863
Joined: Tue Apr 19, 2005 6:10 am
Location: Melbourne, Aus
Contact:

Post by SuprChikn »

I'm pretty sure that the ray will check for intersection with the bounding box of the entity, not the faces.

User avatar
Falagard
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 2060
Joined: Thu Feb 26, 2004 12:11 am
Location: Toronto, Canada
x 3
Contact:

Post by Falagard »

You'd have to modify one of the scene managers in that case. It's up to the scene manager to determine what is world geometry and what isn't.

The question is, exactly what are you trying to do?

Even if you implemented it in a scene manager, and you wanted the exact face that was collided with, then you do have to use OpCode, or a similar system (like Rapid, but I'd suggest just using opcode).

The map editor will have opcode implemented and be detecting the faces that you clicked on for a mesh, so if you can wait a week, I'll be releasing that source then.

Clay

User avatar
NeoPain
Halfling
Posts: 42
Joined: Fri Mar 18, 2005 9:24 pm
Location: Ukraine, Uzhgorod
Contact:

Post by NeoPain »

""...can't, cannot, not possible.... um... íå ìîæå, íå ìîæëèâèé ..."""
Are you ukrainian or what??? :shock: :shock: :shock: :shock:

User avatar
jacmoe
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 20570
Joined: Thu Jan 22, 2004 10:13 am
Location: Denmark
x 179
Contact:

Post by jacmoe »

Are you a NeoPain in the butt ? :twisted:
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.

User avatar
SuprChikn
Bugbear
Posts: 863
Joined: Tue Apr 19, 2005 6:10 am
Location: Melbourne, Aus
Contact:

Post by SuprChikn »

NeoPain wrote:Are you ukrainian or what??? :shock: :shock: :shock: :shock:
No, but I saw that according to your location you are. So I did a quick google search for "English Ukrainian translation" and found a deal online thta would let me do that. :)

User avatar
NeoPain
Halfling
Posts: 42
Joined: Fri Mar 18, 2005 9:24 pm
Location: Ukraine, Uzhgorod
Contact:

Post by NeoPain »

jacmoe wrote:Are you a NeoPain in the butt ? :twisted:
Aha...Pain to the MAX!

Whitebear
Greenskin
Posts: 147
Joined: Mon Oct 25, 2004 5:22 am
Location: RF
x 1

Post by Whitebear »

Very intellectual talk.
\_ :roll:_/

progmars
Halfling
Posts: 60
Joined: Fri Jun 17, 2005 10:47 am

Post by progmars »

((2b) || (~(2b)))
If it is evaluation expression in C++ I think it would be more correct:
((2b) || (!(2b)))
(just kidding :)

Speaking of that intersection: many good games have that awful deffect: when a man falls dead he puts his hand or head through the door or maybe hangs in the air supported only by the stairs under the head or something like that. Is it really a problem to do some more calculations and make everything look more real? I mean - bending a body if it falls down? Or maybe I should play better games :)
Anyway I am just a newbie and do not know much about these physical modelling calculations and how reosurce consumptive they really are...

User avatar
SuprChikn
Bugbear
Posts: 863
Joined: Tue Apr 19, 2005 6:10 am
Location: Melbourne, Aus
Contact:

Post by SuprChikn »

Firstly, that isn't a C++ expression. It's in some other notation convention (possibly scheme/LISP?).

As for the models falling partly through walls and such: This happens because for those games they have a death animation, and the model just plays out that pre-calculated animation and falls where it lies. And the collision detection to see where it is on the floor would likely be done between the feet of the standing model, and as far as this point is concerned, it's not wall colliding, and it's on land (so this is why you get them hanging over the edge when in real life they would slip and fall).
To do it more realistically, you would have to implement ragdoll physics. In some cases it might have been considered unnecessary, and in others (especially older games) not possible / not worth the overhead. Think about the computers these older games were designed to run on...

User avatar
haffax
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 4823
Joined: Fri Jun 18, 2004 1:40 pm
Location: Berlin, Germany
x 6
Contact:

Post by haffax »

This is too C/C++. ~ is bitwise not, ! is logical not. So ! makes more sense indeed. Sorry too continue this off topic bit, but this itched me. ;)
team-pantheon programmer
creators of Rastullahs Lockenpracht

User avatar
SuprChikn
Bugbear
Posts: 863
Joined: Tue Apr 19, 2005 6:10 am
Location: Melbourne, Aus
Contact:

Post by SuprChikn »

Ah, I stand corrected.

Whitebear
Greenskin
Posts: 147
Joined: Mon Oct 25, 2004 5:22 am
Location: RF
x 1

Post by Whitebear »

This is too C/C++. ~ is bitwise not, ! is logical not. So ! makes more sense indeed. Sorry too continue this off topic bit, but this itched me
Just some explanations. /Poor Hamlet.:(

0x2b is the ASCII code for '+', that looks like a Catholic cross.
~0x2b == 0xd4 is the ASCII code for a Russian letter, that sounds like the English letter 'F', but looks different, somewhat like an Orthodox cross.

So, the mysterious expression means no more than confrontation between the East and the West. :wink:

BTW, this line hangs below my posts for a long time, but it was noticed and discussed two days ago. What's happened?
\_ :roll:_/

User avatar
DWORD
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 1365
Joined: Tue Sep 07, 2004 12:43 pm
Location: Aalborg, Denmark
Contact:

Post by DWORD »

[pedantic]
Then shouldn't it be '(0x2b || ~0x2b)'? :twisted:
[/pedantic]

User avatar
SuprChikn
Bugbear
Posts: 863
Joined: Tue Apr 19, 2005 6:10 am
Location: Melbourne, Aus
Contact:

Post by SuprChikn »

is this it? :arrow:

So you're saying your signature is not only translates to a hamlet quote, but also:
+ or †

Nifty.

[edit] Wait, what was the topic of this thread again? :twisted: [/edit]

Whitebear
Greenskin
Posts: 147
Joined: Mon Oct 25, 2004 5:22 am
Location: RF
x 1

Post by Whitebear »

Then shouldn't it be '(0x2b || ~0x2b)'?
1. There were no '0x-s' in the original Hamlet's question. :wink:
2. The numerous brackets make the expression look like a preprocessor macros, and it makes me happy. :)
3. If the line annoys anyone I can get rid of it at all. :wink:
\_ :roll:_/

Timme
Greenskin
Posts: 122
Joined: Sun Mar 13, 2005 8:23 pm
Location: Germany

Post by Timme »

I think its "2b||!2b"....

But (0x2b || ~0x2b) is also nice...

User avatar
SuprChikn
Bugbear
Posts: 863
Joined: Tue Apr 19, 2005 6:10 am
Location: Melbourne, Aus
Contact:

Post by SuprChikn »

If you did it as 2b||!2b then you wouldnt have the bitwise not, and so you wouldnt have the secondary meaning..

Post Reply