Alpha Centauri 2

Sid Meier's Alpha Centauri & Alien Crossfire => Modding => Topic started by: Ford_Prefect on March 23, 2014, 10:01:21 PM

Title: CVR Editor v1 (4/2/2014) is now available.
Post by: Ford_Prefect on March 23, 2014, 10:01:21 PM
Screenshot:
(https://sites.google.com/site/jordanprogramming/home/cvrColorizer.png)

Download (http://alphacentauri2.info/index.php?action=downloads;sa=view;down=162)

Changelog:
Version 1:
* Multi-part objects load correctly.
* Save (Ctrl s) has been added.
* Undo (Ctrl z) has been added.  You can undo the last 100 changes.
(click to show/hide)

Notes:
Known bugs:

 Caviar (.cvr) specification. (http://alphacentauri2.info/wiki/Caviar) (WIP)
Title: Re: CVR Editor Alpha is now available.
Post by: Buster's Uncle on March 23, 2014, 10:05:46 PM
:D :D :D :D :D :D :D :D :D :D
;b; ;b; ;b; ;b; ;b; ;b; ;b; ;b;
:danc: :danc: :danc: :danc: :danc: :danc:
:unworthy: :adore: ;worship
:danc: :danc: :danc: :danc: :danc: :danc:
;b; ;b; ;b; ;b; ;b; ;b; ;b; ;b;
:D :D :D :D :D :D :D :D :D :D
Title: Re: CVR Editor Alpha is now available.
Post by: Ford_Prefect on March 23, 2014, 10:20:43 PM
 :D

If anyone is confused, once you have python 3 installed, the file you want to run is cvrColorizer.py.
CVR.py is the backend that does allot of the heavy lifting.  All the gui code is contained in cvrColorizer.
Title: Re: CVR Editor Alpha is now available.
Post by: Ford_Prefect on March 24, 2014, 02:37:47 AM
Soooo...... anyone try it out yet?  How you like it?

Also http://www.weplayciv.com/forums/showthread.php?6789-HOW-TO-SMACX-caviar-files-listed (http://www.weplayciv.com/forums/showthread.php?6789-HOW-TO-SMACX-caviar-files-listed) has a handy list of the cvr files.
Title: Re: CVR Editor Alpha is now available.
Post by: Geo on March 24, 2014, 05:07:56 PM

Also http://www.weplayciv.com/forums/showthread.php?6789-HOW-TO-SMACX-caviar-files-listed (http://www.weplayciv.com/forums/showthread.php?6789-HOW-TO-SMACX-caviar-files-listed) has a handy list of the cvr files.


;cute
Title: Re: CVR Editor Alpha is now available.
Post by: Geo on March 24, 2014, 05:25:52 PM
At first look it will be slow-running on my desktop. Will tinker a bit more later on, after groceries are done.
Title: Re: CVR Editor Alpha is now available.
Post by: Ford_Prefect on March 24, 2014, 06:30:42 PM
Geo - Could you be more specific in what is running slow?  I know of several areas that could be easily optimized to run faster and some that would be really hard to optimize... it would help me if I knew were you were experiencing problems.
Title: Re: CVR Editor Alpha is now available.
Post by: Geo on March 24, 2014, 06:49:35 PM
Perhaps it was false alarm. I happened to open the alien colony pod as first try, and this model appears to be among the largest .cvr files in the game. It took 5-10 seconds to load the 6 viewpoints of this model.
For improvement, the only thing I'd propose right now would be to remember the last folder path used to open a .cvr file. Now it links to the Python folder when the user runs the application.
Title: Re: CVR Editor Alpha is now available.
Post by: Ford_Prefect on March 24, 2014, 07:21:30 PM
Oh yeah... the alien colony pod.  That thing takes 5 seconds to load on my fastest computer.  The sad thing is there is only one thing I can think of to speed it up and that would be to make it multi-threaded  :-\ and it would only, at best, double the speed that they are displayed.  :-\

I know I can make painting faster, but I didn't notice any slowdowns when drawing, so I concentrated on making the program work instead.  But if anyone notices lag when drawing, I would like to know.
Title: Re: CVR Editor Alpha is now available.
Post by: Kilkakon on March 26, 2014, 12:20:47 PM
I admit I am retreating away from working on this game, but hey, I hope it helps the next person out. :D It is amazing to have this barrier finally demolished or at least close to. I had to do so much fiddling with the 9 unit pcxs available, haha.
Title: Re: CVR Editor Alpha is now available.
Post by: Linamints on March 30, 2014, 07:08:13 AM
Gotta say I LOVE THIS! I've had a lot of fun re-designing units with it.
My only critique really is the fixed brush size, if you want to go for a re-color it is a very tedious process to recolor with a 1 pixel brush.
My suggestion would be to put in a toolbox like MS paint has where you can change your brush size between a few different sizes. (or possibly a feature to import textures someday? :D)

The only bug I noticed was that attempting to do scribbles on the cvrs will make the brush start to fragment, going slower will create nice solid lines though. I'm not sure if it was intentional but just thought I'd point that out.

Overall I must say, you deserve the highest cheers for this!
Title: Re: CVR Editor Alpha is now available.
Post by: Ford_Prefect on April 01, 2014, 11:57:22 PM
http://alphacentauri2.info/index.php?topic=8083.0 (http://alphacentauri2.info/index.php?topic=8083.0)

Alpha 2 is now out! 
Painting now works properly (no more solitary dots).
Also it remembers the folder you last opened/saved to.
Plus numerous other bug fixes.

@Linamints
I'm thinking about adding different brush sizes.  I just wanted to get alpha 2 out because it fixes allot of the bugs.
Title: Re: CVR Editor Alpha is now available.
Post by: Buster's Uncle on April 02, 2014, 02:36:24 AM
What I'd really like is the ability to copy/paste to and from other graphics editors...
Title: Re: CVR Editor Alpha is now available.
Post by: Buster's Uncle on April 02, 2014, 03:50:08 AM
BTW, let me know when you're ready for publicity, and we'll put our heads together and I can promote the heck outta yer .cvr editor the way Yitzi's patch is getting a push right now.  It's good for AC2, and it's good for getting your mod into maximum user hands. ;b;
Title: Re: CVR Editor Alpha is now available.
Post by: Linamints on April 02, 2014, 11:21:20 AM
@Ford_Prefect Wow that was fast! I love the improved brush function. It really helps a ton.

Edit: I did notice a bug though that is a bit critical. Using the save option does not appear to be saving the files any longer. By habit I add .cvr to my filenames, this has worked fine so far but I noticed this evening the changes made no longer seem to be saving. When not adding .cvr to my filenames manually it doesn't seem to register it as a cvr, even pasting it into the game folder won't replace the original cvr file.  The normal cvr files tend to have an icon that is a page with icons on it, the cvr files saved without adding the extension manually save as a blank page. I have tested a few different methods of tinkering with the cvr extension but none of them have resulted in the files loading via the program or AC with the changes made actually being saved.

And just for the sake of information, I was editing Drop.cvr on Windows 7.

I was also a bit curious what features are planned/in the works, and if you wanted people to offer suggestions for additional features?

Though I must say, I am really impressed with the program's stability and performance so early in it's creation. You've done a great job on this!
Title: Re: CVR Editor Alpha is now available.
Post by: Ford_Prefect on April 02, 2014, 03:06:18 PM
@ Linamints

Oh.... dang.  I'll try to figure out what went wrong.  I optimized the painting function and I'll bet I broke something when I was working on that.

I'll see about fixing the extension not being added as well.
Title: Re: CVR Editor Alpha 3 (4/2/2014) is now available.
Post by: Ford_Prefect on April 02, 2014, 04:02:42 PM
Alpha 3 is now out.

Changes:
* You can save your changes again!
* The program will now add .cvr to the filename for you!

Download at start of topic as attachment.

@Linamints
As far as planned features, currently I'm planning to include multiple brush sizes, multi-part support, undo, and a line tool.  I am welcome to feature suggestions (I didn't think of changing the brush size until you suggested it).

Features that I or others have thought and their difficulty level:

Please suggest or tell me which features you desire and I may change what I'll work on next  ;)
Title: Re: CVR Editor Alpha 3 (4/2/2014) is now available.
Post by: Linamints on April 02, 2014, 05:51:27 PM
@Ford_Prefect

Thanks for fixing it so quickly! And glad to help XD. Everything seems to be working smoothly now.

I'd also like to suggest maybe increasing the level of zoom. Unless I'm doing something wrong I think it only has one zoom size currently. usually when working on stuff like this I zoom in super close to do detail work.

Another nice feature would be saving onto the current file instead of saving a new one or overwriting a previous version.

I'm not sure how possible this is, but maybe a preview box? there might be a python script somewhere to re-wrap the textures in a separate window to let you preview how your unit/pieces will look without needing to load the game.

Though doesn't the program already mirror in a way (which has been REALLY nice), or is there something more you want to do with this?

The rest of the things I was going to suggest are already on the list, especially the undo and bucket fill :P. The line tool is an awesome idea too!
Title: Re: CVR Editor Alpha 3 (4/2/2014) is now available.
Post by: Ford_Prefect on April 02, 2014, 06:09:37 PM
I'm not sure how possible this is, but maybe a preview box? there might be a python script somewhere to re-wrap the textures in a separate window to let you preview how your unit/pieces will look without needing to load the game.


I can't really do a 3d previewer in python.  I recommend using Caviar Playerhttp://alphacentauri2.info/index.php?action=downloads;sa=view;down=87 (http://alphacentauri2.info/index.php?action=downloads;sa=view;down=87) to quickly preview how the part looks in 3d.

Another nice feature would be saving onto the current file instead of saving a new one or overwriting a previous version.

I'll add it to my todo list.

I'd also like to suggest maybe increasing the level of zoom. Unless I'm doing something wrong I think it only has one zoom size currently. usually when working on stuff like this I zoom in super close to do detail work.

Yes.  There is currently only 1 zoom level (2x zoom).  I'll add this to my maybe list as the code this affects is rather touchy.

Though doesn't the program already mirror in a way (which has been REALLY nice), or is there something more you want to do with this?

No.  Currently when you paint on an object... it will only paint on the first layer it finds. Mirroring would have it paint on the opposite side at the same time.  For example, if you drew a logo on one side, it would be duplicated on the other side.   
Title: Re: CVR Editor Alpha 3 (4/2/2014) is now available.
Post by: Buster's Uncle on April 02, 2014, 06:32:12 PM
Importing an image - Possible.  It wouldn't be too hard to just spray the image on, the problem is that it would only look right on flat surfaces. Doing only that would be fairly easy, but limited in its usefulness.   To get it to apply an image onto a sloped surface and look good would be hard. I would like to hear opinions on whether or not the limited pasting of an image would be worth it or not.
Assume I have no experience of 3D modeling and therefore have trouble following the tech talk.

-I would expect to have to do the same thing from eight different angles - I'm just used to doing everything in GIMP, and am very used to pasting back-and forth.  I'm in the middle of doing a lot of that on a Santiago smilie I'm working up right now, actually.
Title: Re: CVR Editor Alpha 3 (4/2/2014) is now available.
Post by: Ford_Prefect on April 02, 2014, 06:46:33 PM
Assume I have no experience of 3D modeling and therefore I have trouble following the tech talk.

I'll try to explain the issue without the tech talk.

CVR Colorizer views the object from 6 directions. 
If the object was a perfect cube, there would be no issues.  You would take an image, and it would be applied to a flat surface, and it would look correct in the 3d viewer as well.

Now instead of a cube, lets say the object is a ramp.  Lets say we apply the picture looking towards the slope. 
If you look from perfectly straight on, the picture on the ramp looks like the picture... but if you look from above the ramp, the picture will be broken up into lines spread out over a large area.

Alternatively, if you applied the picture while looking down at the ramp (top view), and then looked from the front view, the picture would look squished.

To avoid those issues, I would need to have the program calculate the slope it's being applied on in order to know which voxels should be colored which color. 


Title: Re: CVR Editor Alpha 3 (4/2/2014) is now available.
Post by: Buster's Uncle on April 02, 2014, 06:51:34 PM
What does the angle of a ramp have to do with a new colony pod design?
Title: Re: CVR Editor Alpha 3 (4/2/2014) is now available.
Post by: Ford_Prefect on April 02, 2014, 06:56:23 PM
Ah.  The problem is kind of like anamorphosis, the picture would only be visible from one direction. .  Random example I found on the internet while googling.  http://www.moillusions.com/abbey-road-meets-charlie-brown/ (http://www.moillusions.com/abbey-road-meets-charlie-brown/) http://www.nickcampos.com/2010/09/anamorphosis-a-cool-way-to-promote-child-safety-in-bc/ (http://www.nickcampos.com/2010/09/anamorphosis-a-cool-way-to-promote-child-safety-in-bc/) https://en.wikipedia.org/wiki/Anamorphosis (https://en.wikipedia.org/wiki/Anamorphosis)


Edit:
Short version:  Dealing with a 3d voxel object and applying an image will be hard because I'm unfamiliar with the math involved.
Title: Re: CVR Editor Alpha 3 (4/2/2014) is now available.
Post by: Linamints on April 02, 2014, 07:07:57 PM
@Ford_Prefect Ah, that makes more sense then. I misunderstood the mirroring to mean it paints across multiple sections.

@BUncle Maybe a visual example will help (I'm also working on colony pods :P).

(http://i2.photobucket.com/albums/y4/Slayers4TheFuture/ref.png)

On the image sheet it looks fine, but in game it looks a bit stretched because the colony pod has sloped edges. I think this is what he is talking about.
Title: Re: CVR Editor Alpha 3 (4/2/2014) is now available.
Post by: Buster's Uncle on April 02, 2014, 07:11:02 PM
Huh.  I had always assumed the .cvr file stored eight flat pictures - that's all the game needs, provided the angles are right.
Title: Re: CVR Editor Alpha 3 (4/2/2014) is now available.
Post by: Ford_Prefect on April 02, 2014, 07:22:28 PM
No.  the .cvr files is 3d voxel based format.  Think minecraft.  The editor is a 2d approximation.  I could make a 3d editor... but I don't know enough about 3d programing to do so.

@Linamints   You are exactly right.  Thanks for posting an example.  Also... Yay!  Glad to see a CVR mod made using my tool.  :D  I'm excited to see future updates for your mod!
Title: Re: CVR Editor Alpha 3 (4/2/2014) is now available.
Post by: Ford_Prefect on April 02, 2014, 08:36:46 PM
YESSSS!  Multi-part objects now load in correctly!!!!!  :danc: Now I can draw a smiley faces on my infantry.  ;)  I'll work on adding in some more features before doing the next release. 
Title: Re: CVR Editor Alpha 3 (4/2/2014) is now available.
Post by: Kilkakon on April 03, 2014, 12:25:24 AM
I will have to download and play around with this a little eventually. While I had already rearranged some of the armours manually and stuff it's still cool. Never worked out how the remappable parts of the vehicles worked though, it seemed to be pretty random.

* You can save your changes again!
Such a good feature!
Title: Re: CVR Editor v1 (4/2/2014) is now available.
Post by: Ford_Prefect on April 03, 2014, 12:51:54 AM
I've released version 1.   :danc:
http://alphacentauri2.info/index.php?action=downloads;sa=view;down=162 (http://alphacentauri2.info/index.php?action=downloads;sa=view;down=162)

Changes:
Title: Re: CVR Editor v1 (4/2/2014) is now available.
Post by: Buster's Uncle on April 03, 2014, 01:05:19 AM
Any idea what a .cvr modder badge might look like?  I reckon you're due.
Title: Re: CVR Editor v1 (4/2/2014) is now available.
Post by: Maximus Thalos on April 03, 2014, 04:45:59 AM
Found this site and this program, and joined the forum today alone.
Well done on this utility. Have been dying to know how to get at the voxels in SMAC ever since I was modding Tiberian Sun.

But heres a thought. Tiberian Sun already has a well made and excellent Voxel edtior. All we need to do is figure out how to convert a cvr to a vxl format. I don't see why its not working due to the fact that they are raw voxels.

And for the rest of us:
Looks like they make the unit graphics by combining files.

If you use the caviar viewer you can have a look for yourself, here's what I've found regarding filenames to help you find stuff:
A is a prefix for alien (sometimes) and armour other times
VW is a prefix for vehicle weapons
VCT = copter parts
VCU = Cruisers
VI = Infantry
VFL = skimship (maybe)
VGS = gravship (possibly)
VHT = gravtanks/hovertanks
VJT = needlejet/jet

Ni = (native) Isle of the deep
Nlc = (native) locusts of chiron
Nw = (native) another part of the isle?

Title: Re: CVR Editor v1 (4/2/2014) is now available.
Post by: Ford_Prefect on April 03, 2014, 05:30:19 AM
@Maximus
Welcome to the forum!  :D
Geo already has done some research here (http://www.weplayciv.com/forums/showthread.php?6789-HOW-TO-SMACX-caviar-files-listed) on which cvr file is for which unit.
Quote
But heres a thought. Tiberian Sun already has a well made and excellent Voxel edtior. All we need to do is figure out how to convert a cvr to a vxl format.

Yeah.  I made a mistake in creating this program in python.  I thought making it in python would make it easy for others to modify the code for their own purposes, but I'm hitting limits on what I can do now because of how slow python/tkinter draws. Using a voxel editer someone else has created as a base would be pretty cool.  Maybe for cvrColorizer V2?  ;)

@Everyone
I'll be releasing a version 1.1 in a week or two.  There are a couple things I can speed up and I wouldn't be surprised if someone reports a bug or two that I'll need to fix.   :D 
Title: Re: CVR Editor v1 (4/2/2014) is now available.
Post by: Buster's Uncle on April 03, 2014, 05:33:38 AM
...  Eureka!  A tiny colony pod w/ purple tank for the .cvr modder badge!

Yes?
Title: Re: CVR Editor v1 (4/2/2014) is now available.
Post by: Ford_Prefect on April 03, 2014, 05:35:52 AM
...  Eureka!  A tiny colony pod w/ purple tank for the .cvr modder badge!

Yes?

 ;lol

Better than anything I can come up with. But will look good/recognizable being that small of an image?
Title: Re: CVR Editor v1 (4/2/2014) is now available.
Post by: Buster's Uncle on April 03, 2014, 05:40:52 AM
Let's find out.  Sit tight while I cut it out of your screeny and reduce.
Title: Re: CVR Editor v1 (4/2/2014) is now available.
Post by: Buster's Uncle on April 03, 2014, 05:50:18 AM
That didn't take long.  Here it is full-size and badge scale.  I'd like to put this on you to wear with pride before I go to bed...
Title: Re: CVR Editor v1 (4/2/2014) is now available.
Post by: Buster's Uncle on April 03, 2014, 06:04:22 AM
Nah, I'm done.  Post me a flat profile of the CP if you think that's too hard to make out, and I'll hook you up tomorrow.
Title: Re: CVR Editor v1 (4/2/2014) is now available.
Post by: Kilkakon on April 03, 2014, 09:13:11 AM
I like that, BU. :)
Title: Re: CVR Editor v1 (4/2/2014) is now available.
Post by: Ford_Prefect on April 03, 2014, 03:32:03 PM
Looks good to me.   :D
Title: Re: CVR Editor v1 (4/2/2014) is now available.
Post by: Buster's Uncle on April 03, 2014, 04:59:31 PM
 :danc: :D
Title: Re: CVR Editor v1 (4/2/2014) is now available.
Post by: Buster's Uncle on April 19, 2014, 03:09:39 AM
BTW, let me know when you're ready for publicity, and we'll put our heads together and I can promote the heck outta yer .cvr editor the way Yitzi's patch is getting a push right now.  It's good for AC2, and it's good for getting your mod into maximum user hands. ;b;
I'm sorry I haven't gotten up with you on this three days ago, Ford, but Beyond Earth happened, I've been way too busy to get to everything that needed getting, and it just would have gotten drowned out anyway.  We should be conducting the interview anyway, in preparation for the right time, as doing it via post will take a while.  I really ought to be doing this with kyrub, too.

So, what's the deal with your .cvr mod?
Title: Re: CVR Editor v1 (4/2/2014) is now available.
Post by: Ford_Prefect on April 19, 2014, 09:21:49 PM
The CVR Colorizer project is currently on hold for me.  I can't add any more tools because of speed issues with python.  Unless someone figures out where the rest of the color palette is stored or figures out what the normal values are supposed to be... there isn't much else I can do with the python version of this program.  The only thing I could really do to advance the project is to re-write the program in another language so that it can display the model in 3d and be fast enough to have more advanced tools.

It will probably be a while before I work on this program again (unless someone makes a breakthrough on normals or colors in the cvr format).  I'll gladly accept patches if someone wants to try to optimize it or add some features.
Title: Re: CVR Editor v1 (4/2/2014) is now available.
Post by: Buster's Uncle on April 19, 2014, 09:30:46 PM
Is this indicating a current lack of interest in promoting it?  I'd point out that promoting would tend to help bring in those people who might make the breakthroughs you hope for.  Don't sweat the answers - I'm out to make you look good.

How did you first take an interest in this project.
Title: Re: CVR Editor v1 (4/2/2014) is now available.
Post by: Ford_Prefect on April 19, 2014, 09:48:09 PM
Quote
How did you first take an interest in this project.
I wanted to try to make a smac clone.  So I googled around and found out no one knew how to read the calviar format(.cvr).  So I figured, what the heck... I'll give it a try. 
Title: Re: CVR Editor v1 (4/2/2014) is now available.
Post by: Buster's Uncle on April 19, 2014, 09:52:28 PM
Why the .cvr part in particular, though?
Title: Re: CVR Editor v1 (4/2/2014) is now available.
Post by: Ford_Prefect on April 19, 2014, 09:56:28 PM
Quote
Is this indicating a current lack of interest in promoting it?  I'd point out that promoting would tend to help bring in those people who might make the breakthroughs you hope for. 

No.  I'm interested in promoting it.  I've reached the limit of what I can figure out about the caviar file format without help.  It will probably take someone who knows assembly or knows how to de-compile a program looking at the caviar player and/or SMAC to figure out the rest of the specification involving normals and colors.
Title: Re: CVR Editor v1 (4/2/2014) is now available.
Post by: Ford_Prefect on April 19, 2014, 10:00:27 PM
Quote
Why the .cvr part in particular, though?
It was the only major graphics component that no one could read.  I could use any of the other images for the terrain, faces, gui, etc, but the actual units were in the cvr file format.  I thought it would be quicker and easier to figure out the .cvr format than it would be to recreate the units from scratch in blender. (I was wrong.  :D )
Title: Re: CVR Editor v1 (4/2/2014) is now available.
Post by: Buster's Uncle on April 19, 2014, 10:06:47 PM
What can be done with your .cvr editor?
Title: Re: CVR Editor v1 (4/2/2014) is now available.
Post by: Ford_Prefect on April 19, 2014, 10:34:08 PM
What can be done with your .cvr editor?

The editor allows one to re-texture any unit found in Alpha Centauri in its native cvr format.  Each part of the unit can be viewed independently for painting. The editor also can export what it knows about the current cvr file into a human readable text format. 
Title: Re: CVR Editor v1 (4/2/2014) is now available.
Post by: Buster's Uncle on April 19, 2014, 10:46:35 PM
Could I turn the colony pod into a covered wagon with it?
Title: Re: CVR Editor v1 (4/2/2014) is now available.
Post by: Ford_Prefect on April 19, 2014, 10:57:16 PM
Quote
Could I turn the colony pod into a covered wagon with it?

No.   Currently, the tool only allows you to change the colors of the units, not their shape.  It is a paint tool, not a modeler. 
Title: Re: CVR Editor v1 (4/2/2014) is now available.
Post by: Buster's Uncle on April 19, 2014, 11:13:21 PM
What do you think can be done in the future, assuming some breakthroughs?
Title: Re: CVR Editor v1 (4/2/2014) is now available.
Post by: Ford_Prefect on April 19, 2014, 11:30:46 PM
What do you think can be done in the future, assuming some breakthroughs?

Currently, there is enough known about caviar (cvr) to create a 3d version of the editor.  I might try to create this after I've improved my 3d programing skills.

One breakthrough would be if someone figured out where the rest of the color values are stored in the file.  Right now the last 10-20 colors are unknown for each model.  If someone figured it out, I could quickly fix the color palette to display the colors correctly.

A major breakthrough would be if someone figured out the values for normals... then almost anything would be possible.   Normals would allow us to truly modify the units to appear however we wanted them to be.  Knowing the normals would also allow us to export the units to blender and other games. 


Title: Re: CVR Editor v1 (4/2/2014) is now available.
Post by: Buster's Uncle on April 19, 2014, 11:35:14 PM
Okay, define normal for non-tech types to whom that last would make no sense.

...

If you want to make up your own questions and answer them, that's great, too.  This stage of making a promotion news item has no rules.  Write bits for the first draft if anything occurs to you, and you want.  Whatever.  We'll pretty it all up, so no pressure.
Title: Re: CVR Editor v1 (4/2/2014) is now available.
Post by: Ford_Prefect on April 19, 2014, 11:44:46 PM
Okay, define normal for non-tech types to whom that last would make no sense.

A normal tells the software how light should reflect off of a surface.  https://en.wikipedia.org/wiki/Normal_mapping
Title: Re: CVR Editor v1 (4/2/2014) is now available.
Post by: Ford_Prefect on April 19, 2014, 11:48:23 PM
What would be great is if someone posted some pictures of modified units to show off what can be done.
Title: Re: CVR Editor v1 (4/2/2014) is now available.
Post by: Buster's Uncle on April 19, 2014, 11:51:56 PM
I'd thought the same thing.  An advantage this definitely has over the Yitzi patch story is we have pics.  A few good ones already posted.


Anything you'd care to relate about yourself as a fan, forumite, gamer, modder, tech guy or whatever?

Maybe talk about AC and you a little?
Title: Re: CVR Editor v1 (4/2/2014) is now available.
Post by: Ford_Prefect on April 20, 2014, 04:14:03 PM
I made a wiki page to hold what I know about the caviar file specification.
Caviar (.cvr) specification. (http://alphacentauri2.info/wiki/Caviar) (WIP)

Title: Re: CVR Editor v1 (4/2/2014) is now available.
Post by: Buster's Uncle on April 22, 2014, 09:20:02 PM
What have I not asked about yet that I should have, and what answer.  What do you want people to know about the project?

Do you think we're getting anywhere near covering things adequately for an article?
Title: Re: CVR Editor v1 (4/2/2014) is now available.
Post by: Ford_Prefect on April 23, 2014, 12:38:34 AM
Quote
What do you want people to know about the project?

Quote
Do you think we're getting anywhere near covering things adequately for an article?
Probably.  I can't really think of anything more to say.
Title: Re: CVR Editor v1 (4/2/2014) is now available.
Post by: Buster's Uncle on April 23, 2014, 01:51:28 AM
I need to read back through what we've already got.  I never feel caught up since BE was announced.
Title: Re: CVR Editor v1 (4/2/2014) is now available.
Post by: ete on April 25, 2014, 05:40:43 PM
Did you come across http://www.graphicsgroups.com/5-graphics-algorithms/cf6d650baaf8850c.htm (http://www.graphicsgroups.com/5-graphics-algorithms/cf6d650baaf8850c.htm)

Particularly:
Quote
>Hi again!
>There is this article about Animatek's new Caviar Technology in one issue
>of Game Developer.
>It's supposed to be some system that renders truly 3D pixel characters in
>realtime.
>It sounds a bit like voxels to me, but it's much faster.
>The demo they have on the Animatek website looked pretty impressive.
>Does anyone have any idea how it is done?i

I suppose, they store all voxels of the
surface in a array that looks something
like this:
struct Voxel {
   char Color;
   char nextVoxel;
   Normal normal;
  };
Voxel Surface[NumVoxels];
'nextVoxel' describes the relative position
of this voxel to the previous voxel. If
subsequent voxels are always neighboured, there
are only 26 possible values for nextVoxel
(i.e. nextVoxel ranges from 0 to 25).
To render a parallel projected surface, you
first create for each position of the viewer
an array that contains the values for the
relative positions of the neighboured voxels
in _screen_ coordinates:
 Vector relVoxelPosition[26];
Now, compute the screen position of the first
voxel, and you can compute the positions
of the subsequent voxel using only additions.
At each Voxel, compute the intensity using
the stored surface normal, and draw it as
a single pixel (or as a square of pixels).
Maybe it is a good idea, to render the
surface always at a constant size, and
sample it down before drawing it on the
screen.
Hidden Surface removal can be done either with
a z-Buffer, or by subdividing the surface into
smaller pieces, that are rendered back to front.
I suppose, this method should be fast enough
for realtime rendering, since it contains no
expensive operations (about four times
more expensive than bumpmapping).
Title: Re: CVR Editor v1 (4/2/2014) is now available.
Post by: DrazharLn on April 25, 2014, 07:49:20 PM
Glad that you managed to work out the cvr format. I emailed the company that bought the company that wrote the original software in 2010 and they said they'd make the editor available.

And then they never did QQ

Maybe I should bother them again.
Title: Re: CVR Editor v1 (4/2/2014) is now available.
Post by: Buster's Uncle on April 25, 2014, 08:06:04 PM
Yes.
Title: Re: CVR Editor v1 (4/2/2014) is now available.
Post by: DrazharLn on April 25, 2014, 09:39:28 PM
Done
Title: Re: CVR Editor v1 (4/2/2014) is now available.
Post by: Buster's Uncle on April 25, 2014, 09:54:27 PM
;b;  :D  That there's how things get done.
Title: Re: CVR Editor v1 (4/2/2014) is now available.
Post by: Ford_Prefect on April 25, 2014, 10:59:56 PM
Did you come across http://www.graphicsgroups.com/5-graphics-algorithms/cf6d650baaf8850c.htm (http://www.graphicsgroups.com/5-graphics-algorithms/cf6d650baaf8850c.htm)


No I didn't.  I had to figure that out on my own.
Title: Re: CVR Editor v1 (4/2/2014) is now available.
Post by: ete on April 29, 2014, 12:23:34 PM
Okay. I did not know of it until just before I posted it. Was looking around on google (.cvr caviar) for things that may be helpful to you, but too late to be of much use, :(.
Title: Re: CVR Editor v1 (4/2/2014) is now available.
Post by: Ford_Prefect on June 03, 2014, 05:21:06 AM
Sooo.... anyone working on unit mods? 
Title: Re: CVR Editor v1 (4/2/2014) is now available.
Post by: Geo on June 03, 2014, 11:13:46 AM
  :-[
Title: Re: CVR Editor v1 (4/2/2014) is now available.
Post by: Buster's Uncle on June 04, 2014, 02:50:38 AM
I'm working on the promotional story...
Title: Re: CVR Editor v1 (4/2/2014) is now available.
Post by: Linamints on July 23, 2014, 10:37:43 PM
@Ford_Prefect I have been off and on, sorry for dropping off for awhile.
It's been a lot of fun!
Title: Re: CVR Editor v1 (4/2/2014) is now available.
Post by: Buster's Uncle on September 25, 2014, 02:59:20 AM
Ford, submitted for your approval:  I did the story up as an interview - since we'll be putting it out over multiple platforms, I simplified the formatting as much as possible.  sisko will probably have some idea about how to format the list at the end, and will probably make other minor changes, but this should be basically it.  Feel free to make suggestions, or amplify your remarks.  Concise is good.

Sorry to have taken so long.





Ford_Prefect’s .cvr Editor Released: Interview with the Creator


One of the best features of Sid Meier’s Alpha Centauri/Alien Crossfire is its wonderful modability - which, thanks to SMACer Ford_Prefect, has now been expanded.

SMACX, although a science fiction game, is a robust enough engine that modders have frequently want to do retro-mods.  There is a massive WWII scenario extant, and much work was done several years ago on a Middle-Earth TCM.

In such cases, the drawback of the SMACX platform was the proprietary., and obsolete, .cvr format units were in, which no one in the fan community could modify from their science fiction look, or alter into different science fiction looks.  Now, Ford_Prefect has created the first .cvr editor available to SMACers - and he’s looking for technical help to expand its modest capabilities.

AC2 interviewed Ford about his creation in April:

---

AC2:  How did you first take an interest in this project?

Ford_Prefect:  I wanted to try to make a smac clone.  So I googled around and found out no one knew how to read the calviar format(.cvr).  So I figured, what the heck... I'll give it a try.


AC2:  Why the .cvr part in particular, though?[/quote]

Ford_Prefect:  It was the only major graphics component that no one could read.  I could use any of the other images for the terrain, faces, gui, etc, but the actual units were in the cvr file format.  I thought it would be quicker and easier to figure out the .cvr format than it would be to recreate the units from scratch in blender. (I was wrong.  :D )


AC2:  What can be done with your .cvr editor?

Ford_Prefect:  The editor allows one to re-texture any unit found in Alpha Centauri in its native cvr format.  Each part of the unit can be viewed independently for painting. The editor also can export what it knows about the current cvr file into a human readable text format.


AC2:  Could I turn the colony pod into a covered wagon with it?

Ford_Prefect:  No.   Currently, the tool only allows you to change the colors of the units, not their shape.  It is a paint tool, not a modeler. 


AC2:  What do you think can be done in the future, assuming some breakthroughs?

Ford_Prefect:  Currently, there is enough known about caviar (cvr) to create a 3d version of the editor.  I might try to create this after I've improved my 3d programing skills.

One breakthrough would be if someone figured out where the rest of the color values are stored in the file.  Right now the last 10-20 colors are unknown for each model.  If someone figured it out, I could quickly fix the color palette to display the colors correctly.

A major breakthrough would be if someone figured out the values for normals... then almost anything would be possible.   Normals would allow us to truly modify the units to appear however we wanted them to be.  Knowing the normals would also allow us to export the units to blender and other games. 


AC2:  Okay, define normal for non-tech types to whom that last would make no sense.

Ford_Prefect:  A normal tells the software how light should reflect off of a surface.  https://en.wikipedia.org/wiki/Normal_mapping (https://en.wikipedia.org/wiki/Normal_mapping)
I made a wiki page to hold what I know about the caviar file specification.
Caviar (.cvr) specification. (http://alphacentauri2.info/wiki/Caviar) (WIP)


AC2:  What do you want people to know about the project?

Ford_Prefect: 
---

More information and a link to the editor can be found here:
http://alphacentauri2.info/index.php?topic=7866.0 (http://alphacentauri2.info/index.php?topic=7866.0)  Ford, and the rest of the SMACX modding community, would greatly appreciate your feedback and support.
Title: Re: CVR Editor v1 (4/2/2014) is now available.
Post by: Ford_Prefect on September 26, 2014, 03:31:15 AM
Looks good!

Sorry about being in-active but I've been busy with farm work.  In another month or two I should have more free time to work on side projects again. 

Hope this attracts some more modders to the forums!  (Or hopefully someone who can reverse engineer the cvr format the rest of the way.)
Title: Re: CVR Editor v1 (4/2/2014) is now available.
Post by: Buster's Uncle on September 26, 2014, 03:42:26 AM
No sweat.  Sorry about running out of steam about getting this done any sooner.
Title: Re: CVR Editor v1 (4/2/2014) is now available.
Post by: Kilkakon on July 30, 2016, 02:15:15 PM
I believe in necroposting.

Gave this a go today. Got some feedback and areas in which the editor could use improvement. I've attached the results of today's work as well.

Firstly, there is a sore need for a bigger brush size. I did all this with a 1x1 pixel brush and it took hours haha~

Secondly, the program can't get at the little crevices that are covered up by other things. For example, in the chassis image, I can't get at the inside edges of the wheel or under the suspension tubing.

Still, was able to make a naked Scout Patrol! ;deidre; would be proud.
Title: Re: CVR Editor v1 (4/2/2014) is now available.
Post by: Buster's Uncle on July 30, 2016, 02:53:05 PM
...I wonder if it would be feasible to find a basic open source graphics editor, at least MSPaint-level good, and incorporate it wholesale into an upgrade, Ford?  Like, the potential of just being able to custom decorate the standard units is a huge breakthrough for what modders can do, on the art end.  -It's always been that elaborate WWII mod/scenario stuck with the same old space units...
Title: Re: CVR Editor v1 (4/2/2014) is now available.
Post by: Buster's Uncle on July 30, 2016, 03:20:26 PM
...So is there anything out there that would meet the .cvr editor needs?  I wouldn't know if I saw it, alas, having no experience with 3D...
Title: Re: CVR Editor v1 (4/2/2014) is now available.
Post by: Geo on September 02, 2017, 07:55:00 PM
Tried it out a bit today.

Basically I agree with Kilkakon's remarks about painting things in this app.
And having two-colored parts is a burden to work on since the scale is way too small to work exactly on the border of color boundaries.
Title: Re: CVR Editor v1 (4/2/2014) is now available.
Post by: Chiu ChunLing on January 23, 2018, 08:49:53 PM
Unfortunately, Caviar is VERY different from normal 3D modeling.  I mean that in both ways, now that I understand the idea behind their voxel mesh (and the high performance rendering it can achieve) I'm disheartened that it is not more commonly used (there are so many possibilities, think of playing Minecraft with an effective view distance of miles rather than a fraction of a kilometer).  It's also inconvenient because the kinds of tools that are useful for modding other 3D model types are not applicable to .cvr files.

Basically, rather than having a 2D graphic texture "wrapped" onto a 3D model made up of polygons, Caviar has the color indexes referenced in each voxel.  Each group as a whole is really a thread that is extruded about in three dimensions (rather like making a clay model by rolling a 'snake' and then winding it back and forth to build up a form, the metaphor is also apt to the "normal" process that visually 'smooths' the voxels into a surface for display).

Basically, the palate is separate from the model information, but the application of the palate to individual voxels doesn't have a separate 2D amenable step, a "skin" like with other models.
Title: Re: CVR Editor v1 (4/2/2014) is now available.
Post by: rmolina on January 23, 2018, 11:02:47 PM
(rather like making a clay model by rolling a 'snake' and then winding it back and forth to build up a form, the metaphor is also apt to the "normal" process that visually 'smooths' the voxels into a surface for display).

Or, even better, winding your clay snake around a wax model, and then melting the wax as soon as the model is completely wrapped in clay.

Here is an even nicer analogy:

Quote from: Dave Sieks, "Dawn of the 3D Pixel Sprite", Game Developer Magazine, June 1997
You can think of this as something like a mummy: the original polygonal model serves as the mummy’s body, which is then completely wrapped in a strand of 3D pixels — thereafter, only this wrapping is used to represent the character.
Title: Re: CVR Editor v1 (4/2/2014) is now available.
Post by: Chiu ChunLing on January 24, 2018, 12:55:22 AM
That's interesting, but it must apply to whatever editing tool they used to create the caviar files in the first place.  The caviar file itself does not contain anything other than the instructions on how to wind the string of voxels into an empty volume.

I suppose it should be possible to rebuild a model from the voxels, Ford discussed trying this but the result was a huge number of polygons.  I think that his approach created too many by thinking of the voxels as cubes, but the point is that the underlying difficulty isn't easily amenable to traditional approaches.

On the other hand, while creating a tool to turn the voxels back into a model and texture seems a bit difficult, it probably isn't so impossible to make something that would turn a conventional model and texture into voxels...if anyone knew how to generate the normal information properly.  They must have had one at some point, right?  The information left in the .cvr files suggest it was some kind of Max plugin.
Title: Re: CVR Editor v1 (4/2/2014) is now available.
Post by: DrazharLn on January 29, 2018, 12:41:50 AM
I don't know what Ford tried, but there are some algorithms for converting voxels into surfaces.

https://en.wikipedia.org/wiki/Isosurface#Implementation_Algorithms

PolyVox is a C++ library that implements the marching cubes algorithm. Though I don't think the algorithms would be that difficult to translate into python or whatever. If you need access to the original papers, I recommend sci hub.

It might be a fun challenge to work out how to map the "texture" from the voxel data onto the mesh.
Title: Re: CVR Editor v1 (4/2/2014) is now available.
Post by: bvanevery on March 25, 2018, 04:13:39 PM
I'm trying this out using Windows 10 and Python 3.6.  Some .cvr files don't load at all.  Others, I see something, but darned if I know what I'd do with them.  This makes swallowing Blender look easy.
Title: Re: CVR Editor v1 (4/2/2014) is now available.
Post by: bvanevery on November 11, 2018, 04:18:54 PM
Today I read the whole thread.  I used the Caviar Player utility to look at various .cvr files.  I now realize that some .cvr files only contain animation, not geometry.  So that may be why nothing happened when I opened certain random files with CVR-Colorizer.

As for application, one possibility is changing the appearance of Pulse and Resonance armors compared to normal armors.

Just tried the GitHub version of CVR-Colorizer again.  Most .cvr files I click on, do not open.  They opened ok in Caviar Player, so there goes my "animations only" theory.

Trying to open files was taking me to an inconvenient directory, when I tried to open files over and over again.  For more convenience, I copied all .cvr files to the CVR-Colorizer directory, hoping I'd get more locality of context.  Jury's out on that, but files started opening that previously weren't.  So maybe there are some pathing or installation issues with the tool.

I am now seeing that the tool is probably meant to be used in the same directory as .cvr files, such as the top level SMAC installation directory.  I have inadvertently replicated this setup out of frustration.  There is a navigational bar that gives the name of the file, something about what Mesh it is a part of, and the ability to go forwards or backwards in the list of files.  The rendering is slow and the transition between files requires some waiting, but it is probably faster than opening files individually.  At least now I can go through all the files and see what's actually available to change.  Previously I thought I was going to have to do that manually, with a lot of menu opening and closing, to get to the bottom of what works and what doesn't.

On second thought, I think I'm wrong about what that navigation bar is for.  It looks like it's for navigating meshes within a single .cvr file.  So I probably will have to open all files manually, to see what works.  The rendering of these internal meshes is slow.  I won't quite declare it to be unusable, but you'd have to be really motivated to make a specific change to some unit.  Just tooling around to figure out what you might like to do, is no joy at all.

Actually the speed of rendering might be content dependent.  Either that or Python is compiling its bytecode in a cache?

The tool died with an Error on opening AATMANIP.cvr.  Caviar Player says "This file does not contain geometry".

Some other file took long enough to load, that I thought perhaps CVR-Colorizer was locked up.  It wasn't, it's just really slow rendering.  I'm thinking it's not Python bytecode optimization stuff, I don't even know if that's how it works anyways.  There's a folder called __pycache__ that got generated, that contains a file named CVR.cpython-36.pyc.  The really slow file turns out to be the Alien colony pod.  Lotta squiggles I guess.

Ok, I get the idea, at least as far as navigating through files.  I think there are 140 .cvr files to wade through.  A good number of them are like land mines, they blow up in your face and take CVR-Colorizer down.  That and the slow rendering make this quite painful to "explore" with.  If you have a specific agenda already in your mind, of what you'd like to do to some unit, then maybe you'll persevere and figure out how to make your changes to something.  But just dinking around, this is painful, not fun.

It looks like an options.txt file gets generated.  It has a path for starting directory.  I could manually change that to wherever I prefer, so that I'm not always clicking on a directory to open another file.  There's no menu within CVR-Colorizer to change this, you need to change options.txt manually.

Title: Re: CVR Editor v1 (4/2/2014) is now available.
Post by: Buster's Uncle on January 25, 2023, 02:30:49 PM
Revisiting the paste-in request, two things I don't think I communicated well previously:

1.) It would a fantastic improvement to the usefulness of this utility to be able to do the detail work in a more sophisticated graphics program, even without cracking the color issues.

2.) As a modder, I don't necessarily care if the unit works as 3D.  I might want 2D, see this project commencing: https://alphacentauri2.info/index.php?topic=22061.0 (https://alphacentauri2.info/index.php?topic=22061.0) where I'd expect to paste in the same flat unit image multiple times to get all the frames so AC will use it.  -And if I wanted 3D, I wouldn't mind having to generate the different angles manually; it's still better than not being able to do anything but color what's already there.  Yes, surely this approach wouldn't be compatible with the Workshop, but easy enough to leave instruction with the mod not to use it...
Title: Re: CVR Editor v1 (4/2/2014) is now available.
Post by: Buster's Uncle on February 13, 2023, 03:00:40 PM
SO - it's time for a new thing to promote on Facebook and other forums tomorrow morning- and this looks like the best candidate.  We did some prep for a big promotion that fell through the cracks for reasons of --- probably my mood swings or a random event triggering.

So, Ford, if you see this in time?  Draz?  Any thoughts, anything to add?  I need to write a shortish pitch for the project, about a paragraph, no doubt w/ some selected illos of what it can do from the thread pasted together.
Title: Re: CVR Editor v1 (4/2/2014) is now available.
Post by: Buster's Uncle on February 15, 2023, 02:10:19 AM
...I posted a pic of the Civ6 Rameses II from the latest DLC made not-ludicrously-white yesterday afternoon, 'cause it was a little work already done for a conversation elsewhere, and what the heck.  This morning, I wasn't ready for this, and brown Rameses was drawing a little attention for AC2 - so I left it alone for the week.  Still plenty time to straighten me out on the CVR editor project...
Title: Re: CVR Editor v1 (4/2/2014) is now available.
Post by: DrazharLn on February 15, 2023, 08:44:38 AM
This tool allows modders to paint new colours on (some of) the existing 3D models from the game. The repainted models can be saved over the originals to have them appear in game.

Dunno what else you need.
Title: Re: CVR Editor v1 (4/2/2014) is now available.
Post by: Buster's Uncle on February 15, 2023, 02:39:23 PM
Me either - too much multitasking and drama in progress.
Templates: 1: Printpage (default).
Sub templates: 4: init, print_above, main, print_below.
Language files: 4: index+Modifications.english (default), TopicRating/.english (default), PortaMx/PortaMx.english (default), OharaYTEmbed.english (default).
Style sheets: 0: .
Files included: 31 - 840KB. (show)
Queries used: 14.

[Show Queries]