(Future) custom objects and built-in textures

    • (Future) custom objects and built-in textures

      This is partly a question and partly a suggestion.

      1) Question: Extracting and using the RW built-in textures to texture custom objects for RW would be considered a copyright infringement? The use case is to ensure a good blending of custom objects usable as new block shapes with built-in blocks (as an example, a column section or a capital used together with regular blocks).

      2) Suggestion: It would probably be useful to have a way to access the built-in textures directly (i.e. without extracting and duplicating them); this would reduce memory usage for textures (whichever type of memory) and ensure a good match with surrounding blocks (UV mapping would be a little tricky, but I believe it would be worth the effort).

      3) Suggestion bis: in the future it would be great to have a way to parametrise the texture used by a custom object, so that the same mesh could be textured at will with any of the textures available in-game at build time rather than at modelling time.

      Thanks!
      __________
      My plug-ins: Planks 'n Beams, GPS, UPS, Weather control, Plugin Central, RWGui (GUI back-end), Bank (Money back end)
    • Miwarre schrieb:

      Extracting and using the RW built-in textures to texture custom objects for RW would be considered a copyright infringement?
      Basically you can extract the textures and use them for plugins or mods for Rising World, however, if you use them for something else (another game or anything that's not related to RW) it might be problematic.

      Miwarre schrieb:

      It would probably be useful to have a way to access the built-in textures directly
      Yes, that's on our list :)

      Miwarre schrieb:

      in the future it would be great to have a way to parametrise the texture used by a custom object, so that the same mesh could be textured at will with any of the textures available in-game at build time rather than at modelling time.
      That's already the way how the plugin API is going to handle custom models: The texture is independent of the model (with the exception of uv coordinates of course). When loading a model, you have to assign an "image" object to it (which points to a file on your harddrive, or in the future alternatively to an existing RW texture [as mentioned above]). This image object can be assigned to multiple models of course, and may also be used for other things (e.g. to display an image on the gui) ;)
    • Thanks for the reply.

      red51 schrieb:

      Basically you can extract the textures and use them for plugins or mods for Rising World,
      Great! This is less strict than many licensing models!

      red51 schrieb:

      however, if you use them for something else (another game or anything that's not related to RW) it might be problematic.
      Of course! Fair enough.

      red51 schrieb:

      Miwarre schrieb:

      It would probably be useful to have a way to access the built-in textures directly
      Yes, that's on our list :)
      8o Super!

      red51 schrieb:

      That's already the way how the plugin API is going to handle custom models: The texture is independent of the model (with the exception of uv coordinates of course). When loading a model, you have to assign an "image" object to it (which points to a file on your harddrive, or in the future alternatively to an existing RW texture [as mentioned above]). This image object can be assigned to multiple models of course, and may also be used for other things (e.g. to display an image on the gui) ;)
      Very well thought. You are spoiling us!
      __________
      My plug-ins: Planks 'n Beams, GPS, UPS, Weather control, Plugin Central, RWGui (GUI back-end), Bank (Money back end)
    • Carm3D schrieb:

      Hello,

      I just purchased this game. I am reading about this plugin to add custom objects. I am a 3D artist but I know next to nothing about programming. How does one go about adding custom objects?
      Hi Carm3D. According to the new API spec it looks like custom 3d models will not be craftable or spawnable like conventional in-game objects (some Inventory system changes have to happen before that is possible). However, a small mod can be written to to place anything you have modeled. I guess if you don't know much about programming then just stick around here, show off some of your work, and I'm sure plenty of us coders will want to work with you :)
    • Carm3D schrieb:

      So I can only bring in props / statues.. Ah well. It might still be fun to experiment with. The carmnivorous plant was camera-matched and composited over the video. Thank you for the kind words. :)
      The API was just published last week and it still isn't implemented in game so this is still all very new. I'm sure more features will come to support more advanced models. We have new character models coming up to replace the old potato head version. ;-p I and others are hoping we will have the ability to attach custom body parts to whatever the new model is.

      Regarding props and statues, we are in need of new statues. There's only one in game right now. Some new ones are planned but the dev team is small so only so much can be done at at time. With the API out atleast we can finally start adding better models. At present the more creative players of this game have to piece together complex objects using small blocks (for example, check out this video at 10 minutes even to see what I mean: )

      BTW, welcome to forums. We have a great community here with lots of support and low drama. There will be plenty of kind words. We don't take kindly to toxicity around here ^^
    • Carm3D schrieb:

      I don't know if you are referring to the camel objects or the treasury. I hope I don't have to limit myself to working with small blocks. I would prefer to use more traditional models with a UV-mapped texture.
      Making the camel out of tiny blocks is just a good example of what people have been doing to work around the system until we can import actual mesh models. But yes, the new API will allow you to import an obj file and place it anywhere in the world. Since they can't be crafted, a programmer has to set up the mod to make the object placeable by a keyboard command or something similar.
    • Carm3D schrieb:

      How does one go about adding custom objects?
      It would be necessary to create a small plugin which loads the model. A simple plugin which creates a custom model at a certain position could look like this (note: currently this code would throw errors, but there will be a minor update for the api in a few hours):

      Java-Quellcode

      1. package <yourpackage>;
      2. import java.io.IOException;
      3. import net.risingworld.api.Plugin;
      4. import net.risingworld.api.events.EventMethod;
      5. import net.risingworld.api.events.Listener;
      6. import net.risingworld.api.events.player.PlayerSpawnEvent;
      7. import net.risingworld.api.objects.Player;
      8. import net.risingworld.api.utils.ImageInformation;
      9. import net.risingworld.api.utils.ModelInformation;
      10. import net.risingworld.api.worldelements.World3DModel;
      11. public class LoadModel extends Plugin implements Listener{
      12. //this object holds the information about the model
      13. private ModelInformation modelInfo;
      14. //this object holds the texture of the model
      15. private ImageInformation texture;
      16. //this is the actual model which will be placed in the world
      17. private World3DModel model;
      18. @Override
      19. public void onEnable(){
      20. //register this plugin as event listener, so it listens
      21. //for the "PlayerSpawnEvent" (see below)
      22. Plugin.registerEventListener(this);
      23. //the next statements need to be surrounded by a try-catch-block,
      24. //since the model loading may throw an io exception (file not found etc)
      25. try{
      26. //load your model from a path on your harddrive
      27. modelInfo = new ModelInformation("...somepath/models/myModel.obj");
      28. //load the texture from your harddrive, dds format is most preferable
      29. texture = new ImageInformation("...somepath/models/myModel_texture.dds");
      30. //create the actual 3d model object
      31. model = new World3DModel(modelInfo, texture);
      32. //set the world position of the 3d model, in this
      33. //case we place it at 0 50 0 (x y z)
      34. model.setPosition(0, 50, 0);
      35. }
      36. catch(IOException e){
      37. //this is executed if the model was not found,
      38. //or if the harddrive could not be accessed etc.
      39. //Do some error handling here, in this example,
      40. //we simply print the stack trace
      41. e.printStackTrace();
      42. }
      43. }
      44. @Override
      45. public void onDisable(){
      46. //...
      47. }
      48. //this event is triggered when a player spawns for
      49. //the first time after connecting
      50. @EventMethod
      51. public void onPlayerSpawn(PlayerSpawnEvent event){
      52. //this is the player we're talking about
      53. //(the one who triggered the event)
      54. Player player = event.getPlayer();
      55. //attach the model to the players game world
      56. player.addWorldElement(model);
      57. }
      58. }
      Alles anzeigen

      Of course this is only a basic example. One could create much more powerful plugins, e.g. a plugin which allows the player to place the model in the world (after typing a command or pressing some keys or whatever) ^^

      Carm3D schrieb:

      I hope I don't have to limit myself to working with small blocks. I would prefer to use more traditional models with a UV-mapped texture.
      Hehe, of course not ^^ Actually creating a model with a proper uv mapped texture is definitely the best approach.

      By the way, your videos are awesome! :thumbup:
    • Ok, I re-watched the plant video. For some reason I wasn't getting sound and I didn't watch the whole thing so I missed what happened in the end! O_o That would be something interesting to add to a mod if the author of the model would allow it. Given that grass is so tall in Rising World, i can see those being a danger. Just simply spawn them at random locations on the ground, and progam in a attack radius. Buffs and debuggs aren't really implemented much in the game yet except you can break bones if you fall too far. If we have access in the API to apply a screen filter then one could be blinded or poisoned by such a plant. I'm thinking of how in Ark Survival the dilophasaurus will spit at you, temporarily blinding you.

      Is this possible Red? I know there's some gui element options now in the New API but I figured that was for making small additions to the UI. I'm thinking about a filter applied to the main viewing area (actual rendered 3d content, seperate from the UI).
    • zfoxfire schrieb:

      If we have access in the API to apply a screen filter then one could be blinded or poisoned by such a plant
      Basically you can indeed achieve this by using gui elements. You could create a colored panel which has the same size as the screen. By changing the alpha value you can also have transparency etc ;)

      zfoxfire schrieb:

      I'm thinking about a filter applied to the main viewing area (actual rendered 3d content, seperate from the UI)
      Maybe it's worth to consider adding access to various filter effects... but I guess that's something for the long run^^

      Carm3D schrieb:

      I think what I would have to do is make a test model and send it to someone as an .obj or something and then they can walk me though how I would implement it... if that works I would make something more elaborate.
      If you have a model ready just let us know, creating a small plugin which loads custom models isn't a big deal ^^ Basically even the small example above should work (of course pathes etc. need to be adjusted).
    • Hi red,

      I thought the animations supported now were limited to basic scale, rotate, and translate. The kind of animations shown by the bug eating plant would require support for bones and complex animations. I thought that wasnt supported yet. But I do admit I know nothing about bones.

      Btw, I read the API again since the recent update and nothing is really standing out to me for getting the screen size. That seems important to know before you can set a gui elemet with its size and position specified. And is the position coordinate at top left or bottom right of the gui? This is not documented.
    • zfoxfire schrieb:

      I thought the animations supported now were limited to basic scale, rotate, and translate. The kind of animations shown by the bug eating plant would require support for bones and complex animations. I thought that wasnt supported yet. But I do admit I know nothing about bones.
      Sorry if one of my previous posts gave this impression. Animations are not supported at the moment, and I guess it will take some time until that's finally available. Right now it's as you said, limited to basic transformations (rotate, scale, translate).

      zfoxfire schrieb:

      Btw, I read the API again since the recent update and nothing is really standing out to me for getting the screen size.
      The easiest way is to provide relative coordinates for the gui elements (usually the gui constructors and particular methods have a boolean flag which determines if the provided coordinates are absolute or relative). When providing 1.0f as relative size coordinate for example, it fills the whole screen of the player ;)

      zfoxfire schrieb:

      And is the position coordinate at top left or bottom right of the gui? This is not documented.
      It depends on the PivotPosition, by default this is set to "BottomLeft", so it's usually the bottom left. But if you change the pivot to the "Center", for example, the center of the gui element is used instead. I see the documentation doesn't say much about that, this will be changed //edit: the javadoc has been updated, the setPosition() and setPivot() methods provide proper descriptions and an example now :)

      Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von red51 ()