Cells for the masses

ZGE Source Code discussion. Ask questions, present your changes, propose patches etc.

Moderator: Moderators

User avatar
jph_wacheski
Posts: 1005
Joined: Sat Feb 16, 2008 8:10 pm
Location: Canada
Contact:

Post by jph_wacheski »

I am not exactly sure what you got going,?. is it a new cell style, metric or point placment? IMHO it is best not to remove anything,. as it is all quite usefull currently :)

here is a sorta cobblestone-ish,. .

Code: Select all

ZZDC<?xml version="1.0" encoding="iso-8859-1" ?>
<Bitmap Name="Bitmap1" Width="3" Height="3">
  <Producers>
    <BitmapCells CellStyle="4" PointsPlacement="2" UsedMetrics="3" RandomSeed="2" BorderPixels="5"/>
    <BitmapZoomRotate Zoom="-5"/>
  </Producers>
</Bitmap>
just wondering,. could the 'point count' and 'random seed' be ustilised by the 'honeycomb' and 'square' point placements? they could have different 'effects' than with the random one,. . just an idea.
iterationGAMES.com
kattle87
Posts: 402
Joined: Wed Sep 26, 2007 9:06 am
Location: Italy

Post by kattle87 »

uhm... this is extremely regular :D the one I would like to make is something far more randomized :D

I'm working on some easy (and small-sized) way to get the squares and honeycomb working with the Point Count (add some points). The colour property is already working ("standard" style only) and I have no idea of what adding something else there...

What I would like to add is a metrics. Alone this metrics is not really so much usefull, so you would use it "almost" with the new "cobblestone" point displacement. (that would be an enhanced squares that contains a little randomness).
In the fall of 1972 President Nixon announced that the rate of increase of inflation was decreasing. This was the first time a sitting president used the third derivative to advance his case for reelection.
-=Hugo Rossi=-
User avatar
jph_wacheski
Posts: 1005
Joined: Sat Feb 16, 2008 8:10 pm
Location: Canada
Contact:

Post by jph_wacheski »

Well that sounds like fun! bring it,. .

I am not against more components, if you come up with more cool and usefull stuff! (like so far!!) one thing that comes to mind,. is a mask! so a three input unit with some various method to use one to mix the other two,. . or more mix methods on the combine ! we have add/subtract,. werk has 10 the GIMP has 21! :P
iterationGAMES.com
User avatar
VilleK
Site Admin
Posts: 2274
Joined: Mon Jan 15, 2007 4:50 pm
Location: Stockholm, Sweden
Contact:

Post by VilleK »

kattle87 wrote:I'm working on some easy (and small-sized) way to get the squares and honeycomb working with the Point Count
Good idea.
kattle87 wrote:What I would like to add is a metrics. Alone this metrics is not really so much usefull, so you would use it "almost" with the new "cobblestone" point displacement. (that would be an enhanced squares that contains a little randomness).
So you are suggesting one new Metric and one new PlacementStyle?

On one hand we should strive to make things as generic as possible. How do other tools generate a cobblestone-effect, with a single component or a combination of several? Just so that we don't make too much functionality into a single component when we can have several components which will make more interesting possibilities.

But still I think it is a good idea to try to keep this inside the current cells-component at the moment if you don't think the new code is totally unrelated. But it's hard for me to say for sure until I've seen your code and tried the feature :) . If it is not too much work for you I suggest you try to use the existing Cells-component, then we can update the beta and try the feature and see how it works. If we later find that maybe it should go into a separate component I can fix that myself.
kattle87
Posts: 402
Joined: Wed Sep 26, 2007 9:06 am
Location: Italy

Post by kattle87 »

well... I wanted to get this into the Cell component since the code is _totally_ related ^^
This is what I could create... Be aware: 256x256 eats up to 20 secs of loading time. I will do some speed-optimization to the blur component when I will have time. This is getting really important to do it ASAP.

PS: this file won't work until my mods will get merged to the main beta code. But right now I am sending a patch to ville that contains the new placement, the new metrics and the Multiply property for the Combine component as a bonus.

PPS: another trick to speed up preview a little is splitting the textures in the bitmaps you are going to combine since it will re-compute only a part of the tree.
Attachments
Cobblestone.zgeproj
the zproj file... won't work untill tomorrow probably
(995 Bytes) Downloaded 758 times
my little creation ^^
my little creation ^^
cobblestone.jpg (36.34 KiB) Viewed 20877 times
In the fall of 1972 President Nixon announced that the rate of increase of inflation was decreasing. This was the first time a sitting president used the third derivative to advance his case for reelection.
-=Hugo Rossi=-
User avatar
VilleK
Site Admin
Posts: 2274
Joined: Mon Jan 15, 2007 4:50 pm
Location: Stockholm, Sweden
Contact:

Post by VilleK »

Beta updated with your changes. I've added a checkbox to disable the preview until we figure out how to make it go faster.

Just tried your example and it looks real nice!

One thing I observed is that the swirly patterns in the colored areas are changing depending on bitmap resolution. Do you know why this happens? The code should be resolution independent right?
kattle87
Posts: 402
Joined: Wed Sep 26, 2007 9:06 am
Location: Italy

Post by kattle87 »

Nope! The code is not yet reso-independant! =)
The problem is mainly the border size and the blur radius! In fact I'm thinking albout how to make it reso-independant. Let's say that the border might also be not res-indip but we must fix the blur (it is easy and I will do it after the exams, toghether with the speed-up, I already know how to do (it's the same way TG does, BTW)).

In TG and other editors we have no such concerns since the whole generation is made at fixed texture size :P
In the fall of 1972 President Nixon announced that the rate of increase of inflation was decreasing. This was the first time a sitting president used the third derivative to advance his case for reelection.
-=Hugo Rossi=-
User avatar
jph_wacheski
Posts: 1005
Joined: Sat Feb 16, 2008 8:10 pm
Location: Canada
Contact:

Cool!

Post by jph_wacheski »

wow quite cool!

Some strangeness still could be worked out of it,. the res. independance issue for one,. and some settings produce a black image? (tg2, cob, stripes) also tg3 has no boarder pixels,. is that just the nature of the maths,. or bugs? Well whatever,. still some nice work and very usefull ;)

Check that attached sample texture, procedural castle/dungon crawler go!!!
Attachments
dungon_walls_000.zgeproj
.zgeproj some castle walls in that,. . sweet
(1.07 KiB) Downloaded 767 times
iterationGAMES.com
kattle87
Posts: 402
Joined: Wed Sep 26, 2007 9:06 am
Location: Italy

Post by kattle87 »

Actually, yes. Some math requires that most of the styles will get some problems when used with stripes. However I can see you managed to get exactly what I was thinking about when I was making the cobblestones. JPH your ability of using this editor is pretty astonishing IMHO, you came up with excellent stuff rather quickly :D
In the fall of 1972 President Nixon announced that the rate of increase of inflation was decreasing. This was the first time a sitting president used the third derivative to advance his case for reelection.
-=Hugo Rossi=-
Post Reply