May 24, 2019, 11:20:16 PM

Author Topic: Something Tasty...  (Read 530 times)

Offline iWasAdam

  • Hero Member
  • *****
  • Posts: 1066
Re: Something Tasty...
« Reply #15 on: May 14, 2019, 08:01:33 AM »
and taking a very simple cube. I created this mess:


just extruding and modifying the resulting faces.

I know that Derron will jump in about Blender - but this slightly misses the point - I did this with my own code (pst there's no gl code in it either - this is all 2d)  ;D

Offline Derron

  • Hero Member
  • *****
  • Posts: 2087
Re: Something Tasty...
« Reply #16 on: May 14, 2019, 08:57:33 AM »
I am a bit afraid that you loose your focus (game) or development flow by creating the tools.
Nonetheless I understand the interest in creating such stuff here and there.


bye
Ron

Offline grindalf

  • Jr. Member
  • **
  • Posts: 61
Re: Something Tasty...
« Reply #17 on: May 14, 2019, 09:02:14 AM »
You say this is all 2D but am I missing the point here? haven't you just written a 3D engine? Pretty much the exact same way any other 3D engine handles polygons?

Your vertices still have 3 positions(x,y,z) and your triangles are still connected to 3 of these vertices just like normal 3D right?

Not trying to downplay what you have achieved here just trying to figure out whats going on

Offline Derron

  • Hero Member
  • *****
  • Posts: 2087
Re: Something Tasty...
« Reply #18 on: May 14, 2019, 09:23:40 AM »
It's the same 3D as in "Alone in the Dark" (early 90s) or some SNES games (Star Fox). It does not utilize the 3D space offered by OpenGL, DX ... but should be able to render straight on a canvas.
So some kind of "software renderer" ?


bye
Ron

Offline iWasAdam

  • Hero Member
  • *****
  • Posts: 1066
Re: Something Tasty...
« Reply #19 on: May 14, 2019, 10:17:04 AM »
Simple terms yep. It’s a 3D engine (but not using 3D hardware) that takes care of the actual 3D display - so it can be displayed on a simple 2d canvas.

The depth sorting clipping, etc, all have to be programmed - there is no gpu to do all that for you.

The more complex answer is this is the actual 3D editor system itself. Where you can create 3D models - in a particular way.
The above instances to do with extrusion, etc are not simple things to code from scratch - hence using a3d editor like blender is the way most people do it.


Offline GaborD

  • Sr. Member
  • ****
  • Posts: 259
Re: Something Tasty...
« Reply #20 on: May 14, 2019, 11:51:28 AM »
Really great stuff, very useful approach for projects that can't rely on using 3D hardware.
And a cool way to quickly model in-engine, that's a fantastic feature to have.



Offline iWasAdam

  • Hero Member
  • *****
  • Posts: 1066
Re: Something Tasty...
« Reply #21 on: May 14, 2019, 12:34:43 PM »
@Gabor - what would be a useful export format for you?

Offline GaborD

  • Sr. Member
  • ****
  • Posts: 259
Re: Something Tasty...
« Reply #22 on: May 15, 2019, 01:02:15 AM »
In this case I would say OBJ is simple to implement and has everything you need.

Offline iWasAdam

  • Hero Member
  • *****
  • Posts: 1066
Re: Something Tasty...
« Reply #23 on: May 15, 2019, 12:51:27 PM »
obj shouldn't be a problem. I've already got an imported, so I can use that as a base.

Got scale, move and rotate sorted as well as quad filliping (where you can change the ordering of triangles in a quad)
Now starting to move into the UI side of things:


You can see here the wireframe shape in the 3d view with the 3 vertex handles added. these will light up when you are over them and click/drag will perform the 'current' operation on the selected object faces.

With the previous incarnations of 3d editors I was doing a lot of odd calculations to convert back and from the gpu. Currently all of these are missing. No reverse Y, etc.

One thing I'm starting to notice is speed - it feels very fast! maybe a hybrid approach is a good concept?

Offline iWasAdam

  • Hero Member
  • *****
  • Posts: 1066
Re: Something Tasty...
« Reply #24 on: May 16, 2019, 12:46:21 PM »
lots of behind the scenes stuff. first test of adding UI bits into the mix - just a simple color palette:


I've also made the 'views' into separate code which means that are independent and can be scaled in size, hidden, etc. And also been bug hunting and fixing things

Offline iWasAdam

  • Hero Member
  • *****
  • Posts: 1066
Re: Something Tasty...
« Reply #25 on: May 17, 2019, 08:54:02 AM »
As this is really the second version of the 3d editor. it's now got the name Rameses II !
The UI will 'generally' resemble Rameses, but with a lot more functionality.
First up is the more customisable UI with separators allowing you to have different window sizes:


The top toolbar is now replaced with the vertical one - same as with my other editors - and also the left panel will follow more with the new editors

Offline iWasAdam

  • Hero Member
  • *****
  • Posts: 1066
Re: Something Tasty...
« Reply #26 on: May 17, 2019, 03:17:07 PM »
Ui is now starting to appear... And it's fully functional too  ;D

Offline iWasAdam

  • Hero Member
  • *****
  • Posts: 1066
Re: Something Tasty...
« Reply #27 on: May 18, 2019, 08:32:58 AM »
I thought this might be interesting to see:


It's part of the UI that i've not ever used before - multiple pages. in this case one page is the toolbar and other main UI, the other page is the color selector and color buttons etc.

Here's the code:
Code: [Select]
AppView.AddPage( UIPage )
AppView.AddPage( ColorPage )

ColorPage.PageAlpha = 0.25
ColorPage.IsActive = false

it should be obvious what is going on? The color page and all it's controls have a base alpha value and all controls are then set to not respond to user input - in effect disabling them  :o

Pages can be accessed at any time, so things can be moved, made active etc with just a click or code - the UI will respond immediately.

Offline iWasAdam

  • Hero Member
  • *****
  • Posts: 1066
Re: Something Tasty...
« Reply #28 on: May 22, 2019, 06:23:03 AM »
okydoke...
the color selector/mixer has now been finished.
Here is a side by side comparison of the original Rameses version with the new one:


I know that Derron has always suggested that the flat buttons were possibly confusing so I've added a frame to buttons.

Just finished the modify and random code for the models - but it is all working very well :)

