HELP

Whatever you want to talk :)

Moderators: osRose dev team, ospRose dev team, osiRose dev team, Moderators

Forum rules
You can talk about just whatever you want here.

HELP

Postby AnimalCrackerz on Sun Mar 19, 2017 4:35 am

Tool request....(old time developers!)

OK, So as we all see, the only thing missing from this Ghost Town of a Forum is the random tumbleweed passing by....but if your a long time dev, Then you still Troll these forums to see if anything new is happening....So yeah besides the wanna be Item/Donater server *entrepreneur* screaming for Arcturus Files or Help setting the server up there is very little going on here.....So Shout OUT to old Devs that are still hording great TOOLS even the few random illicit "OFFICIAL" tools...Would you, Could you? Share some of these tools with me..DEV's Bratok? Arua? Speed? Ruff? Titan? Za? DEV guys pass some of your tools on to me Please! Searching for .LIT text editor? and anything you guys would like to share...even conversation of old times! wgcosola@hotmail.com SKYPE me

https://www.youtube.com/embed/kTKNdrQLhu4

https://www.youtube.com/embed/VeDRBLj0b40

https://www.youtube.com/embed/xc0FHAe00HE

Dont work at this server anymore >.< Item adding mostly >.< Video is 5 years old..if you can suffer thru the web page intro..pretty cool stoofs https://youtu.be/2HRxGsstni8

Ultimate goal for me is to make Total custom modded Client
So Please Share your Tools? !! AnimalCrackerz or wgcosola@hotmail.com on Skype

Working on Custom Maps...figured out everything minus saving a uncorrupted .LIT file. Have the pTools and figured out how to use them..editing .LIT in notepad++ and making build file with pTools...notepad++ saves file improperly so stuck for now...
AnimalCrackerz
Pomic
Pomic
 
Posts: 102
Joined: Tue Apr 20, 2010 1:58 pm

Re: HELP

Postby lazypenguin on Mon Mar 20, 2017 3:38 am

OK, So as we all see, the only thing missing from this Ghost Town of a Forum is the random tumbleweed passing by

*chuckle*

I'm not one of the "old devs" you referred to but I have some free time come up and have been planning on putting together some new tools. I can take a look at putting together a simple LIT editor. I don't do much client editing, what is the state of tooling overall right now?
lazypenguin
Pomic
Pomic
 
Posts: 78
Joined: Mon Aug 10, 2009 6:51 am

Re: HELP

Postby AnimalCrackerz on Mon Mar 20, 2017 9:37 am

Well like most, probably have all the same tools from "Shido's" tool repository,https://mega.nz/#F!5MVmBLhT!tUDbIRkWUtswajjDruZ-uQ As of now I am writing the .LIT file in notepad++ and it won't save properly. When I edit it and save it won't read in the map editor or show the object lighting on the models. To make certain I took an existing working .LIT file .. edited and saved without any significant change...and again the file fails to read properly in the map editor. Map editor gives fail to read file error. I was given the suggestion to read the file in .lua language in the Editor but that's not right. It's written all in non printable control characters either Ansi or Ascii, not much difference in the programming language on top, so the issue I have is saving in the correct format for the extension I believe. I have the updated pTools that are out and passed around and use the MakeLightInformation.exe which essentially rewrites the .lit file I have edited in notepad++ But I get an input string error not sure but I think I was saving the file in the wrong format. If you would like to skype and share screens I could show you much easier than trying to explain here. Not so much a programmer to explain what exactly is happening.
AnimalCrackerz
Pomic
Pomic
 
Posts: 102
Joined: Tue Apr 20, 2010 1:58 pm

Re: HELP

Postby lazypenguin on Tue Mar 21, 2017 12:30 am

Try this out, it'll convert a LIT file to JSON and then you can convert it back.
Attachments
litter-v1-linux-x86_64.zip
(1.38 MiB) Downloaded 733 times
litter-v1-windows-x86_64.zip
(457.08 KiB) Downloaded 734 times
lazypenguin
Pomic
Pomic
 
Posts: 78
Joined: Mon Aug 10, 2009 6:51 am

Re: HELP

Postby AnimalCrackerz on Tue Mar 21, 2017 6:03 am

Not sure how to use it...opens then closes right away.. Tried to use the windows version...but didnt open correctly
AnimalCrackerz
Pomic
Pomic
 
Posts: 102
Joined: Tue Apr 20, 2010 1:58 pm

Re: HELP

Postby lazypenguin on Tue Mar 21, 2017 2:03 pm

Yes, sorry should have included some more instructions :).

