August 9, 20169 yr Author I need to use event.getMap().loadTexture(); during TextureStitchEvent.Pre to load the texture, right? Does this mean I have to make my own IResourceManager? Edit: its e.getMap().registerSprite
August 9, 20169 yr Author I think you mean builtin/generated or item/generated . builtin/generated is the base 2D-style model, item/generated extends this and defines the standard display transformations. Most basic item models extend item/generated . item/handheld extends item/generated and redefines the first/third-person display transformations to change how the item renders when held by an entity. Vanilla tool models extend this. I only need it for GUIs. I guess both works in that case
August 9, 20169 yr Author I tried to do something similar but it started to become too "hackey" It is indeed annoying. I have to rewrite half of the mod (probably more) that I'm trying to update. But at least that means it will be done properly this time...
August 10, 20169 yr On obj: I tried this the other week, to display a triangular prism (block cut in half diagonally) and I could not specify UV coordinates such that the triangular face displayed the way I wanted (that is, not distorted). Heck, the example on the Read the Docs (is that where I saw it?) had a standard obj file shown with all the vt lines commented out! Both of my attempts to leave them in resulted in parsing errors. Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable. If you think this is the case, JUST REPORT ME. Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice. Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked. DO NOT PM ME WITH PROBLEMS. No help will be given.
August 10, 20169 yr Author My main/final model consists out of multiple ModelParts that I load from .obj files. How do I join them into one Model? Should I just return the Quads of all sub-models in the getQuads() method of my baked main model? Also, what does the bakedTextureGetter have to look like when I bake my OBJModels?
August 10, 20169 yr Author Ok. The problem is that I have multiple skins (paintjobs) for models. Is it possible that I just change the OBJModel.Parser::materialLibrary before I call parse() and thereby create Models for each skin-variant?
August 10, 20169 yr Author In what format does the mtllib entry in the .obj file have to be? I Tried the example from http://paulbourke.net/dataformats/obj/minobj.html but the rendered object just has the "missing" texture (texture is rendered in blender)
August 10, 20169 yr Author These are the only "errors" i get [13:46:36] [Client thread/INFO] [FML]: OBJModel: A color has already been defined for material 'material0' in 'flansmod:models/item/test1/capsule.mtl'. The color defined by key 'Ks' will not be applied! [13:46:36] [Client thread/INFO] [FML]: OBJLoader.MaterialLibrary: key 'illum' (model: 'flansmod:models/item/test1/capsule.mtl') is not currently supported, skipping [13:46:36] [Client thread/INFO] [FML]: OBJLoader.MaterialLibrary: key 'Ns' (model: 'flansmod:models/item/test1/capsule.mtl') is not currently supported, skipping
August 10, 20169 yr Author newmtl material0 Ka 1.000000 1.000000 1.000000 Kd 1.000000 1.000000 1.000000 Ks 0.000000 0.000000 0.000000 Tr 1.000000 illum 1 Ns 0.000000 map_Kd capsule0.jpg Maybe I have to refer to the mtllib and the jpg in the mtllib like a ResourceLocation? Currently they are all in the same directory
August 10, 20169 yr The OBJ loader does not support UV coords outside of [0..1], for obvious reasons. Texture wrapping cannot be supported, since the textures are all stitched onto the main texture sheet. The UVs I wanted were all 0 or 1. The problem was that I wanted to use: 0,0 0,1 1,0 And the default (no UVs specified) was: 0,0 0,1 1,1 Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable. If you think this is the case, JUST REPORT ME. Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice. Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked. DO NOT PM ME WITH PROBLEMS. No help will be given.
August 10, 20169 yr Author In the same directory as the .obj and .mtllib files. I also tried to put it in textures/items/ objModel.getMatLib().getMaterialNames() actually contains the material name so it is being loaded.
August 10, 20169 yr Author I changed the entry in the .mtl file to "map_Kd flansmod:capsule0" and moved the png to textures/ but it's still the same
August 10, 20169 yr Author The debugger says it's contained in the textures Set... Also now I get this error: The following other errors were reported for domain flansmod: ------------------------- Problem: broken aspect ratio and not an animation textures/capsule0.png ================================================== What aspect ratio is a texture allowed to have?
August 10, 20169 yr Author I resized the texture and the error went away. The model has still the missing texture
August 10, 20169 yr Author Oh. It works now The problem was that I baked my OBJModels before the getTextures() method was called. (-> Textures where no avilable during baking) Sorry for not realising this earlier...
August 11, 20169 yr Author I have multiple objects in my wavefront file. Is it possible to get the individual OBJModels?
August 15, 20169 yr Author Ok. So how does the animation system work? Do I have to re-bake my model for every step?
August 15, 20169 yr Author Does that mean I should store the IModel in the BakedModel and then create a new Bakedmodel from that Model everytime?
August 15, 20169 yr Author Ok. But I should still store the animation progress in the IModelState, right? When I re-bake my model with the new state, how should I apply the progress to OBJModels contained in my Model?
August 15, 20169 yr Indeed. BakedQuad is immutable. Well, it's not really, since Java does not have immutable arrays, but... don't change it. Ostensibly even if it did, you could probably still change it. http://codegolf.stackexchange.com/a/28818 Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable. If you think this is the case, JUST REPORT ME. Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice. Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked. DO NOT PM ME WITH PROBLEMS. No help will be given.
August 15, 20169 yr Ostensibly even if it did, you could probably still change it. http://codegolf.stackexchange.com/a/28818 Stuff like this is going away in Java 9. That's probably a good thing, but it still amuses me. This is my most favorite question, I think: http://codegolf.stackexchange.com/questions/61115/make-your-language-unusable The Java solution "redirects stdin and stdout to null streams and replaces args with an empty array. Also uses enormous amounts of reflection hacks to make sure the standard IO is truly hidden. Finally, it sets a security manager to make sure the standard IO can't be recreated and that makes sure programs can't set the exit code." Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable. If you think this is the case, JUST REPORT ME. Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice. Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked. DO NOT PM ME WITH PROBLEMS. No help will be given.
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.