Offline Derron

  • Hero Member
  • *****
  • Posts: 2087
Re: Something Tasty...
« Reply #29 on: May 22, 2019, 07:09:48 AM »
Nitpicking is all I can do for now to help you in your project:
- "tabber" ( |A|B|C| on top) "highlight" has his borders outside (decreasing width of "B" making it look more narrow than other buttons
- color-palette selection rect has outside borders too (making it look less clean because it now hides the separation borders). This _might_ work if the grid-line-width was the same than the highlight, now it is a mix which looks ...odd.
- color-palette has ... varying line width (might be a scaling thing) just check row1-2-splitter and row2-3-splitter
- color-palette starts left "earlier" than it ends on the right side (comparing purple header with the palette rects below) maybe give it some place to breathe on the left side ?
- you might play with "inset"-styles for the color-gradient-range-slider-things to somehow integrate them (or give them a simple "slight border")
- buttons with color rects in it: alignment is 1 pixel too far to the top
- without measuring but it looks as if the button labels are not vertically centered too (baseline) looks at least "visually" also a pixel too far down
- the "background foreground"-widget (white rect in the back and red in the foreground) exposes a skipped pixel in the top left of the red-colors "black outline"
- Icon in the top left ("open file") looks a bit flat - it needs some element to "pop out" more (like an [semi-transparent] outline or shadow - or darker colors)
- handles on the gradient selectors are a bit "too wide" - maybe add some kind of "needle" to the center (from top and bottom) so you know exactly what you are hitting?
- if the handle there uses its center to decide the color: how to select the most right or most left part of the slider? (see the "gray to red" widget)

Buttons look way better than in "Rameses (I)"

Do not feel offended by the nitpicking, as said it's all I can do for now (except you have some specific questions/discussion topics).




bye
Ron