The program is a command-line application so you'll need to run it from either Command Prompt or Powershell. If you are on Windows 7/10 you can press Windows Key + R and then type `cmd.exe` to bring up command prompt.

What I would do is copy the litter.exe to the directory where you have your .LIT files as it will make everything easy. Then, in the command prompt you'll need to "change directory" to where the exe and lit files are. So you would type, for example, `cd "C:\Users\animalcrackerz\myrosestuff\mylitfolder"`. You can then run the program by typing `./litter.exe`.

The program takes two subcommands: encode and decode. Decode will take a LIT file and convert it to a JSON text file. You can then edit the JSON text file in Notepad++ however you like. You would then use the program to convert the JSON file back to LIT. The reason we have to do this is that the LIT file is a binary and you cannot directly edit it using a text editor. So we must first convert it to text to edit and then convert it back to a LIT file. Here is an example assuming your files and litter.exe are in C:\rose\lit :

# Run cmd.exe (WIN+R -> cmd.exe)
cd C:\rose\lit
litter.exe -o . decode OBJECTLIGHTMAPDATA.LIT
# Now there should be an OBJECTLIGHTMAPDATA.json in your directory that
# you can edit in Notepad++
litter.exe encode OBJECTLIGHTMAPDATA.json
# Now there should be a new directory `out/` that contains your new, edited OBJECTLIGHTMAPDATA.lit


Maybe this gif will help :-)

Image
Attachments
demo.gif
lazypenguin
Pomic
Pomic
 
Posts: 78
Joined: Mon Aug 10, 2009 6:51 am

Re: HELP

Postby AnimalCrackerz on Sat Dec 02, 2017 4:50 am

Well it's been a few month's and I have just recently tried again to make my own map! With a little success. The ground lighting is no problem now. Still having issues figuring out the .lit file. I use the converter LazyPenguin provided here. TYVM! But now I need help deciphering what each entry does.


I got the light map to work on one of the statues
Image

you can tell better during night cycle
Image
Image
AnimalCrackerz
Pomic
Pomic
 
Posts: 102
Joined: Tue Apr 20, 2010 1:58 pm

Re: HELP

Postby AnimalCrackerz on Sat Dec 02, 2017 4:59 am

What I need help deciphering are these entries..does any know anything about them?


Image
AnimalCrackerz
Pomic
Pomic
 
Posts: 102
Joined: Tue Apr 20, 2010 1:58 pm

Re: HELP

Postby lazypenguin on Sat Dec 02, 2017 9:52 pm

Please delete :)
Last edited by lazypenguin on Sat Dec 02, 2017 10:26 pm, edited 1 time in total.
lazypenguin
Pomic
Pomic
 
Posts: 78
Joined: Mon Aug 10, 2009 6:51 am

Re: HELP

Postby lazypenguin on Sat Dec 02, 2017 10:26 pm

Here is what I have been able to gather:

  • lightmap_index - Index into one of the textures listed at the end of the .LIT file. Used as the 2nd texture in shader.
  • pixels_per_part - Don't know, probably related to resolution of lightmap texture but who knows
  • parts_per_width - Used in uniform calculation for lightmap shader (see below)
  • part_position - Used in uniform calculation for lightmap shader ( see below)

I haven't spent too much time with lightmaps and ROSE materials/lighting so I don't actually know what a "part" is in the context of a lightmap. Here is some pseudocode of what happens in the client as far as I understand it:

Uniform calculations
  1.  
  2. // ...
  3. //The uniforms for vertex shader are calculated as such
  4. scale = 1 / parts_per_width;
  5. row = math.floor(part_position/ parts_per_width);
  6. col = part_position % parts_per_width;
  7. // ...
  8. // Shader uniform values:
  9. uv1 = texture
  10. uv2 = lightmap_texture
  11. lightmap_offset = Vector2(col*scale, row*scale)
  12. lightmap_scale = Vector2(scale, scale)
  13. // ...
  14.  


Vertex Shader
  1.  
  2. uniform lightmap_scale;
  3. uniform lightmap_offset;
  4. varying vec2 vuv2;
  5.  
  6. void main() {
  7.     // ....
  8.     // This line is used to calculate uv2 in vertex shader
  9.     vuv2 = uv2 * lightmap_scale+ lightmap_offset;
  10.     //...
  11.  
lazypenguin
Pomic
Pomic
 
Posts: 78
Joined: Mon Aug 10, 2009 6:51 am

Next

Return to Whatever

Who is online

Users browsing this forum: No registered users and 10 guests