Author Topic: [c#] Control for OpStacking  (Read 5633 times)

0 Members and 1 Guest are viewing this topic.

Offline va!n

  • Pentium
  • *****
  • Posts: 1435
  • Karma: 109
    • View Profile
    • http://www.secretly.de
[c#] Control for OpStacking
« on: October 04, 2010 »
I am trying to work on an own small texture generator with a simple GUI using OpStacking as known from Werkkzeug by Farbrausch (great inspiration, thx!)

Since i am new to C# and trying this as my first C# based tool, i am not really sure whats the best way to code such a OpStacking-Grid Control like in Werkkzeug! If someone can help me what Control(s) would be the best and/or where to start i would be really happy!

Atm for concept design i am using just flat Buttons but i think to have a nice and flexible own OpControl, i need to code an own Control and Draw all stuff with GDI/GDI+ !?

I am not sure if i get manage this... but it would be nice project to get back some motivation and i will give it a try ;)


PS: Is there any control in C# with horizontal and vertical scrolling bars, i can use of the OpStack control?

Here you can see a first design concept (nothing working yet)
http://www.secretly.de/vip/dbf/GUI_TextureGen1.zip



PS: The horizontal splitter bar under the 256x256 black rect is not shown... (cant fix it... i have no idea why does it happens)
- hp EliteBook 8540p, 4 GB RAM, Windows 8.1 x64
- Asus P5Q, Intel Q8200, 6 GB DDR2, Radeon 4870, Windows 8.1 x64
http://www.secretly.de
Challenge Trophies Won:

Offline Jim

  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 5301
  • Karma: 402
    • View Profile
Re: [c#] Control for OpStacking
« Reply #1 on: October 04, 2010 »
What is an "OpStacking-Grid Control"?  That doesn't mean much to me.

You've obviously set yourself a task.  Have you got the computation working but are looking for a good UI solution, or is this something you need help with from ground up?

Why do you want to build another texture generator?  There must be some good ones out there.

Jim
Challenge Trophies Won:

Offline va!n

  • Pentium
  • *****
  • Posts: 1435
  • Karma: 109
    • View Profile
    • http://www.secretly.de
Re: [c#] Control for OpStacking
« Reply #2 on: October 04, 2010 »
@Jim:
Thanks for your feedback... I dont know what i should call the element (control) where the user can add/remove/arrange the ops to generate stuff... It should be the area where you can see in my app the dark grey grid with two possible OP controls... (as you may know from Werkkzeug - the work area)...

I'am not sure what the best way to create/build a control that is something simular of use...

Yes, i set myself a (possible not very easy) task and i have an image in my brain of how does it should work/look like later (also set of features).

I did some basic generators like  Rect, Glow, Noise i.e. first and they are working... Now i have two think about 2 points:

a) How to create a UI for the texgen with C# that works like in Werkkzeug...
b) How to handle all the generators and trees to generate the texture... (i think i will use Lists)

The question, why i want to build another (my own) texture generator is just very simple...

a) I like this stuff since years and so it would be pure fun for me to code an own texgen...
b) I like to see and understand how things works and write my own generator instead just using someones texgen where are possible some things (features) missing and/or you cant use the datas to generate stuff at runtime in your own prods...
c) Using an own texgen gives me the possibility to add missing features or change things and at least it gives me the posibility to use the generator engine and its datas in my own prods!
d) fun fun fun ;)

- hp EliteBook 8540p, 4 GB RAM, Windows 8.1 x64
- Asus P5Q, Intel Q8200, 6 GB DDR2, Radeon 4870, Windows 8.1 x64
http://www.secretly.de
Challenge Trophies Won:

Offline hellfire

  • Sponsor
  • Pentium
  • *******
  • Posts: 1294
  • Karma: 466
    • View Profile
    • my stuff
Re: [c#] Control for OpStacking
« Reply #3 on: October 04, 2010 »
I guess the actual generator-code will be C/C++ so why did you choose C# for the GUI part ?



Challenge Trophies Won:

Offline LittleWhite

  • Senior Member
  • Amiga 1200
  • ********
  • Posts: 418
  • Karma: 31
  • It's me!
    • View Profile
Re: [c#] Control for OpStacking
« Reply #4 on: October 04, 2010 »
Maybe because the C# .NET is easy to handle for UI ? ...

I am a bit lost in what you want to do ... something like werkzeug for texture generation ... hum ...
Do you use the designer ( Visual Studio Designer , for you app )

Where is your problem ( ok, I am probably lost since the beginning )
The demoscene will never die, never!

Offline va!n

  • Pentium
  • *****
  • Posts: 1435
  • Karma: 109
    • View Profile
    • http://www.secretly.de
Re: [c#] Control for OpStacking
« Reply #5 on: October 04, 2010 »
@hellfire:
I moved completly over to C#... And no, the first generator tests/code are done in C# and work well for a first test. So the UI and even later the full generator/filter stuff will be done in C#

@LittleWhite:
I want to code my own texture generator and i think/found out that the UI like in Werkkzeug (window splitted into 3 parts == TexturePreview, Settings for each Op (sliders), and at least the most important part where the user cann add/remove/combine Ops by boxes) would be the best way.

Yes i am using VS2008 and its FormDesigner...

My problem is something more like some questions...

a) What's the best way (WinForm Control(s)?  OwnControl with OwnDrawing) to code something like in following screenshot:



b) Whats the best way to handle all the stuff to generate the texture.... Array or List i.e.... I will think about..

 
- hp EliteBook 8540p, 4 GB RAM, Windows 8.1 x64
- Asus P5Q, Intel Q8200, 6 GB DDR2, Radeon 4870, Windows 8.1 x64
http://www.secretly.de
Challenge Trophies Won:

Offline Jim

  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 5301
  • Karma: 402
    • View Profile
Re: [c#] Control for OpStacking
« Reply #6 on: October 04, 2010 »
You can do it all using standard Windows controls, but...You really, really need to nail your data structure first, and how your code will then parse that data structure into a texturemap.

Jim
Challenge Trophies Won:

Offline LittleWhite

  • Senior Member
  • Amiga 1200
  • ********
  • Posts: 418
  • Karma: 31
  • It's me!
    • View Profile
Re: [c#] Control for OpStacking
« Reply #7 on: October 04, 2010 »
From my point of view, a list is better than an array

After I have searched for something with scroll bar, but didn't find it at first glance ... :s sorry
The demoscene will never die, never!

Offline Jim

  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 5301
  • Karma: 402
    • View Profile
Re: [c#] Control for OpStacking
« Reply #8 on: October 05, 2010 »
List on its own isn't going to be enough if Va!n wants anything like the diagram he shows.  He's going to need a tree or a graph, depending on how he wants to combine all the bits, and that will have to be composed from simpler lists and other objects.  This is why it's important to design the whole thing before starting to code.

I suggest starting with something a bit simpler.  I'd try a list of fx with add or multiply to combine them together, where you can add or remove one fx at a time.

Jim
Challenge Trophies Won: