Commit Graph

29 Commits

Author SHA1 Message Date
RainWarrior 70670d70ea Removed generics from IModel subinterfaces, add ed ModelProcessingHelper instead. 2016-03-06 01:34:04 +03:00
RainWarrior cb909eeb59 Fixed B3D loader, fixed some obvious errors in ModelLoader. 2016-03-05 05:02:34 +03:00
RainWarrior 728319cbb5 Fixed most errors in the model stuff, except for ModelLoader and b3d and obj getQuads/handleBlockState methods. 2016-03-01 23:19:38 +03:00
RainWarrior 085b28ba35 Revert binary-incompatible changes in models. 2016-02-04 13:34:40 +03:00
RainWarrior 3bdc75ad49 Added "gui3d" and "smooth_lighting" options to the forge blockstate. Implemented them for vanilla and B3D models. Added generic types to IModel subinterfaces, to simplify chaining. 2016-02-02 12:23:26 +03:00
RainWarrior 0710bdf3f5 Model animation system.
Main things of interest:
  * IAnimationStateMachine - state machine for animations; can load
    from json.
  * AnimationTESR - automatic TESR for animated models.
  * AnimationModelBase - same for entities.
  * ITimeValue - time-varying value, used to control animation
    parameters from code.

  * TESRs can now be batched - look at TESR.renderTileEntityFast +
    TE.hasFastRenderer.
  * RegionRenderCache is not accessible to TESRs and other client-side
    logic - MinecraftForgeClient.getRegionRenderCache.
2016-01-24 09:59:38 +03:00
RainWarrior 56eba05237 1.8.9 update 2015-12-30 07:15:03 +03:00
RainWarrior 86c09722a0 IModel can now depend on a variant definition (ModelResourceLocation); added MultiLayerModel - simple model that'll render correctly in multiple layers + example of using it. 2015-12-15 21:49:19 +03:00
RainWarrior d6ee373e87 Preparations for the Animation system.
Changes to the Model API - IModelState now works with Optional. Handling of parts of the model is not optional, and coordinate space/result interpretation is up to the caller. IModel doesn't extend IModelPart by default anymore; MapModelState uses composition to achieve previous functionality, IModelPart implementations are disjoint now. Updated perspective handing to the new API, removed IPerspectiveState (MapModelState is now the same thing). Perspective transforms for the default fluid model.
2015-12-14 23:27:27 +03:00
RainWarrior 724405d6d8 Workaround for https://github.com/google/guava/issues/738 2015-12-09 14:56:01 +03:00
LexManos 5549b06f96 Compiler warnings pass, undeprecated SplashProgress related stuff. 2015-11-26 19:38:21 -08:00
RainWarrior 07ccf667e4 B3D loader: removed 2 redundand null checks, changed constructor args to final to fix (java6?) inner arg error. 2015-11-19 23:40:44 +03:00
RainWarrior 13d7530e43 Implemented interpolation of TRSR transformations; B3D: added interpolation capabilities to B3DState, animated TESR example in ModelAnimationTest (pure TESR right now, no separation inside the example model between the static and dynamic parts right now). 2015-11-16 06:51:39 +03:00
RainWarrior 12e6fe9db7 OBJ loader: fixed another whitespace-related issue; removed unused "modifyUVs" property for now; added the "flip-v" property to switch between OpenGL-style and DirextX-style model UVs; fixed normals - they are now correct in-world, still a bit strange for the items; fixed normals a little bit for B3D models too. 2015-10-29 22:50:45 +03:00
shadekiller666 d1b220f6a3 Added OBJ loader for the ModelLoaderRegistry system. 2015-10-26 19:38:49 +03:00
RainWarrior dd365d7220 Model pipeline system.
Should replace all ad-hoc quad generation methods in forge, and make IBakedModel -> WorldRenderer data transfer faster. Added IVertexConsumer + helper classes; lighting that works correctly for non-axis-aligned faces using the new infrastructure. Changed smooth lighting algorithm, now it should work correctly for everything.
New block lighter can be disabled in the forge config options.
2015-10-26 19:25:48 +03:00
RainWarrior e280f72cfb '#' is now added automatically to the beginning of the texture names in B3D models, and the remapping is expected via the blockstate JSON, since it's more reasonable than adding it to the file name in the modelling program or matching the resource location with the filename. 2015-10-03 04:42:35 +03:00
RainWarrior c4f370a7e6 Custom transformations in forge blockstate json. 2015-06-30 21:37:11 +03:00
RainWarrior 07038f8342 Added fluid renderer. 2015-06-18 14:26:53 +03:00
xxmicloxx b45c90ceb8 Bugfix for B3DLoader 2015-06-17 19:48:51 +02:00
Lex Manos e94288bbb1 Fixup model loading errors not being printed by making ICustomModelLoader.loadModel propogate IOExceptions as needed. 2015-06-16 16:03:10 -07:00
RainWarrior d6bc936ffa B3D Improvements
- fixed keyframe transformation application
 - textures are now resolved the same way as in vanilla models
 - added the ability to use forge blockstate texture information
 - removed unused code from the B3D example
2015-06-04 18:58:42 +03:00
RainWarrior b14cfa45e5 RenderItem can now use baked quad color 2015-02-17 05:02:16 +03:00
RainWarrior 93cd9722b0 Added a default white texture; Fixed B3DLoader crashing when the brush has empty texture specified 2015-02-17 05:02:16 +03:00
RainWarrior d741b1bafc Attributes.put (de)normalization now works as intended 2015-02-16 03:53:33 +03:00
RainWarrior 5616d0c1b0 ModelRotation.getMatrix() now returns the correct matrix; fixed the application of custom transformations to vanilla models; fixed application of transformations to B3D models; fixed the culling of rotated vanilla models 2015-02-14 04:44:41 +03:00
RainWarrior 9e90febd37 fixed NPE during loading of B3D models without textures/brushes.
changed default B3D color to have full opacity.
2015-02-08 15:50:35 +03:00
RainWarrior ab39b7e4e0 Removed leftover debug messages 2015-01-30 03:14:12 +03:00
RainWarrior 6eba0ebb93 Added model loader registry
Entry point: ModelLoaderRegistry
loader interface: ICustomModelLoader
custom model: IModel

ModelLoader is responsible for splicing into vanilla model system.
(you probably don't need to use it directly)

Interop with vanilla models isn't great yet
(vanilla models can't refer to custom ones as parents), will improve in
the future.

Includes loader for B3D models, with animation support
(net.minecraftforge.client.model.b3d).
Blender export plugin with compatible coordinate system:
https://github.com/RainWarrior/B3DExport

OBJ loader is being written, will be included at some point in the
future. For now you can convert OBJ to B3D via blender, or wait.
2015-01-29 11:33:52 +03:00