Gamestudio Links
Zorro Links
Newest Posts
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
M1 Oversampling
by 11honza11. 04/30/24 08:16
Trading Journey
by howardR. 04/28/24 09:55
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (AndrewAMD), 946 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 2 1 2
Re: Is there a version of "in_solid" or "c_content" for meshes? [Re: Superku] #351306
12/23/10 14:45
12/23/10 14:45
Joined: Aug 2007
Posts: 1,922
Schweiz
Widi Offline
Serious User
Widi  Offline
Serious User

Joined: Aug 2007
Posts: 1,922
Schweiz
I have this solution from the manual, never tried it by myself. cry

Re: Is there a version of "in_solid" or "c_content" for meshes? [Re: Widi] #351312
12/23/10 15:29
12/23/10 15:29
Joined: Jun 2006
Posts: 2,640
Earth
Germanunkol Offline
Expert
Germanunkol  Offline
Expert

Joined: Jun 2006
Posts: 2,640
Earth
what?
why was it removed?
It would've been my approach as well.
Evilsob, have you asked the developers about this? if they remove the function, there must be an alternative?
and not only in A8...?

Last edited by Germanunkol; 12/23/10 15:32.

~"I never let school interfere with my education"~
-Mark Twain
Re: Is there a version of "in_solid" or "c_content" for meshes? [Re: Germanunkol] #351333
12/23/10 18:34
12/23/10 18:34
Joined: Mar 2006
Posts: 3,538
WA, Australia
J
JibbSmart Offline
Expert
JibbSmart  Offline
Expert
J

Joined: Mar 2006
Posts: 3,538
WA, Australia
Okay, so the small mesh is a cube of whatever unit-size you're using to measure volume, right? And you'll basically check a 3D grid of these cubes against the object you're considering?

Here's a bit of a thought: You have a 3D-array of bits (inside and outside), all set to "outside" (0 or 1, doesn't really matter). Go through the vertices of the big model, and at each one find the nearest point in the array behind the normal. Set it to "inside", and put the indices of each of those "inside" bits in a list. For the next stage you'll repeatedly go through the list, and each point will run a function for each of its "children", where each child is an "outside" bit adjacent to this point, that goes through all the polygons in the big mesh and sees if any of them separate a child from its parent. If none separate the child from its parent, the child is set to "inside" and added to the list. When each "parent" is done, it is removed from the list. This is repeated until the list is empty -- that is, no more points have access to empty points.

You now have a volumetric representation of the mesh (which most be closed, obviously, for this to work). For each bit you add, also increase a counter by 1 to get instant access to the volume of the mesh.

Something like a sword with polygons pressed up against each other could be trouble -- you could end up with an outside bit being called "inside", and that means everything will be considered inside. To prevent this, for each bit you set to "inside" in the first stage, first make sure it isn't right in front of the normal of any polygons in the mesh.

I hope that makes sense, and I haven't overlooked something silly tongue

Jibb


Formerly known as JulzMighty.
I made KarBOOM!
Re: Is there a version of "in_solid" or "c_content" for meshes? [Re: JibbSmart] #351432
12/24/10 20:15
12/24/10 20:15
Joined: Jul 2007
Posts: 959
nl
F
flits Offline
User
flits  Offline
User
F

Joined: Jul 2007
Posts: 959
nl
maby you can use D3DXIntersect its only not inserted inside d3d9.h so you would need to add it yourself and dont know if you can us it in gs

its just a idea


"empty"
Re: Is there a version of "in_solid" or "c_content" for meshes? [Re: flits] #351595
12/27/10 12:19
12/27/10 12:19
Joined: Feb 2008
Posts: 3,232
Australia
EvilSOB Offline OP
Expert
EvilSOB  Offline OP
Expert

Joined: Feb 2008
Posts: 3,232
Australia
Sorry bout the delay in my responses, but christmas and all, y'know?

Widi: Thats cool, cause the manual still 'suggests' that it is possible. (grrr)

Germanukol: I probably will try Developers later.

JulzMighty: I was thinking the same concept myself, but Im more focussed on getting
the actual "edge"-detection sorted out first, as the 'fill' process may flow on from that...

flits: D3DXIntersect is basically useless to me dude, as it is testing a RAY intersecting a mesh...
BUT thanks anyway, your suggestion has inspired me to do a bit of research into 'mesh to mesh'
intersection techniques performed at a D3D-level, I didnt think of going there.
(It doesnt matter about if they are included or not, Ive accessed
non-included D3D functions before, so it will be do-able)


I am still going to stay open to further suggestions and/or ideas, but this issue
is now pushed to a lower priority as I want to get the rest of the programs interfaces
completed before I forget them, as theres a lot still only exists in my head,
and I want to put them into code before their architecture falls out my ears...


FYI: Merry Christmas and Happy New Year to all...





"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial
Page 2 of 2 1 2

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