Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / is this the Latest WeldVertex by Ianm , or is there a new one?

Author
Message
haliop
User Banned
Posted: 16th Dec 2009 14:28 Edited at: 16th Dec 2009 14:29
i dont understand it much
im translating it now to DarkGDK
but if there is a newer more updated one
i would also like to look on , if anyone knows
pls , dont be shy

Credits to Ianm
IanM
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 16th Dec 2009 18:20
It looks like it's the last one I posted, but there are two extra unnecessary fields in the Vertex_t type (the last 2).

Make sure that you expand the CheckMatchingVertex function to cover all parts of the vertex you are interested in - for example, you should also check the normals, diffuse and all texture levels are the same between two vertices before you assume that they can be coalesced.

Also, there are various changes you could make for the GDK - you can access the mesh data directly rather than load it into an array, adding an index to the mesh would be better if you do it using the structures available to you rather than poking a value.

Also remember that the code does not work with animation.

haliop
User Banned
Posted: 16th Dec 2009 19:53 Edited at: 16th Dec 2009 19:55
i just needs it to make a Terrain from Plains , so that shadows and multitexturing will work on them (after understanding that no shadows will work on a Matrix, also dbGetGroundHeight(int MatrixId) dosent work very well..

like in CallofDuty if you ever played a bit with Radiant
then , there you create the "Terrain" from Subdevided Plains
so you get

[][][][][][][][][][]
[][][][][][][][][][]
[][][][][][][][][][]
[][][][][][][][][][]
[][][][][][][][][][]

this is a complete plain devided into section (well you know that already )

each box 4 vertexes

what i do now is :

getting the CenterTile (which is the Tile im aiming to raise or lower) , then selecting Upper/ Upper right/ right/ down right / down/ down left / left / upleft tiles , and change them where needed, but there are 2 problems :
1. i guess it takes a lot more memory or isnt it .. there are too much unknown to programming for me.
2. i get a problem with 2 sides of a raised tile, here is a screenshot:






i have some ideas on how to fix it , but i guess the best way is not to play with it too much , just do somekind of welding to make it happen, again , i dont know if im right im thinking about it all day and i tried some method like rotating the PlainObject but , then i need to rotate it again if im doing something on the other side or something.. so .. it was too much pain thinking on it..

P.S
dont mind the matrix that is below that.
haliop
User Banned
Posted: 17th Dec 2009 10:07
sorry for the bump
Freedom Fighters
14
Years of Service
User Offline
Joined: 2nd Nov 2009
Location:
Posted: 20th Dec 2009 07:33
Holy ****, you have made so much progress already, better than mine.
keep the good work up. this looks like it will go somewhere

Problem Solution That Never Fails: "Build A Bridge And Get Over It"
Greenster
19
Years of Service
User Offline
Joined: 3rd Feb 2005
Location: US ©
Posted: 20th Dec 2009 09:18
Is this meant for procedural content or to re-invent the wheel?

Login to post a reply

Server time is: 2024-04-23 22:57:16
Your offset time is: 2024-04-23 22:57:16