• Content count

  • Joined

  • Last visited

Community Reputation

100 Neutral

About Lleran

  • Rank
  1. Thanks for reply and ideas. I thought for a moment... GUI may be represented as: [xml]<Background> <Border> <TextButton/> <TextButton/> <TextButton/> </Border> <Some_other_batched_GUI/> </Background>[/xml] Also it may be represented as (in rendering order): 'Background - Border - TextButton - TextButton - TextButton - Some_other_batched_GUI. So, it's necessary to have some VBO buffers: (Background + Border) - (Button) - (Text) - (Button) - (Text) - (Button) - (Text) - (Some_other_batched_GUI). Yes, this isn't ideally, but this case isn't ordinary\frequent too (Creating text processor isn't in my plans[img]http://public.gamedev.net//public/style_emoticons/default/smile.png[/img]). Well, now I should to try implement this ideas. Neverwinter Nights 2 GUI - this is my ideal[img]http://public.gamedev.net//public/style_emoticons/default/smile.png[/img]
  2. I need advice about user interface implementation. Let's suppose that group of controls represented as single VBO buffer. For exaple (in rendering order): background - border - some icon. [sharedmedia=gallery:images:2018] Now I desire to add vbo based text (it represented as single VBO buffer too, therefore I have 2 VBO buffers). How can I implement rendering order like this: 'background - border - text - some icon' using 2 VBO buffers?
  3. Screenshots

  4. Fog as posteffect

    [quote]One thing to remember when doing this is potential issues with alpha blended objects / particles / anything that does not write into depth. Plenty of ways of getting round it (alpha doing their own fogging, rendered after the full screen pass, dithered depth buffer (inferred lighting), etc.), but will require some thought of course.[/quote] Yes, you're right. I want to use fog not as weather element - only to cover far objects in fog (e.g. Morrowind). I'm talking about outdoor scenes now. In this case I can to neglect some aspects like particles and other transparent objects - only nearest objects are draw. Well... I think so.
  5. Fog as posteffect

    Thanks for reply. Yes I want to implement simple linear fog first. I know the general idea - I have implemented some posteffects before. My problem is in fog factor calculation. I used this formula f = (fogend – d)/(fogend – fogstart), but it doesn't work properly. My fragment shader code (Cg): [CODE] //----------------------------------------------------------------------------- struct FS_INPUT { float4 Position : POSITION; float2 TexCoord : TEXCOORD0; }; //----------------------------------------------------------------------------- float4 main(FS_INPUT IN, uniform sampler2D ColorMap, uniform sampler2D DepthMap, uniform float4 fogColor, uniform float fogStart, uniform float fogEnd ) : COLOR { float4 fragmentColor = f4tex2D(ColorMap, IN.TexCoord); float4 fragmentDepth = f4tex2D(DepthMap, IN.TexCoord); float fogFactor = (fogEnd - length(fragmentDepth)) / (fogEnd - fogStart); fogFactor = clamp(fogFactor, 0.0, 1.0); return lerp(fragmentColor, fogColor, fogFactor); } [/CODE]
  6. How can I make this using depth buffer and color buffer? I understand general idea, but I can't implement this well. Any ideas, glsl, cg, hlsl code?
  7. Assimp: Get bone matrix?

    I have some problems with bind-pose too (see last post there) : [url="http://www.gamedev.net/topic/617851-anyone-ever-have-a-skeletal-animation-error-like-this/page__st__20"]http://www.gamedev.n...is/page__st__20[/url]
  8. Assimp: Get bone matrix?

    [quote]I was wondering if there was a way I can just get the bone transformations at their starting positions instead?[/quote] Do you mean the bind-pose? You may try to experiment with aiScene->aiMesh->aiBone->mOffsetMatrix. Assimp themes are actual for me now too.
  9. I need to take one step for understanding animation via Assimp (I hope[img]http://public.gamedev.net//public/style_emoticons/default/smile.png[/img] ). Now I'm experementing with complex model from Morrowind. In 3ds max it looks like this (dremora, yes[img]http://public.gamedev.net//public/style_emoticons/default/smile.png[/img] ): [img]http://uploads.gamedev5.net/gallery/album_361/gallery_194564_361_23612.jpg[/img] My application can import geometry with hierarchy well... excepting one point. Screenshot from my application: [img]http://uploads.gamedev5.net/gallery/album_361/gallery_194564_361_72832.jpg[/img] This is model in bind-pose on both screenshots. As I understand I must do skinning even in bind-pose. Right? But I can't understand one point. I import animation via set of aiAnimation. And this works well: nodes are animated as in 3ds max. But how should I use a set of aiBone in aiMesh structure? Instance of aiBone has matrix, but instance of aiNode has matrix too. Is aiBone matrix relative to some aiNode? What matrix should I use for skinning? I'm confused.
  10. Assimp : aiMesh & aiBone

    [quote name='hupsilardee' timestamp='1327507314' post='4906129'] Assimp does not instance meshes, so if your mesh has two pauldrons, they will be imported as separate meshes [/quote]I think this is not right. aiNode can refer to aiMesh by index. And one mesh can be used in some nodes with various matrix. This works fine with static geometry. As I understand it, it will not work with skinned mesh. Really, for animation(skinning) we must have two various pauldron meshes.
  11. I don't understand one thing. In Assimp aiMesh represents master-geometry. For example : model has two identical pouldrons - left and right. Therefore we can have only one mesh and use it twice. Right? But.. aiMesh has an aiBone array. Each bone refers to aiNode by mName, is this true (or maybe it's other, independent entity)? Also each bone has a matrix. But we already have matrix for each node in hierarchy. Does that mean that aiNode is not "full master geometry"? I can't understand this moment.
  12. Vertex Skinning help

    I have one question about the animation. This is a quote from the Assim documentation ([size=4]aiNodeAnim Struct Reference[/size]): [quote] The name specifies the bone/node which is affected by this animation channel. The keyframes are given in three separate series of values, one each for position, rotation and scaling. The transformation matrix computed from these values replaces the node's original transformation matrix at a specific time. [b]This means all keys are absolute and not relative to the bone default pose[/b]. [/quote] But... Does this mean that the keys of the node (in other words - matrix) are relative to its parent node? I am embarrassed by the word "absolute".
  13. Assimp question.

    Well, as I understood this is a feature of the COLLADA exporter (and Assimp importer). Part of the correct COLLADA file [CODE] <node id="node-Bip01_L_Toe0" name="Bip01_L_Toe0" sid="joint22" type="JOINT"> <matrix>-4.37114e-8 -0.9999999 -1.34092e-14 6.761646 0.9999999 -4.37114e-8 4.91523e-7 10.59154 -4.91523e-7 5.72948e-15 0.9999999 -4.30573e-6 0 0 0 1</matrix> </node> [/CODE] XML node "node" must have an attribute (type="JOINT") to be a bone. [quote]As you're working on a model converter you can just ignore the bone meshes and only convert the bone hierarchy into your custom file format.[/quote] Perhaps this is true. But there are many subtle points.
  14. Assimp question.

    Hi all. Now I'm developing a format using this library (COLLADA->my_format) and I have a question about the model nodes. Suppose I import the model which has only the skeleton from COLLADA. This is the part of COLLADA file: [CODE] <node id="node-Bip01" name="Bip01"> <matrix>-1.11659e-6 -0.9999999 0 0 0.9999999 -1.11659e-6 0 3.92653e-9 0 0 0.9999999 65.17503 0 0 0 1</matrix> <node id="node-Bip01_Pelvis" name="Bip01_Pelvis"> <matrix>8.96323e-7 0.9999999 -1.266e-6 0 -8.96321e-7 1.266e-6 0.9999999 4.44089e-16 0.9999999 -8.96321e-7 8.96323e-7 0 0 0 0 1</matrix> <node id="node-Bip01_Spine" name="Bip01_Spine"> <matrix>0.9955244 -0.09450607 -1.30992e-6 6.857667 0.09450607 0.9955244 3.7075e-6 -0.007909025 9.53674e-7 -3.8147e-6 1 2.38569e-13 0 0 0 1</matrix> <node id="node-Bip01_Spine1" name="Bip01_Spine1"> <matrix>0.9074489 0.4201623 1.49847e-6 9.961844 -0.4201623 0.9074489 -1.68342e-7 -0.006903864 -1.43051e-6 -4.76837e-7 1 1.4421e-12 0 0 0 1</matrix> <node id="node-Bip01_Spine2" name="Bip01_Spine2"> <matrix>0.9576223 -0.2880275 -7.13389e-7 9.563214 0.2880275 0.9576223 1.92079e-7 -0.008176597 6.27833e-7 -3.89414e-7 1 7.6294e-6 0 0 0 1</matrix> <node id="node-Bip01_Neck" name="Bip01_Neck"> <matrix>0.9718181 -0.2357309 -9.26798e-7 11.60393 0.2357309 0.9718181 -2.2481e-7 -1.200218 9.53674e-7 -3.56239e-14 1 -9.16411e-13 0 0 0 1</matrix> <node id="node-Bip01_Head" name="Bip01_Head"> <matrix>0.9929031 -0.1189281 -4.73453e-7 7.180753 0.1189281 0.9929031 -5.67093e-8 -3.02681e-6 4.76837e-7 -6.50238e-14 1 2.62219e-12 0 0 0 1</matrix> <node id="node-Bip01_Ponytail1" name="Bip01_Ponytail1"> <matrix>-0.1493662 0.9887819 2.87308e-6 8.839306 -0.9887819 -0.1493662 -3.32749e-6 -5.572218 -2.86102e-6 -3.33786e-6 1 -1.52588e-5 0 0 0 1</matrix> <node id="node-Bip01_Ponytail11" name="Bip01_Ponytail11"> <matrix>0.9105805 0.4133315 1.00309e-6 14.05035 -0.4133315 0.9105805 -4.55323e-7 -0.004968989 -1.10159e-6 -1.76652e-13 0.9999999 -6.71871e-12 0 0 0 1</matrix> <node id="node-Bip01_Ponytail12" name="Bip01_Ponytail12"> <matrix>0.9995185 -0.03102709 -9.71259e-15 6.84024 0.03102709 0.9995185 -1.37909e-13 -0.004851814 7.28032e-14 2.05053e-13 0.9999999 7.6294e-6 0 0 0 1</matrix> <node id="node-Bip01_Ponytail13" name="Bip01_Ponytail13"> <matrix>0.9863119 -0.1145049 -0.118651 6.101934 0.1136967 0.9934228 -0.01358097 -0.00462669 0.1194257 -9.51586e-5 0.9928433 -7.62939e-6 0 0 0 1</matrix> <node id="node-Bip01_Ponytail14" name="Bip01_Ponytail14"> <matrix>0.9725637 -0.1944915 0.1276439 5.871038 0.1928515 0.9809043 0.02520426 -0.0104077 -0.1301085 1.03583e-4 0.9914999 1.51491e-5 0 0 0 1</matrix> [/CODE] This is only the nodes of the hierarchy (no geometry). Assimp loads the correct hierarchy. The library also loads the geometric representation of each bone (mesh). How to solve this problem(maybe using post process steps...)?