• Sky
  • Blueberry
  • Slate
  • Blackcurrant
  • Watermelon
  • Strawberry
  • Orange
  • Banana
  • Apple
  • Emerald
  • Chocolate
  • Charcoal
Welcome to OpenComputers

Register now to gain access to all of our features. Once registered and logged in, you will be able to contribute to this site by submitting your own content or replying to existing content. You'll be able to customize your profile, receive reputation points as a reward for submitting content, while also communicating with other members via your own private inbox, plus much more!

This message will be removed once you have signed in.

  • Announcements

    • Lizzy Trickster

      Latest Stable OpenComputers Version   11/26/16

      The latest released version of OpenComputers is version 1.6.1 for MC 1.7.10, 1.8.9, 1.9.4 & 1.10.2. See more information here! Beta/Dev builds can be found at the Jenkins Build Server (ci.cil.li)
DarkPikachu

[1.10.2] [WIP] OC Hard Light

4 posts in this topic

NOTE: I'm new to java, but have been working in Python building a model converter for quite a while.

so I'm starting on the latest version of minecraft so I'll have something decent by the time enough decent mods have been ported to the version.
(basically working my way into the modding community)
so don't expect to see this mod released for a while.

feel free to jump in and lend any info you may have to help me make this better :)

Minecraft is a game about creativity, so why not extend it with something purely creative. ;)

This mod will add the ability to manipulate "physical" light through the use of the OC computer.
The inspiration and idea for this mod came from both the OpenGlasses mod (being able to program virtual holograms), and the concept of Hard Light.
(credit to Loggren aka RickyTheVoice for being the first to inform me about the concept on my forum.)

Hard Light is a concept by which holograms can physically interact with you, whether it be:
- standing on a floating "magical" platform
- protecting your base from intruders with a force-field
- cloaking your base (this would actually be less CPU-tasking than a massive area of sky-blocks)
- defining entities in the world (mobs or pets)
- programming tools weapons or magical abilities

Sources:
http://reddwarf.wikia.com/wiki/Hologram
https://www.filterbypass.me/s.php?k=http%3A%2F%2Fwww.halopedia.org%2FHard_light&b=4&f=norefer
http://theportalwiki.com/wiki/Hard_Light_Bridge

a bit far-fetched here, but:
http://overwatch.gamepedia.com/Hard-light

Now yes, because it's Hard Light, aside from getting in your way and/or supporting you, it'll also be able to break blocks and/or hurt you...
So to add some grief-control, I'll be adding area definitions to the LUA-API, to secure blocks that hard light will simply "pass through".
(This means other players won't be able to mine your blocks with hard-light tools)
^ I will also try to integrate into current grief-prevention systems, so you can use factions or claims to do this for you ;)

The light casted is also controlled via the LUA-API (see the next post below for format descriptions).

Like a real GPU, the projector will act as a server for storing model data (as arrays) when supplied with RAM.
And like modern 3D engines, The LUA-API will allow you to control the data uploaded to the projector.
This basically means you can upload say, a vertex array, and then modify it through your program's run-loop.

@TheMightyPirates: (regarding an earlier issue) yes this means I'm providing a sandboxed interface, I'm experienced with this thanks to my model converter's scripting interface. ;)

Now, the mod will provide it's own type of RAM which will be significantly larger and faster than the RAM provided by OC.
Note that crafting RAM is not meant to be cheap, with a recipe similar to OC's T3.5 RAM, for a base craft of 2MB in size.
2MB will typically be all you'll need for pretty much anything... (the Wii's embedded GPU-RAM is 3MB to give you an idea)
Any higher amounts of RAM are crafted from an X2 recipe (like OC Lights) up to 256MB maxed for those who want to build complete virtual worlds with alot of GFX.
(go crazy with your creative skillz, just be careful to consider other people who'll see your stuff, they may not have the hardware power you have)

I will try to automate available GPU-RAM detection, which should allow you to define whatever you want w/o hurting anyone else.
if the end-user's GPU-RAM is full, the data will simply not be displayed...
Note that distance, clipping, and render-priority plays a part in the data uploaded to the actual GPU, so really this shouldn't be a problem :)

Aside from RAM, each projector will also have a default range before the light "weakens" or fades out (unless given the Ender upgrade),
so range upgrades (crafted in the same way as RAM, though limitless) will allow you to extend your projection range, simply adding the multiple to the default range until maxed.
The more upgrade power you have, the less power you'll use at a closer range, and the farther you'll be able to project hard light.
(this also affects tools which will show a faded version in your inv when you're out of range or don't have enough power to use)

Power usage affection at max distance is default_power + ( upgrade_power * .25 ) which actually cuts power usage at the default distance.

Now with the Ender upgrade, projecting long distances will need to use extreme amounts of power (WIP), where installing range upgrades simply reduces the amount of power used (WIP).
(theoretically though, you should be able to project at any location, as long as you can supply enough power) ;)

Here's a chart listing the tier ranges and RAM limits:

 Tier | max RAM | block-range | color-depth
------+---------+-------------+-------------
  1   |  64MB   |   16 - 384  | bitmap (B/W)
  1.5 |  64MB   |   16 - 384  | grayscale
  2   |  128MB  |   48 - 4096 | 16 color
  2.5 |  128MB  |   48 - 4096 | 256 color
  3   |  256MB  |   64 - ∞    | 16bit RGB5A3
  3.5 |  256MB  |   64 - ∞    | true-color
  4(C)|    ∞    | ∞ + upgrade | true-color

yes, T4 is actually creative, meaning no limits on anything (including power) (unlike OC's cases)

Progress Log:

 

- finally got MC 1.10 working (installation does not tell you to increase the JVM memory when running gradle)

unknown.png

- acquired marcin212's permission to use and rehaul his OpenGlasses source

(I'm not a leech, I promise, but I gotta learn and start from somewhere)

- restructuring the source (refactoring my namespace and mod-id names)

(I'll start the real work after this test works)

- my very first compiled project (of everything) that works (let a noob enjoy his hype) =D

first_test.png

so I've renamed the base structure classes to fit my base structure and gave it a test (forgot to rename the asset locations)

now the real mod-work can begin, and I'll be losing net soon, so I won't be posting an update for a good while (after September at least)

Posting off cruddy phones...

playing around with the GL-FFP to get a feel of java and all, but am making progress toward a mesh renderer.

OCHL_progress.png

ignore the stupid block texture, I intend to replace that with a real model, like what mekanism does.

One thing I can't seem to completely figure out though is minecraft's collision code.

Boxes don't collide well with triangles.

So I'm looking into modifying minecraft's Entity class, replacing the default collision functions with my own.

Could use a few pointers though about what to avoid since I don't know much about minecraft's source...

so I've modified the widget class to inherit from the Entity class, and everything broke.

so here's what I've currently got:

unknown.png

that error doesn't crash the client, but trying to add the triangles kicks me off the local server.

I'm probably doing something insanely stupid without realizing it...

EDIT: should've also mentioned I have no internet at home...

I do have a bunch of sources from various mods though which I'm using for examples.

Remember: If you have any ideas for this, feel free to post here or PM me.

Notes and plans:

- [removed] custom player models will require a separate mod (you can't cloak yourself as a mouse and expect to fit in a mouse-hole)

- [removed] world casting can be done via a void world with RFTools or MystCraft and the like (otherwize things would clash)

- [planned] basic and ender projector upgrades (limited with 64MB RAM and a 48, 96, or 128 block range with half the power use)

Share this post


Link to post
Share on other sites

This post is dedicated to describing the format of the data to be uploaded to the projector.
This data follows modern OpenGL array standards (to the best that LUA can provide).

A simple model loader will be included as modelLoader.lua to load structured lua files.

TODO: describe the structured lua format handled by the included modelLoader.lua and the LUA API itself

Share this post


Link to post
Share on other sites

Sorry for no response after a long time, and to be the bearer of bad news...
I've been more focused on my other projects, mainly getting UMC released...
I put this project on hold when I realized I needed to rebuild the mod with my own engine, kinda like Custom Steve does.

Anyways, I'll get back to the project when I have some free time, and possibly even an export script for my format for UMC :)

EDIT:
I do mean that too, I want this project too much...
So to just up and let it die isn't something you can expect to happen ;)

I'm just stocked with projects, and need an organization plan to manage my autistic ways... lol

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now