Jump to content
The Dark Mod Forums

mohij

Member
  • Posts

    244
  • Joined

  • Last visited

Posts posted by mohij

  1. I copied the HeightMap thingy over. I put some materials that use the heightmap expression on a brush, but I'm not sure how the result should look like. It is colored and bumped, is that correct?

     

    Edit: compared to current head, and that seems to be correct (since current head does not bump) :)

     

    Edit2: am I meant to upload this now? I have no information whatsoever on how to do this.

  2. Well I do roughtly understand what it does (those comment lines, though rare give some hint to what actually happens), but understanding how Edge Detection and in this case the Prewitt filter works is a different thing (my brother said this is stuff for fourth term in university ;-).

     

    Hey, I just saw that you already created a new branch, cool, thanks.

  3. A HightMap is defined by the greyscale image and a scale value. Does someone know how this parameter is defined? Ideal case would be a relation to the pixel distance (like 1=from white to black is one pixel distance, 0=means no distance (the image is ignored), 2=two pixeldistances, and so on).

  4. Just started again, and I am completely puzzled now. I made getBinding only return getShaderNotFound, so my changes are completely out of the job, and still the blocks are white.

     

    edit: Thinking about it a bit more, that obviously means the error must be in loadStandardTexture, and I even found some changed stuff, I think I'll have solved it soon.

  5. Well, I didn't change anything (except code to find the error). What I found out: getShaderNotFound() is called. I can't check if it is called as often as with old code, since current svn is broken, in case you don't know:

    radiant/csg.cpp: In function 'Face* Brush_findIf(const Brush&, const Predicate&)':
    radiant/csg.cpp:214: error: operands to ?: have different types

     

    Also strange is where such a white texture could come from, as it is a valid image something must have produced it, no idea where it should come from.

     

    I'm still looking into it.

  6. I meant removing the class entirely, as the only place it is used is the ImageExpression::getImage().

    But it's also no problem to keep it, I just thought that it might be nicer to remove it.

     

    I'm not sure what you mean with turning it into a helper class, it already is a nice small class, isn't it? And how could it even work as singleton, there could very well be more than one of it, or am I mistaken?

  7. I tested bumpmaps and dynamic lightning and it works.

     

    I will try to find the shadernotfound error. And after that I can finally actually start to implement the MapExpressions :-)

     

    Completely off topic: should I copy the texture constructor over to ImageExpression::getImage() and remove it?

  8. About the NULL pointer and the "control reaches end of non-void function", I had those fixed already, even though I did it with references. I changed it to pointers now.

     

    About shared pointers and .get()-> ... changed that, very good to know, thanks. If I had known that before... ;-)

     

    Sorry about the formating, I use (vim)

    set softtabstop=4
    set noexpandtab
    set shiftwidth=4

    Which means an indenting of 4, but with the standard tab width of 8 (rest is filled up with spaces).

     

    Logical mistake in CShader: yeah, right, got those, thanks.

     

    Will upload the new version. The code looks definitely nicer, but the default texture is still white and not "shader not found".

  9. Added another check for empty textures into getBinding, and now radiant works (with adding a brush, haven't tested anything else for now). But the brush is plain white (with standard texture).

     

    Texture browser shows a lot of white textures, but some also show correctly. It seems that just the "shader not found" texture does not work.

     

    Edit: In dynamic light mode the textures show no change to no dynamic light mode.

     

    I will probably not be able to continue on this until tomorrow evening :-(

  10. Crashes on creation of brush, so no idea if MapExpressions work ;-)

     

    The first (old) crash/assertion happend in getBinding where the GLTextureManager got an empty MapExpression and asserted. If I understand it right it shouldn't assert on empty MapExpressions, but produce the getShaderNotFound(). (if I interpreted it right the old getBinding did exactly that).

     

    The current crash happens in GLTextureManager::load, because the getBinding parsed it an empty image. But since it checks for empty MapExpressions I wonder how it is possible that such a MapExpression returns an empty Image.

     

    Well I guess it's quite hard to understand what I talk about when you didn't read the code... If you are interested I could send you my plugins/shaders folder.

  11. Atm my Radiant aborts, because

    GLTextureManager::getBinding(MapExpressionPtr mapExp)

    gets an empty MapExpressionPtr.

    The old version of the MapExpressions had a function which, according to comment, evaluates to an empty texture, so getBinding worked.

     

    If I understood the problem right, I have two possibilities, either introduce empty MapExpressions also and roll it up the way it was in the old code, or modify getBinding to check for empty MapExpressions and then return the empty texture. The second way has the disadvantage that any error checking is bypassed. So what'd you say?

  12. Completely offtopic question. While compiling I get these warnings (after every file). Once I tried to fix them, but I didn't understand much. Is that important enought for a bug?

    radiant/winding.h: In function 'void Winding_testSelect(Winding&, SelectionTest&, SelectionIntersection&)':
    radiant/winding.h:373: warning: dereferencing type-punned pointer will break strict-aliasing rules
    libs/math/Vector4.h: In member function 'const BasicVector3<T>& BasicVector4<Element>::getVector3() const [with Element = double]':
    libs/math/matrix.h:439:   instantiated from here
    libs/math/Vector4.h:291: warning: dereferencing type-punned pointer will break strict-aliasing rules
    libs/math/Vector4.h: In member function 'BasicVector3<T>& BasicVector4<Element>::getVector3() [with Element = double]':
    libs/transformlib.h:71:   instantiated from here
    libs/math/Vector4.h:287: warning: dereferencing type-punned pointer will break strict-aliasing rules

×
×
  • Create New...