About Store Forum Documentation Contact



Post Reply 
Low-level questions & high level features
Author Message
Chris Offline
Member

Post: #1
Low-level questions & high level features
1. In my tool, I import a format, get a Mesh, then finally get a MeshBase. I want to code “Ctrl+H” behaviour for the MeshBase as in the Mesh Editor – which just says “Rescales Height to 1” but it also seems to re-center it exactly how I need it, any tips on how to do this?

2. Just want to check the worst-case time complexity of the Sort(Memb< >) is n log n – I saw in the header Binary Search templates – does this mean your using a binary tree sort/ self-balancing binary tree sort? If so that’s great (just need a very good implementation for results).

3. “A Divide-And-Conquer Approach For Automatic Polycube Map Construction” (which builds ontop of http://vcg.isti.cnr.it/polycubemaps/ as implemented: http://vcg.isti.cnr.it/polycubemaps/models/#models ) is an automatic, seamless paramatization method (I think many people would find that attractive) – but it generates hard to use uv’s which need projection painting – which isn't so hard. Would EE be able to support the pixel shader texture lookup natively for games or would that require rewriting all main shaders (normals/diffuse etc) – is that easy to do by building ontop of the skinning tutorial?

4. In Skinning, what does TransformPos do – just wanted to know the technical name of the method here; is this LBS/SBS/Quaternion Skinning etc?

5. Is it possible/can there be a tutorial for writing/selecting custom shaders for terrain materials without a programmable world editor?

6. I see the multiplayer implementation now has support for Peer-To-Peer for reducing some server load. Could it eventually support a good UDP hole punching/NAT traversal method, to enhance the connectivity?

Thank you
10-17-2010 01:38 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #2
RE: Low-level questions & high level features
1. Matrix m; m.setNormalizeY(mesh.box); mesh*=m;
2. Sort is an implementation of quicksort, it should be fast, but it doesn't use BinarySearch templates
3. advanced solid shader tutorial shows most of features. but remember you can't write custom shaders for forward/simple renderers and you wont have shadows in blend light technique.
4. TransformPos function code is included in shader headers, you can check it, it's just multiplying vector by object matrix. Vec*Matrix
5. Terrains use the same shaders as every other materials, except the case when there are 2..3 materials blended together in one triangle, then the shader would look different.
6. Did you try it with NAT? I did implement there an experimental hole punching (untested).
10-17-2010 01:55 PM
Find all posts by this user Quote this message in a reply
Chris Offline
Member

Post: #3
RE: Low-level questions & high level features
Hi Esenthel,

1. Thanks so much - and here was me iterating and counting data on the meshbase, such a lovely simple answer.
2. I think due to me sorting mesh data, this is actually faster than some n log n worst-case methods (as it contains some natural order for the qsort pivoting point) so will keep it unless really needing better.
3. Okay, i'll keep working on the other stuff rather than worrying about this for now.
4. Oh, so it's using 'Matrix palette skinning'? - i'm just trying to find the technical name of the method used for the results of the paper.
5. Sounds hard combining shaders to work differently on different triangles.
6. Sorry, I haven't tried this yet - was waiting for the demo codes to get a bigger picture before testing/evaluating/and trying to break your multiplayer smile

Thank you very much for all your answers
10-17-2010 02:34 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #4
RE: Low-level questions & high level features
4. yep, it's an array of matrixes for each bone
6. grin I will upload them today, but first need to finish newest SDK as the demo uses some new functions from it.
10-17-2010 02:41 PM
Find all posts by this user Quote this message in a reply
Chris Offline
Member

Post: #5
RE: Low-level questions & high level features
Hi,

I've got one more specific question, and two issues:

1. At one point, I was able to do: FREPA(body.base(0).vtxs()) body.base(0).vtx.color[i] = RED; and then, with body.draw(..), it'd work. But after modifying my tool to import .obj's (rather than using the .mesh format), it crashes when I set their colours. I import with the following:

Code:
    if (ImportOBJ(filename,&body,mats,parts) && body.vtxs()) {
        Tools.setText(S+"Imported Obj! Contains: "+body.vtxs()+" vertexes and "+ ((body.parts()==1)?S+body.parts()+" part!":S+body.parts()+" parts!"),3);
    } else {
        Tools.setText("Error importing OBJ.",3);
        return;
    }
    
    body.setRender();
- is it something to do with not having skinning data on each vertex? If so, what is the easiest way that I get it to work? (p.s also it doesn't show tesselation - which would be nice) (pp.s. for the displacement map tesselation in the future, i'm not sure if you've seen this: http://www.geeks3d.com/forums/index.php/...767.0.html video here: http://www.youtube.com/watch?v=GQJ7_eaM05E) - would be cool to see this kind of thing in the engine later.

2. World Editor.exe crashes (the x64 bit and DX10 versions work fine) - it says it can't load the main shader, since the previous update.

3. Since the latest update, I get the following build warnings:
Code:
1>  Creating "Release\Research.unsuccessfulbuild" because "AlwaysCreate" was specified.
1>ClCompile:
1>  All outputs are up-to-date.
1>  Tools.cpp
1>ResourceCompile:
1>  All outputs are up-to-date.
1>EsenthelEngine.lib(Window IO.obj) : warning LNK4075: ignoring '/EDITANDCONTINUE' due to '/OPT:ICF' specification
1>  Research.vcxproj -> C:\Users\Chris\Research\Research.exe
1>FinalizeBuildStatus:
1>  Deleting file "Release\Research.unsuccessfulbuild".
1>  Touching "Release\Research.lastbuildstate".

Thanks,
Chris
11-10-2010 04:56 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #6
RE: Low-level questions & high level features
1.
maybe there's no base(0) ?
you need to check first if mesh.parts()>=1

nice alien demo, yeah, that's on my roadmap list (displacement mapping(

2. 3. thanks, I think I accidentally uploaded debug (not release) version, I'll reupload them today.
11-10-2010 05:09 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #7
RE: Low-level questions & high level features
1. also are you checking if vtx.color exists?
11-10-2010 05:20 PM
Find all posts by this user Quote this message in a reply
Chris Offline
Member

Post: #8
RE: Low-level questions & high level features
Hi, Thanks for your reply.

if (body.parts()>=1) body.base(0).vtx.color[i] = RED; // this still crashes
Tools.setText(S+body.base(0).vtxs()); // this prints out 1667 vertexes (so I think base(0) exists).

I think vtx.color doesn't exist, but why? And how do I create it? I want to use it for a kind of visualisation, e.g. how you do weight painting in the mesh editor.
11-10-2010 06:03 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #9
RE: Low-level questions & high level features
MeshBase,MeshPart,Mesh::include(VTX_COLOR)
11-10-2010 06:07 PM
Find all posts by this user Quote this message in a reply
Chris Offline
Member

Post: #10
RE: Low-level questions & high level features
Thanks, it worked! - Not sure why, but I also needed to weld the vertexes.
11-10-2010 06:38 PM
Find all posts by this user Quote this message in a reply
Chris Offline
Member

Post: #11
RE: Low-level questions & high level features
Hi; i've stored these ones up for a month, sorry.

Questions:

1. Is there a way to draw a single transparent "Mesh", e.g. with no other objects on the screen? I want to draw a solid custom skeleton through it, rather than above it with lines - it's got to look as nice as possible.

2. How do you make a "Mesh" have tessellation? After importing it from an obj; if I enable tessellation, it doesn't seem to make any changes (note: it's fine in the tessellation tutorial/ME/WE) - does it need extra data in the vtx's? PS, using custom shaders.

3. How can I detect if the mouse is on the GUI (e.g. to disable zooming my world with the scroll, while scrolling the GUI).

Feature suggestions

i. Profiler - people have already raised questions on I/O for the MMO. It'd be nice to have a profiler, or the ability to draw some graphs for any type of data - e.g. Edit::DrawGraph Dg; Dg.create(BAR_GRAPH,&MyMemb); and use it in a tutorial "Profiler" to draw some memory usage/disk access etc. I'd like to visualise some dynamic data, and it'd be a nice feature to have rather than writing custom GuiObj's.

ii. Animation enums and better defaults for Gui - e.g. Easing: similar to pulpcore: REGULAR_IN, REGULAR_OUT, ELASTIC_IN, ELASTIC_OUT, etc -- applicable to entrance, exit, and flash of all gui objects: e.g. button.hide(STRONG_OUT|FX_FADE|FX_SHRINK); button.show(ELASTIC_IN|FX_FADE|FX_ROTATE); if (button.visible()) button.fx(FLASH|FX_FADE);

iii. More flexible text rendering - e.g. ability to have characters one at a time, make them ripple/zoom/fade/etc with easing - ideally with the above animation enums on them.

iv. MMO Transparency - at the moment the MMO source is very much seperate to the engine. Although this is good, as licensed developers get to see it, its also bad as its hard to update it. Please can you modularise it more, and embed more of it into the engine (while letting it still be overridable) - e.g. to have more abstract/up-to-date network implementations. it'd be nice to see the network layer being almost transparent to the game development process, only adding a few extra lines of code.
11-22-2010 03:45 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #12
RE: Low-level questions & high level features
Hi,

1. you can use "blend light" material techniques, or use "solid" technique and draw mesh with "drawBlend" instead of usual draw.
2. if you're using custom shaders, then you need to manually program hull and domain shaders.
3. Gui.ms()==&gui_obj or Gui.wheel()
11-22-2010 05:11 PM
Find all posts by this user Quote this message in a reply
Chris Offline
Member

Post: #13
RE: Low-level questions & high level features
Ah ok, thanks for the replies smile
11-22-2010 06:40 PM
Find all posts by this user Quote this message in a reply
Chris Offline
Member

Post: #14
RE: Low-level questions & high level features
Hi sorry for the frequent questions,

I've got one more related question to this. I'm trying to use my own skinning data to attach vertexes to the skeleton, but it doesn't seem to work:

   

To test it, I tried this after importing an .Obj:
Code:
body.include(VTX_ALL);
FREP(body.base(0).vtxs()) { // only 1 base & part in this test
    body.base(0).vtx.blend[i] =  Meshes("Sample/0.mesh")->base(0).vtx.blend[i];
    body.base(0).vtx.matrix[i] = Meshes("Sample/0.mesh")->base(0).vtx.matrix[i];
}

e.g. I'm copying all the blend & matrix vtx data from a pre-made mesh (which works, and draws correctly with Meshes("0.mesh")->draw(cskel)wink

1. What I want is to copy the data from Meshes("0.mesh") into my "Mesh body;" - as a test - when that is working, I can migrate my functions for manually setting the skinning data for Mesh body. How can I do this? I never found a tutorial on skinning data.

2. Is it possible, with the current skinning system, to get a Vec point for each vertex on the skeleton?

Thanks.
(This post was last modified: 11-27-2010 12:22 AM by Chris.)
11-26-2010 11:17 PM
Find all posts by this user Quote this message in a reply
Chris Offline
Member

Post: #15
RE: Low-level questions & high level features
3. Off topic: I have a LOT of voxels (represented with Image 3d). I want to add some helper data to a small set of the voxels (e.g. those only on the surface of the voxelization). The problem is that I need the memory address of the helper data from the original voxel. E.G. Memb<VoxelHelper> surface; surface[32] may point to voxels[2024][1022][100]; One way to achieve this mapping would be to give each voxel an Int represeting the memory address of surface. But voxels.createTry(res3d.x, res3d.y, res3d.z, IMAGE_I32, IMAGE_3D)) isn't supported. What is the reccommended way to achive this mapping (without huge memory allocation)?

(and more importantly *bump* please help with my other two questions; i'm really stuck with the current system in EE and need to get skinning working asap.)
11-27-2010 08:24 PM
Find all posts by this user Quote this message in a reply
Post Reply