Jump to content

Tiedye

Members
  • Posts

    13
  • Joined

  • Last visited

  • Days Won

    2

Tiedye last won the day on March 1 2023

Tiedye had the most liked content!

Converted

  • Gender
    Undisclosed
  • Location
    Ontario, Canada
  • Personal Text
    I can kinda program..

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Tiedye's Achievements

Tree Puncher

Tree Puncher (2/8)

16

Reputation

  1. Hi this may not be a solution, but the reason the 1.6.2 mod doesn't work with 1.6.4 is the obfuscation changes with each Minecraft version, so to make his mod compatible with 1.6.4 you have to fix all the references to obfuscated code. The mappings can be found in the MCP files he mentioned (*.cvs and *.srg I think?). Core mods always have to be updated for every new Minecraft version (sv.class in 1.6.2 could be gj.class in 1.6.4).
  2. Another little update. Note that I've been pretty busy with school stuff so that's why I've made so little progress, but here's a screenshot. Smooth lighting! Its using the multi-lightmap with shaders idea and its working pretty well. Do note however this is just a modification my original test that I used to make the not-smooth-lighting screenshot from before, so extremely incomplete (note black block in hand), and has no semblance of an API. Just thought I'd post something so you know I haven't given it up.
  3. @Draco18s I think when it comes down to it, not Including the coloured lighting may be more of a pain that including it due to fact that the default lightmap is being completely replaced, and since its being done with shaders the overhead should be essentially zero. @luisc99 Thanks for the suggestion! I'll be sure to do my best to add that, seems like an excellent idea. One last thing, the 1.7 per-release just got released (Yay) so I'll be aiming to release this mod for that instead, so don't expect anything before 1.7.
  4. Hi again, just wanted to mention that was able to get a shader working where the glTexEnv failed with vanilla light. So what that means is I made the lighting system use two lightmaps instead of one (skylight and blocklight) and combine them via a shader, and this worked with smooth lighting perfectly. So that's a nice step forward. However, using the shader at only one step of rendering caused a lot of other things to render wrong (like held blocks and items). This problem will probably be fixed when I finish going through everywhere in the code where the Tessallator.setBrightness member is accessed. Also the first little test I made was made using vanilla MCP, no forge, and I'd like to make this forge compatible with an API and not break anything and forge has a few more things that need to be made compatible to work with this. This will probably take quite a bit of time and tons of debugging to get it to work properly. AND Minecraft 1.7 will add official support for shaders with will require a rewrite of the mod, which will probably take a good bit less time than the first. All in all, don't hold your breath for a final version, it's going to take some time I think. Also, any suggestions how you think the API should be layed out are welcome. Tiedye
  5. @Mazetar Thanks for the interest! I'll go ahead and post some more stuff then. Since in MC 1.7 their adding official support for shaders, I think they will be a better solution than screwing around with the glTexEnv stuff (that feature was deprecated in OpenGL 1.3 I think and was added in 1999, almost 15 years old!). So if anyone has any advice for using shaders for multi-textureing, don't be afraid to post! I have had a look into it and I think it wont be too difficult, a very simple fragment shader will do the trick I think. I'll just have to figure out how to sample the textures properly.
  6. @ailmanki You're right, the funky colours were because of interpolation. So now instead of one 256*256 (or 16*4096) texture, I'm trying to use four 1*16 textures. I'm having trouble getting the blending to work.
  7. @TGG Your 4D interpolation sounds like the best solution out of the two, except it will probable take the most to implement so I've tried the other way and I think it could work. However I am also extremely new to OpenGL and am having lots of trouble trying to mix the texture with glTexEnvi calls, the solution's probably obvious to someone who knows what their doing. I've been able to make vanilla lighting work with the two lightmaps (skylight and blocklight, both 1x16 textures) but text stops rendering properly and colours don't work correctly (eg. grass colour, AO, and block shading). I'll keep looking for a solution. Any help would me most welcome! EDIT: I took a quick look into it and 4D textures are not supported like I would have hoped and I think they're currently beyond me. @GotoLink I don't know if I exactly understand what you're suggesting, but Minecraft generates the lighmap once at the beginning of each frame and uses it to render the whole frame. Changing it for each vertex would probably be incredibly laggy and yield unexpected results. Thanks for the suggestion though. Should I start a new topic to ask for help with the OpenGL problem? Or just ask here?
  8. Alright, so I think I've got a good handle on how minecraft does it AO calculations and rendering and there is a problem. When the blending for a block is rendered, each of the four corners of each face are assigned a brightness which is mixed (it is in the form of coordinates that points to somewhere on the lighmap). So, when the face is rendered, each corner is given a texture coordinate that corresponds to a smooth version of this map: (pic from this very helpful blog post http://greyminecraftcoder.blogspot.ca/2013/08/lighting.html, thanks Ghost!) So, when I try to do this with my enlarged lighmap (which is pretty much 256 of these lighmaps tacked together) the texture coordinates cover a very large area of the map and end up looking like this: Not quite sure how to solve this, I tried setting the colour of the blocks but that was really finicky and not a good solution. I am going to look into using multiple light textures and layer them to get good blending. If anyone has any suggestions feel free to post 'em! I'll post again if I have anything worth mentioning.
  9. Nope, this pretty much is incompatible with everything right now. I may be able to make it compatible but there are many problems to fix before I get there.
  10. Update: ITS WORKING Screenshot: Next on the list: Smooth Lighting
  11. Update: Changing scaling to 1/4096 in the EntityRenderer.enableLightmap() function allowed me to change the size of the lightmap to 256 by 256 so I can fit both RGB and skylight values... and it worked! The block light and skylight blended properly and colours also rendered correctly. Now I have to implement the three block light values throughout the rest of minecraft and fix the ao calculations, but so far so good!
  12. Thank you a bunch! I was wondering why the texture coordinates were shifted 4 bits and had not discovered this function. I'll look into it now and see what I can come up with. Once again thanks a lot, I post again if I'm successful or run into any more problems.
  13. Hi, I have been looking into creating a coloured light mod for Minecraft, and the far the best idea I have come up with would be to enlarge the lightmap that minecraft uses to render sky light and block light together. However, to reference a point on the light map Minecraft uses a short coordinate value so light values (0-15) can be mapped directly to the texture. The problem I am having is when I try to reference a point in a larger lightmap (say 32 by 32 or 4096 by 16) the coordinates simply do not map correctly and ever Google search I have done says shorts (16-bit integers) cannot be uses in the function minecraft uses to set texture coordinates (glTexCoordPointer) but minecraft obviously does use it. I just don't get it. I simply want to be able to use a larger lighmap. If anyone want to see what I'm talking about in the minecraft source (MCP or forge), look up the Tessellator object and draw() in it. If anyone has an explanation on how this function works with shorts or a helpful link please post.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.