AROS Exec

Distros => Icaros Desktop => Topic started by: miker1264 on June 21, 2019, 12:15:53 AM

Title: 3D Modeler for Icaros
Post by: miker1264 on June 21, 2019, 12:15:53 AM
Icaros Desktop needs a 3D Modeler and Renderer similar to this to showcase it's versatility in rendering & displaying grahics.

There's an open source project available with Amiga 68k source code with similar capabilities. It's somewhat modular with a Modeler Window, Renderer & an Image Viewer that can also act as a standalone module for loading & displaying images. It was similar to and contemporary with LightWave 5.0 & Imagine. It specialized in a rendering technique called "Ray Tracing".

I managed to get the Amiga version setup and running in OS 3.9 last night. It uses Cybergraphx & Storm Mesa. I was able to open the Modeler Window to access the Main Menu but when I tried to render a scene it froze. I suppose I'm missing a part. I'll re-examine the Amiga source code to see what it's doing at that point.

I have set up an AROS project to revise & recompile the Loader & Viewer modules. Once that is complete & working on Icaros I will focus on the Modeler & Renderer. While I'm revising parts of it I'll make a few enhancements while keeping the core functions the same. I especially would like to add more picture types to save rendered images including saving to HAM6 & HAM8.

Because it's similar to 3DS R4 and it accepts 3DS files I'd like to re-name the Icaros version to "RayTrace Studio" with new icons.

Even if it only renders gold balls, or glass marbles, or a clown juggling silver balls, that's a good start. I made a new shiny icon for the Modeler & I plan to make one for the standalone Viewer as well. I always wanted to use the AROS symbol for an app icon. ;)
Title: Re: 3D Modeler for Icaros
Post by: miker1264 on June 21, 2019, 12:17:39 AM
Another sample.
Title: Re: 3D Modeler for Icaros
Post by: trekiej on June 21, 2019, 03:01:40 AM
Excellent!
Title: Re: 3D Modeler for Icaros
Post by: salvatore on June 21, 2019, 08:09:27 AM
 ;)
Title: Re: 3D Modeler for Icaros
Post by: Zevs on June 21, 2019, 08:19:18 AM
There is also RayStorm. That would be perfect for AROS 8)
Title: Re: 3D Modeler for Icaros
Post by: salvatore on June 21, 2019, 08:25:48 AM
it's this the code who use
Title: Re: 3D Modeler for Icaros
Post by: salvatore on June 21, 2019, 08:27:54 AM
for icon add is after resize, include an example
Title: Re: 3D Modeler for Icaros
Post by: miker1264 on June 21, 2019, 09:44:46 AM
Nice. Good idea. Thank you.

This AROS icon would be appropriate for the recompiled version of the RayStorm viewer.

The Gold icon I showed earlier is for the Modeler.

I'll work more on the Viewer this weekend to get the Viewer working on Icaros Desktop. :)
Title: Re: 3D Modeler for Icaros
Post by: salvatore on June 21, 2019, 11:07:22 AM
ok  :)

thank you

ps.attemp first july ;)
Title: Re: 3D Modeler for Icaros
Post by: dizzy on June 21, 2019, 01:40:40 PM
I'd like to see open sourced implementation for Fusion 360 like application. I've used the Fusion 360 quite a lot for my CNC milling and the gui is really intuitive.

https://www.autodesk.com/campaigns/fusion-360-learning/webinar-gettingstarted

I once made a STL viewer for AROS but I no longer have the source code, It may be somewhere but don't remember where...

It was ment to do more but I lost interest for it. It would need a ray cast to select objects etc. and ofcourse STL slicer for 3d printing.

We can do more with AROS and OpenGL now than what was possible back then. For example the Fusion 360 uses "cartoon like shader" to show the outlines of an object. OpenGL just does that for us without too much code.

https://youtu.be/VEp94WwAZjk
https://youtu.be/j2EcpCf4_kM

Here's a video for the STLView MUI/Zune class

https://youtu.be/CNUyA0DPFBs
https://youtu.be/DiB_WCnrcAY

If you can find the source for it then do whatever you like with it.
Title: Re: 3D Modeler for Icaros
Post by: salvatore on June 21, 2019, 02:32:17 PM
I think better to focus on this project first without offense, I personally asked for the port of raystorm to Miker and I told him that I will support him financially and I will do it

hi
Title: Re: 3D Modeler for Icaros
Post by: dizzy on June 21, 2019, 02:51:22 PM
No offense taken what so ever  :) I just tought that it might be difficult to translate m68k code to C. We can easily bypass a lot of code by using C and OpenGL and MUI/Zune classes. Let the GPU do the work that was done by CPU previously.

I have to admit that I don't know the inner workings of RayStorm, but if it would be possible to use OpenGL instead of the old Amiga libraries then I would use the OpenGL. It is not going to go anywhere for a while. Also we get the software renderer for free and if there is OpenGL capable GPU then it uses it. Also the VBO is a must. Just send the vertices to GPU once and then tell from where to render the scene and how. From my videos it might not be clear but the scene doesn't need to be updated at the monitor refresh rate, only when the viewpoint changes. When nothing moves then there is nothing to do.

Deadwood would be the best to answer for the implementation of OpenGL on AROS. I have spawned multiple of of MUI/Zune STLView classes on the same program and it worked ok as MUI/Zune renders the scenes in turns. Might not be safe on SMP.

http://www.songho.ca/opengl/gl_vbo.html

Using VBO it is possible to send the vertices to GPU and for the different scenes X/Y etc. just use the same buffer but with a different viewpoint. Fast as hell...
Title: Re: 3D Modeler for Icaros
Post by: miker1264 on June 21, 2019, 03:47:47 PM
Thank you. Lots of good information.

RayStorm m68k uses StormMesa.
Title: Re: 3D Modeler for Icaros
Post by: dizzy on June 21, 2019, 03:51:43 PM
Thanks,

I'm not sure if this still compiles, but I think this the most up to date source that I have.

https://www.dropbox.com/sh/eufyjclxxqijub9/AACTKnCqbDDt3YXYT9wgQShIa?dl=0
Title: Re: 3D Modeler for Icaros
Post by: paolone on June 21, 2019, 04:11:58 PM
I like the idea of a 3D modeler. Although the best option would be porting Blender to AROS (there is a OS4 version... so it shouldn't impossible to port), I can perfectly understand it would be a huge task to perform.
So please port what's more comfortable to you: having a simple modeler is far better than having NO modeler. :-)
Title: Re: 3D Modeler for Icaros
Post by: dizzy on June 21, 2019, 04:17:11 PM
I like the idea of a 3D modeler. Although the best option would be porting Blender to AROS (there is a OS4 version... so it shouldn't impossible to port), I can perfectly understand it would be a huge task to perform.
So please port what's more comfortable to you: having a simple modeler is far better than having NO modeler. :-)
Thumbs up and good luck! For the STLView code you can use it at will (public domain now after) an make it actually do something useful. Do with it what you want. Thank Deadwood for the inner workings... :)
Title: Re: 3D Modeler for Icaros
Post by: salvatore on June 21, 2019, 04:33:38 PM
guys it's gonna be a great job, believe me ;)
Title: Re: 3D Modeler for Icaros
Post by: miker1264 on June 21, 2019, 04:39:38 PM
paolone,

I agree that a more modern 3D modeler like Blender which I believe originated on the Amiga as "Traces/Blender" would be optimal. But we have to start somewhere. Once RayStorm is working on AROS the sources will be available so that we will have a good understanding of what is involved.
Title: Re: 3D Modeler for Icaros
Post by: salvatore on June 21, 2019, 04:50:27 PM
yes I know that only currently has abandoned the old rendering engine, this means that raystorm is not antiquity
Title: Re: 3D Modeler for Icaros
Post by: salvatore on June 21, 2019, 04:53:29 PM
it seems to me that cmq must first bring phyton to a certain version that I do not remember and then put hand to the code of blender, so I make you think about the work that there would be to do
Title: Re: 3D Modeler for Icaros
Post by: dizzy on June 21, 2019, 06:08:26 PM
There was a limit on the size of the VBO buffer, but not on the number of buffers if I recall it correctly. If one object exceeds the buffer then another buffer needs to be allocated for the object... There might be some bugs on the STLView code such that the VBO is loaded everytime the scene is updated, but it isn't relly needed... :) Also the code doesn't check if the vertices/STL file is/are valid. See else where the STL definition...

It doesn't take much to show one single 3D rendering on AROS, but for multiple of objects some sort of allocator is needed for the objects in VBO. When the renderer is coded in object oriented way then it just starts to work. Render this and render that... Like magic...
Title: Re: 3D Modeler for Icaros
Post by: salvatore on June 21, 2019, 06:14:28 PM
as I understand it miker has a certain dime on these programs, there will be no problems dizzy

hi
Title: Re: 3D Modeler for Icaros
Post by: dizzy on June 21, 2019, 06:25:19 PM
as I understand it miker has a certain dime on these programs, there will be no problems dizzy

hi
Great! But if there is anything he needs I hope we can help him forwards.
Title: Re: 3D Modeler for Icaros
Post by: salvatore on June 21, 2019, 06:30:32 PM
So far, everything's fine
Title: Re: 3D Modeler for Icaros
Post by: terminills on June 21, 2019, 09:14:05 PM
https://github.com/Kalamatee/RayStorm
Title: Re: 3D Modeler for Icaros
Post by: miker1264 on June 21, 2019, 09:15:45 PM
Having a good understanding of Open GL and the rendering process is important but my main goal is to revise and compile the source code to work on AROS at the moment. If AROS meets the requirements such that StormMesa and the AROS implementation are compatible when compiled for AROS it should work. At that point if it doesn't then I'll look further to find out what's needed. 

But for the moment all is going well.
Title: Re: 3D Modeler for Icaros
Post by: miker1264 on June 21, 2019, 10:06:56 PM
terminills,

Thank you. I'll update my sources to reflect the recent changes to kalamatee's repository.
Title: Re: 3D Modeler for Icaros
Post by: salvatore on June 21, 2019, 10:20:11 PM
I'm glad the work is going well ;)
Title: Re: 3D Modeler for Icaros
Post by: salvatore on June 21, 2019, 10:59:52 PM
I'm sorry I didn't know about the kalamatee github
Title: Re: 3D Modeler for Icaros
Post by: miker1264 on June 24, 2019, 07:22:06 AM
Here is the new Image Viewer, a sample image, the source code
and some new icons for the Modeler Component and the Viewer.

The Original RayStorm Image Viewer was outdated & was based
on older techniques intended for a Non-Amiga-Like operating
system using some so-called "Libraries" to read picture files.

That process seemed to not take advantage of the power of the
Picture DataTypes while utilizing them only as a “last resort”.
The New Image Viewer would use Picture DataTypes for
all it functions making it more flexible & also more efficient.

It now supports whichever Picture Types that the AROS Picture
DataTypes can read, meaning all ILBM file types as well as HAM6,
and HAM8 images, & also GIF, BMP, JPG, PNM, PNG, PCX & TGA.
Additionally, it now displays images with 32 bit RGB + Alpha.

Whenever a new Picture DataType is available for AROS, including
the newest SVG, or a future TIFF, or anything else, the New Image
Viewer will be capable of using the DataTypes to display those
Picture Types without any revisions to the current source code.

In short, the New Image Viewer is more efficient, more inclusive
& more extensible. Like the "Viewer" it's a standalone component.
There are probably some areas where it can be optimized. I put it
together in about four hours this weekend. The icon took another
hour to put together. Next I'll move on to the Modeler Component.

Try out the image viewer & let me how it works for you. I've tested
the New Image Viewer on Icaros Hosted on Windows & Icaros Native.

Title: Re: 3D Modeler for Icaros
Post by: miker1264 on June 24, 2019, 07:29:39 AM
To use the New Image Viewer just copy it along with its icon to a directory.

Double-Click the App Icon each time & a file requester will pop up to open a picture file.

When you are done viewing the file use the Close Gadget. It's small & simple. No menu.
Title: Re: 3D Modeler for Icaros
Post by: salvatore on June 24, 2019, 12:18:35 PM
Hi Miker ok now I'm trying, great cooperation, you're doing a great job, I have no have words for this :)
Title: Re: 3D Modeler for Icaros
Post by: salvatore on June 24, 2019, 01:22:31 PM
I wanted to ask you a courtesy, but if it is not what we say complicated and that makes you waste a lot of time, since icaros in the next versions will be 64-bit, as soon as you finish everything see if you can make a compiled, but if it is complicated let it go, we hear the first of July with paypal ;)
Title: Re: 3D Modeler for Icaros
Post by: miker1264 on June 24, 2019, 02:26:04 PM
I'm mostly trying to get RayStorm working on ABIv0 first. Then focus on 64 bit.

The source code is included if anyone wants to compile for 64bit in the meanwhile.
Title: Re: 3D Modeler for Icaros
Post by: salvatore on June 24, 2019, 04:21:59 PM
exactly ok :)
Title: Re: 3D Modeler for Icaros
Post by: miker1264 on June 24, 2019, 07:05:27 PM
The Image Viewer is the first step. There is room for improvement there as well. Although it sets a minimum size there's no maximum size. It doesn't check whether the image is larger than the screen and there's no way to navigate if it is larger.

Maybe we can use Arrow Keys to pan up, down, left and right to see the entire image. In a near future revision maybe I could add Horizontal and Vertical Scroller Gadgets to accomplish that.
Title: Re: 3D Modeler for Icaros
Post by: miker1264 on June 24, 2019, 07:07:41 PM
Although I haven't even started on the Modeler Component for RayStorm, I have begun to think about future enhancements.

Just like AROS has one foot in the past, one foot in the present, and an eye towards the future, we have to think about the present and the future. Wouldn't it be great to use RayStorm 3D Modeling to create and interact with 3D Design Files for 3D Printing?

3D Printing may not be the "kilker app" that attracts people to use Icaros Desktop, but it may be one reason among many reasons.

Also, if isn't already possible, we should make it possible for the Main Window to be Full Screen to make use of large screens.
Title: Re: 3D Modeler for Icaros
Post by: salvatore on June 24, 2019, 08:32:28 PM
I do not know, I think that new features are well appreciated, you are definitely working in full screen is another thing, better I would say

hi miker
Title: Re: 3D Modeler for Icaros
Post by: miker1264 on June 24, 2019, 09:36:14 PM
My next objective is to spend the next week or so trying to get the Main Window with all the buttons and Menu Items to appear on screen in Icaros Desktop. It is based on MUI 3.3 and I believe I read some documentation that stated that the AROS implementation of MUI is 3.8 compatible.
Title: Re: 3D Modeler for Icaros
Post by: salvatore on June 24, 2019, 10:20:47 PM
excellent, yes mui is compatible, I tested the program time ago on os 3.1
Title: Re: 3D Modeler for Icaros
Post by: salvatore on June 25, 2019, 01:51:34 AM
horewer there is not the support for printin but maybe the printer 3d support postscript protocol but do not say if work well
Title: Re: 3D Modeler for Icaros
Post by: dizzy on June 25, 2019, 07:43:20 AM
The Image Viewer is the first step. There is room for improvement there as well. Although it sets a minimum size there's no maximum size. It doesn't check whether the image is larger than the screen and there's no way to navigate if it is larger.

Maybe we can use Arrow Keys to pan up, down, left and right to see the entire image. In a near future revision maybe I could add Horizontal and Vertical Scroller Gadgets to accomplish that.

There's some input code in the STLView. It also prevents menus to appear when right mb is pressed and uses iirc the mouse wheel. Left mouse button moves things around.

Would be more intuitive to use mouse for moving the picture. There could still be scrollers also.
Title: Re: 3D Modeler for Icaros
Post by: salvatore on June 25, 2019, 09:21:58 AM
is still very primitive the thing, it takes at least two months of development, to have the program finished, bring patience

hi
Title: Re: 3D Modeler for Icaros
Post by: miker1264 on June 26, 2019, 05:24:48 AM
The Image Viewer is the first step. There is room for improvement there as well. Although it sets a minimum size there's no maximum size. It doesn't check whether the image is larger than the screen and there's no way to navigate if it is larger.

Maybe we can use Arrow Keys to pan up, down, left and right to see the entire image. In a near future revision maybe I could add Horizontal and Vertical Scroller Gadgets to accomplish that.

There's some input code in the STLView. It also prevents menus to appear when right mb is pressed and uses iirc the mouse wheel. Left mouse button moves things around.

Would be more intuitive to use mouse for moving the picture. There could still be scrollers also.

Yes, using the mouse movement to scroll is a good idea. Using Arrow Keys or Scoller Gadgets is also good. Maybe a combination of all three would be optimum to allow the user to choose.
Title: Re: 3D Modeler for Icaros
Post by: miker1264 on June 26, 2019, 05:55:46 AM
Recently I've been doing some research as far as MUI 3.8 and Zune classes.

I've also been looking into different rendering techniques such as Scan Line vs Ray Tracing and the benefits and drawbacks of each. I had hoped to examine the rendering engine at a later point in the process, but I suppose having a good idea of what is going on in the program up front is good.

It seems that 3D Modeling has a mathematics, a science and a lingo all its own. For example in 2D space a pixel is represented by coordinates x, y. But in 3D space a voxel has x,y,z coordinates. The Octree Method is one of many to divide the 3D scene into triangles (vertices?) that are sent for further processing. Other methods such as "frustum culling" are used to sort and eliminate hidden or obscured triangles from the selection.

There is RayStorm and Lightwave modeling. There is Sculpt 3D and there is POV-Ray modeling. There is also a technique to convert 3D Meshes used in RayStorm and other programs into STL Meshes for 3D Printing. That last part is very interesting.

But as far as RayStorm the part that concerns me is Input and Output. What kind of 3D Meshes are used and what type of pixel data is written to file? Judging by the original file formats, JPG, TGA, PNG, ILBM Deep Images the output is likely just RGB. To get 32bit RGB + alpha requires image post processing in another program to add alpha and alpha blending with the backgroud.

But the Image Viewer is now capable of displaying 24bit or 32bit or anything else. By the end of the week I'll start working on the Main Window with the buttons, child windows and menus for the Modeler Component.

So, as you can see, it's a lot of work. But it's beneficial as well.
Title: Re: 3D Modeler for Icaros
Post by: salvatore on June 26, 2019, 09:07:13 AM
Great :D

thank's Miker
Title: Re: 3D Modeler for Icaros
Post by: miker1264 on June 28, 2019, 07:15:46 PM
I have started the Modeler part of the RayStorm project. I'll work more on it this weekend to get the Main Window with a RayStorm menu system up and running.

It will just be a simple Project Window and menu to load a scene and render it. It's just a proof of concept to test the rendering engine on AROS.

After I'm satisfied that the renderer works I'll focus on making the User Interface more User Friendly while adding the rest of the original functionality and that also involves MUI code.
Title: Re: 3D Modeler for Icaros
Post by: salvatore on June 28, 2019, 07:25:19 PM
well :)
Title: Re: 3D Modeler for Icaros
Post by: miker1264 on June 29, 2019, 08:59:16 PM
Here is a Conceptual Layout for the Updated User Interface for RayStorm Studio (AROS version).

The Image Buttons at the top are inspired by MUI Sample "The Bar". The ButtonBar Menu at
right is inspired by Lightwave 5.0 & 5.6. The StatusBar is from RayStorm Scenario (Amiga version).

I'm designing a colorful About Box for RayStorm as well that gives credit to the original authors.

The first step is to setup a test for the Rendering Engine (Scenario?) by Loading a Scene & Rendering.
When I'm sure the Renderer works as expected then I can focus on menu items & the user interface.
Title: Re: 3D Modeler for Icaros
Post by: salvatore on June 29, 2019, 09:29:19 PM
great work on your part thanks, very nice layout of the program,I hope to be mentioned in the contributors :D
Title: Re: 3D Modeler for Icaros
Post by: miker1264 on June 29, 2019, 10:59:56 PM
great work on your part thanks, very nice layout of the program,I hope to be mentioned in the contributors :D

For sure. I've already considered that.

Credit and aknowledgements will be given.
Title: Re: 3D Modeler for Icaros
Post by: miker1264 on June 30, 2019, 10:14:54 AM
After reading through the source for RayStorm I've discovered a few interesting things. I've also found the elusive "Golden Ray" of Ray Tracing.

First, the Project File (.scn) is actually an IFF File much like an IFF-ILBM. It's perhaps an IFF-RSCN. That makes it easier to find the chunk id's and chunk data. Second, inside the Preview.cpp module are several helper functions and two main functions called RenderLines which should be "RenderLine" since it renders one ScanLine, and CalcPixel which does what it's name implies.

These two core functions using intense mathematics translate al the data from 3D objects, surfaces, textures, reflection maps, lighting intensities, and camera angles into 2D pixel data for each rgb pixel of each scanline.

In addition to that I noticed that the style in which the program is written lends itself more to being converted to C# code than anything else. Like C# it uses Classes, Threading, BackGround Workers, Timers for Elapsed Time, Event Handlers, Callback Functions for ProgressBars, and Passing Data between Forms which in RayStorm are Window Classes. Just an interesting observation about the similarities between C++ and C#.

To summarize, if you aren't a programmer, let's just say I found some really cool stuff. ;)
Title: Re: 3D Modeler for Icaros
Post by: salvatore on June 30, 2019, 10:50:58 AM
interesting, I hope it is a work appreciated by all and a native program and this makes it even more palatable, thanks miker :D
Title: Re: 3D Modeler for Icaros
Post by: miker1264 on June 30, 2019, 07:49:16 PM
Here is the new AROS RayStorm Splash Screen.

The purpose of the Splash Screen is to allow the user to start
a new project, open an existing project, show version text, or
more importantly choose the program windows size to match
the screen size being used. It's also an improvement on the
original RayStorm Logo seen at the bottom of second image.
Title: Re: 3D Modeler for Icaros
Post by: wawa on June 30, 2019, 09:27:32 PM
id wait with this till the app can deliver some proper results and showcase it here, like back lighted aros logo type with some volumetric lighting.
Title: Re: 3D Modeler for Icaros
Post by: salvatore on June 30, 2019, 09:36:59 PM
good miker, I don't have any words for the work you're doing and you're a great programmer :),I like to read the evolution and progress of the porting :D
Title: Re: 3D Modeler for Icaros
Post by: salvatore on June 30, 2019, 09:53:13 PM
@wawa miker told me that it takes at least two months to complete the program, now a little less ;)
Title: Re: 3D Modeler for Icaros
Post by: miker1264 on July 01, 2019, 01:23:38 AM
wawa is correct.

Making the program work will be the hard part. The extras will come later.

My first language is C# and so C code, C++ are my second languages.

Sometimes I struggle with the simplest things in C/C++.

I have been using C# in Visual Studio for about 10 years. I have built some complex programs with C#
including some ILBM Viewers, Icon Editors, and a complex Disk Image Explorer for use with VirtualBox.

I just now struggled to compile a simple MUI program, till I discovered the ease of using gcc.
I was using AmiDevCPP, but it simply refused to compile MUI code! So I switched to gcc & oh how nice!!

wawa, maybe you could help me to set up a gcc/g++ crosscompiler toolchain for Linux Mint, or Ubuntu?
will a script set it up for me? Where do I get all the AROS include files? Can I compile for Icaros Desktop directly, or are the includes 64bit?

Now I'm compiling a few more MUI applications & write a few, then I can start setting up a MUI-based user interface.
Title: Re: 3D Modeler for Icaros
Post by: salvatore on July 01, 2019, 02:01:44 AM
Miker this is a scrip for linux but maybe you have bin ubuntu 14 lts

http://archives.aros-exec.org/index.php?function=showfile&file=development/cross/scripts.zip

Setup of VM

Starting from a base installation of Ubuntu 14.04.5 LTS 32 bit Server execute following commands:

sudo apt update
sudo apt install -y unzip

#Packages metioned in gimmearos.sh
sudo apt install -y subversion
sudo apt install -y git-core
sudo apt install -y gcc
sudo apt install -y g++
sudo apt install -y make
sudo apt install -y gawk
sudo apt install -y bison
sudo apt install -y flex
sudo apt install -y bzip2
sudo apt install -y netpbm
sudo apt install -y autoconf
sudo apt install -y automake
sudo apt install -y libx11-dev
sudo apt install -y libxext-dev
sudo apt install -y libc6-dev
sudo apt install -y liblzo2-dev
sudo apt install -y libxxf86vm-dev
sudo apt install -y libpng12-dev
sudo apt install -y gcc-multilib
sudo apt install -y libsdl1.2-dev
sudo apt install -y byacc
sudo apt install -y cmake

#Additional requirement to compile (not mentioned in gimmearos)
apt -y install libgl1-mesa-dev xorg-dev
apt -y install cmake
apt -y install gperf
apt -y install libswitch-perl

apt -y install texinfo
apt -y install uml-utilities

apt -y install vnc4server
apt -y install ruby
apt -y install ruby-dev

#Packages required to run AROS
dpkg --add-architecture i386
apt update
apt -y install libxcursor1:i386
apt -y install libxxf86vm1:i386

#Optional: install xorg and openbox
apt -y xorg openbox

# Change X11 resolution
# xrandr --output VGA-0 --mode 1280x960

this is a configuration for compile owb by user ch1ll
Title: Re: 3D Modeler for Icaros
Post by: miker1264 on July 01, 2019, 02:59:53 AM
salvatore,

Thank you. Just what I needed

I can now compile MUI code using gcc in AROS. This sample is called
TheBar. So now I have a good start on the user interface and I will
follow the mockup as closely as possible.

I'll update the GUI for the MainWindow_Class adding the existing
menu items from RayStorm. I'll use the MUI_Drawing Area with DISPLAY_Class
to set up the (Empty) Quad-View. Now things are moving along.

I should have a real working (somewhat) user interface by the end of this week. :-)
t
Title: Re: 3D Modeler for Icaros
Post by: salvatore on July 01, 2019, 03:19:48 AM
very well we update until tomorrow I'm very happy with the work you're doing, many users in the past complained about the lack of a 3D graphics program, maybe I'll buy some books to learn something

hello friend
Title: Re: 3D Modeler for Icaros
Post by: paolone on July 01, 2019, 10:20:19 AM
Here is a Conceptual Layout for the Updated User Interface for RayStorm Studio (AROS version)...


I love it so much. Just a question: are you using AISS for button images? In that case, once you're done, would you please give me the list of the ones you used? Complete AISS installation tooks a lot of time during Icaros installation, that's why I generally provide a subset of it including only the images needed by distributed applications. Users can always choose to install the whole package during Icaros installation, if they like.
Title: Re: 3D Modeler for Icaros
Post by: salvatore on July 01, 2019, 11:28:38 AM
I don't think he's using aiss paolone

hi
Title: Re: 3D Modeler for Icaros
Post by: miker1264 on July 01, 2019, 06:28:25 PM
There will be a folder with button images" and a settings checkbox to use internal or external images. I'll have to decide at a future date what "internal" will be or just keep the folder only.
Title: Re: 3D Modeler for Icaros
Post by: Yanosh on July 01, 2019, 08:14:53 PM
@miker1264

Where can I find the zune samples?
Title: Re: 3D Modeler for Icaros
Post by: salvatore on July 01, 2019, 08:56:51 PM
for the icons of the program there are applications such as yam that make use your sets of images, and in my opinion it is better so, actually two program use aiss modexplorer (but i have also internal images) and amicastplayer.
Title: Re: 3D Modeler for Icaros
Post by: salvatore on July 01, 2019, 09:45:03 PM
 :)
Title: Re: 3D Modeler for Icaros
Post by: miker1264 on July 01, 2019, 10:15:56 PM
@miker1264

Where can I find the zune samples?

The compiled examples are in the Demo drawer. However, when looking for sources for Zune Examples for TheBar for instance, there are in Contribs/Classes I believe. It took some searching to find the sources. They could be organized a little better.
Title: Re: 3D Modeler for Icaros
Post by: salvatore on July 02, 2019, 10:34:54 PM
however for example nowined does not handle well the icons of aiss on aros, on 68k yes, but if you do not use the set of images mentioned and only those by default everything is fine
Title: Re: 3D Modeler for Icaros
Post by: x-vision on July 03, 2019, 02:34:58 AM
Hope nobody get mad at me for saying this, but I must be honest: I think this is absurd, when all we need is Blender and resources are so scarce.
Title: Re: 3D Modeler for Icaros
Post by: miker1264 on July 03, 2019, 03:02:21 AM
Hope nobody get mad at me for saying this, but I must be honest: I think this is absurd, when all we need is Blender and resources are so scarce.

Your opinion is valuable as well. Raystorm already has Amiga sources, and from what I've seen in the sources whomever ported it to Amiga in about 2014 they made provisions for porting it to AROS. In fact AROS is mentioned many times. "Ifdefined AROS...".

This is a first step in the 3D modeling direction. Blender is very cool and more modern with much more functionality than RayStorm. But Blender is HUGE.

As far as I know I'm the only resource working on this. RayStorm may be a smaller, older program but once it works on AROS we can make it ours and improve it by adding more features over time. It's a first step.

It would take a few programmers working together to port Blender to AROS. Who says that Blender won't be ported next? All we need are a few brave and skillful volunteers.
Title: Re: 3D Modeler for Icaros
Post by: salvatore on July 03, 2019, 08:08:14 AM
I think like you miker, blender was based on the old rendering engine of all the software of the past (and then you and I know the huge amount of work to do for porting), raystorm is a great resource and you can always improve as you say, certainly does not have a video editor but this can always fill up maybe later with another simple and effective application
Title: Re: 3D Modeler for Icaros
Post by: miker1264 on July 03, 2019, 08:41:55 AM
Blender would be a worthwhile project to port to AROS in the future when there are
skilled developers willing to put out the huge effort to do the work. It's a little beyond
my abilities at the moment. The Rendering Engine in Blender is called "Cycles".

RayStorm, however, has some great possibilities. The rendering engine in RayStorm
is based on a small raytracer. I found a man's name in the sources for RayStorm so
I researched it. Many years ago, a programmer named Paul Heckbert wrote a small
raytracer program the he said "could fit on a business card". In the years since then
many raytracer programs such a RayStorm have been based on Heckbert's formulas.
I attached the screenshot of his name in the RayStorm Preview.cpp module.

I was also experimenting with a small raytracer based on Heckbert's raytracer. The
shell program is only about 200 lines long. It creates 3d objects, a light source, a
camera, surfaces, materials, textures, and reflection maps then it renders the scene.
At first it wasn't writing the output file, but I rewrote that part so that now it works.

Copy the Raytracer.cpp file somewhere on your Icaros drive. Then enter a shell and
type "g++ -o Raytracer Raytracer.cpp" so that it generates an AROS executable.
Copy the raytracer file to RamDisk: or somewhere else. Use the AROS shell to cd to
that location where the program is. Type "Raytracer" and wait a few seconds for the
cursor to return. Check in your folder for a file called "Untitled.ppm". That's the file.
If you have the PPM or PNM datatype installed you can type "Multiview Untitled.ppm".
In a future version I might add a callback function and a progressbar while rendering.

Title: Re: 3D Modeler for Icaros
Post by: miker1264 on July 03, 2019, 09:00:09 AM
I might compare the code for MiniRay Raytracer to RayStorm's Raytracer since they are based on
the same formulas. Maybe I can artificially generate the 3d objects and feed them to the Raytracer
so that I can test RayStorm's raytracing capabilities on AROS. Later I could try to parse IFF-RSCN
files and render scenes using those 3d objects which means it will render a RayStorm 3D Scene.
I needed a way to test RayStorm's Rendering Engine (Scenario?) to make sure it works on AROS.
If the results of MiniRay Raytracer are any indication, rendering scenes on AROS will be really fast.
Title: Re: 3D Modeler for Icaros
Post by: salvatore on July 03, 2019, 12:32:53 PM
well miker, yes the porting of blender also depends on python 2.5 it seems to me that currently does not exist on aros so other work, congratulations anyway on the progress :)
Title: Re: 3D Modeler for Icaros
Post by: miker1264 on July 04, 2019, 12:08:43 AM
I'll check back in about a week. I'll be down in my lab making a raytracer. :-)
Title: Re: 3D Modeler for Icaros
Post by: trekiej on July 04, 2019, 02:12:53 AM
Is this SMP aware?
Title: Re: 3D Modeler for Icaros
Post by: miker1264 on July 04, 2019, 03:04:34 AM
The raytracer routines use vector math but I don't believe the code is SMP aware. That is most likely handled by the operating system.

It doesn't use OpenGL either for raytracing. OpenGL is used in drawing and displaying. The raytracer is a series of mathematical formulas for reflection, refraction, and intersection. I've noticed that raytracing on AROS so far is fast.
Title: Re: 3D Modeler for Icaros
Post by: salvatore on July 04, 2019, 05:32:10 AM
well miker ;)
Title: Re: 3D Modeler for Icaros
Post by: Yanosh on July 05, 2019, 10:32:31 PM
@miker1264

Where can I find the zune samples?

The compiled examples are in the Demo drawer. However, when looking for sources for Zune Examples for TheBar for instance, there are in Contribs/Classes I believe. It took some searching to find the sources. They could be organized a little better.

Thanks. The original archive is in extras:documentation and the sources are in MCC_TheBar/Developer/C/Examples.
Title: Re: 3D Modeler for Icaros
Post by: trekiej on July 06, 2019, 03:33:47 AM
The raytracer routines use vector math but I don't believe the code is SMP aware. That is most likely handled by the operating system.

It doesn't use OpenGL either for raytracing. OpenGL is used in drawing and displaying. The raytracer is a series of mathematical formulas for reflection, refraction, and intersection. I've noticed that raytracing on AROS so far is fast.

I see. Maybe by the end of the year or sooner we will be able to have more cores for Raytracing.
This can be a step toward that goal, I believe.
Title: Re: 3D Modeler for Icaros
Post by: miker1264 on July 13, 2019, 05:06:06 PM
Does anyone know where I can get the arosmesa.h include file?

I have to use Mesa (OpenGL) to draw wireframes in the viewports.
Title: Re: 3D Modeler for Icaros
Post by: salvatore on July 13, 2019, 06:50:07 PM
hi miker maybe in the source

https://sourceforge.net/projects/aros/files/nightly/20190520/Sources/AROS-20190520-source.tar.bz2/download
Title: Re: 3D Modeler for Icaros
Post by: paolone on July 13, 2019, 07:19:54 PM
Does anyone know where I can get the arosmesa.h include file?

I have to use Mesa (OpenGL) to draw wireframes in the viewports.
Isn't it included in Icaros Desktop live!?
Title: Re: 3D Modeler for Icaros
Post by: miker1264 on July 13, 2019, 07:31:48 PM
Does anyone know where I can get the arosmesa.h include file?

I have to use Mesa (OpenGL) to draw wireframes in the viewports.
Isn't it included in Icaros Desktop live!?

I used Icaros Live! Version 2.2.5 to install.  For some reason the gcc/g++ inside Icaros doesn't have AROSmesa.h in the GL includes.

I'll try the Nightly for ABIv0.
Title: Re: 3D Modeler for Icaros
Post by: salvatore on July 13, 2019, 08:29:33 PM
sorry you searched on dev archives

hi
Title: Re: 3D Modeler for Icaros
Post by: paolone on July 14, 2019, 11:14:04 AM

I used Icaros Live! Version 2.2.5 to install.  For some reason the gcc/g++ inside Icaros doesn't have AROSmesa.h in the GL includes.

I'll try the Nightly for ABIv0.
Maybe I have to refresh this part of the distribution. Please hint me where I can find it, when you do.
Title: Re: 3D Modeler for Icaros
Post by: miker1264 on August 31, 2019, 06:00:07 AM
I still haven't located the include file but I will do a thorough search tomorrow.

I'm attempting to use OpenGL or AROS Mesa to render 3d Wireframes.

I will also attempt to use gl/glut libraries now that the OpenGL support in AROS has been updated.

After I am successful at displaying the first wireframe in a window I will attempt to display it again in an MUI drwing area in a simple test gui. The I wiil split the drawing area into four OpenGL Viewports where I can display the wireframe from different perspectives. After the basic sphere I'll display a more advanced 3d object as a wireframe.

I hope I can accomplish all this in one thrree day weekend. 😊
Title: Re: 3D Modeler for Icaros
Post by: salvatore on August 31, 2019, 06:25:19 AM
great we have our 3D graphics program, very good miker :D
Title: Re: 3D Modeler for Icaros
Post by: trekiej on August 31, 2019, 06:38:47 AM
Thank you for making this happen.
edited:
Title: Re: 3D Modeler for Icaros
Post by: miker1264 on August 31, 2019, 07:35:00 AM
We have to start somewhere. Each step takes time. Displaying a simple 3d wireframe is the first step. The rest of the functionality will follow.

The next step while developing the toolbar and a simple menu system will be to actually select and load an IFF-RSCN file. The 3d object data is then used to display a "REAL" 3d wireframe in the viewports. That will take considerable time to achieve.

Getting the display for the wireframes and view operations right is critical. That's one of the main ways the user interacts with the program. Having full control of the wireframe display allows changing the background and foreground colors of the viewports, setting the font and color for the text in the viewports, etc. Fine tuning the look and feel of the images in the viewports is important.

So at first we'll be able to display a simple wireframe then build more functionality as we go. It's a lengthy process but worthwhile.
Title: Re: 3D Modeler for Icaros
Post by: salvatore on August 31, 2019, 10:36:27 AM
i understand, horewer i have one beta tester maybe :)
Title: Re: 3D Modeler for Icaros
Post by: miker1264 on September 01, 2019, 07:09:11 PM
Success!
Yes. My first successfully compiled OpenGL/Glut demo.
Again - Thanks to Allain Thellier for his hard work!
 
While searching in the demos sections of  Icaros Desktop I couldn't find any that worked.
So I found a sample on the net called "Spheres". In the code at the top with the includes
was this note: "//For programs that simply use OpenGL and Glut (like Aminet/ccstarship) then just compile them
//gcc starship.c -lglut -lgl - o starshiparos"

So I downloaded the source and compiled with the above syntax. It worked.
The syntax I was generically using was "gcc -o program -lglu -lgl program.c". It shoud be "-lglut" not "-lglu".

This little demo doesn't seem like much, but I needed was how to use glut (OpenGL Utility Toolkit) to create
an OpenGL Context and Link it to an AROS display window. So the demo was a success. Now on to Wireframes!!

If you're interested in trying the demo unzip the zip file and then use the shell to run the "starshiparos" executable.
Title: Re: 3D Modeler for Icaros
Post by: trekiej on September 01, 2019, 08:43:47 PM
Congratulations.
Title: Re: 3D Modeler for Icaros
Post by: miker1264 on September 01, 2019, 09:12:21 PM
Congratulations.

Thank you.

Thanks to kalamatee for giving me a few pointers on OpenGL rendering libraries!

Here is the first wireframe using OpenGL.

Next I'll divide the window into OpenGL Viewports to display different perspective.
Title: Re: 3D Modeler for Icaros
Post by: salvatore on September 02, 2019, 02:11:44 AM
great miker :)
Title: Re: 3D Modeler for Icaros
Post by: miker1264 on September 05, 2019, 08:06:33 AM
Continuing to experiment with OpenGL Wireframes and Viewports.
I think a light grey color for the wireframes would look nicer and
I will attempt to draw a line in the form of a "cross" to divide the
individual viewports. It would look better inside of an MUI/Zune
Drawing Area with a ButtonBar Menu, Toolbar Menu & Buttons.

This is close to actual size for the viewing area, but I can't make
the Mesh Window larger than 640x400 because it has to fit into
an 800x600 screen size. My Icaros Desktop is only at 800x600.
There may be an option later to resize it to 1024x768, or larger.
Title: Re: 3D Modeler for Icaros
Post by: miker1264 on September 05, 2019, 08:18:50 AM
Here is the code I used to generate the wireframe viewports.
Title: Re: 3D Modeler for Icaros
Post by: salvatore on September 05, 2019, 12:37:17 PM
thank you miker, i attemp for first releasing

all great
Title: Re: 3D Modeler for Icaros
Post by: miker1264 on September 05, 2019, 02:22:01 PM
This is just the beginning. Much more work to do just for the user interface and wireframes and viewing operations then integration with IFF SCN.

I'll report back when I have a working user interface with toolbar, buttonbar and mesh windows that can display 3d wireframes so I don't clutter up the forum here with all my postings. ;-)
Title: Re: 3D Modeler for Icaros
Post by: salvatore on September 05, 2019, 05:00:49 PM
ok

all best and thank you
Title: Re: 3D Modeler for Icaros
Post by: miker1264 on September 07, 2019, 07:29:40 PM
I did say I didn't want to clutter the forum with all my comments and updates, but I lied. I'm back.

As far as a 3D Modeler for AROS it's becoming a reality, slowly. I envision a modeler program that is perhaps 60% new and 40% based on existing code. In some ways it's like AROS itself, "Rooted in the Past, with a Firm Footing in the Present, and an Eye Towards the Future".

But you might say, the Sources for RayStorm and other 3d programs already exist. Why can't we just port it to AROS? The sources for RayStorm for example were first written many years ago for an operating system other than Amiga then more recently (2014?) Ported to Amiga OS 3.x. There is much legacy cpp code there and many, many modules! The Original Viewer Module for example contains older code that relies on picture libraries. But picture datatypes have advanced quite a bit and they can handle the viewer functions easily. So the new Viewer Component is 100% new code.

In order to write, design, layout the new program I must fisrt familiarize myself with new concepts such as OpenGL drawing techniques, gui design, handling 3d objects as data structures, vectors, vector math, optics and lighting, and especially the science behind Raytracing. When you research raytracing you soon realize there are different types. There is also POV Ray and Path Tacing.

There are well written articles about Raytracing at Scratchapixel.com for instance for some light reading if you're bored and can't sleep at night. :-)
Title: Re: 3D Modeler for Icaros
Post by: miker1264 on September 07, 2019, 11:57:00 PM
I'm refining the look and feel of the new program by experimenting with OpenGL drawing techniques, OpenGL Contexts (display window), foreground & background colors. I changed the wireframes (foreground color) to a medium grey which seems more appealing. I will also look into changing the color of the wireframe in the Active Viewport to a brighter Whitish-Grey for a visual effect. Drawing a Cross-Piece at the inner edges of the viewports to visually separate them will also make it look nicer. The color of the "+" will be white for the moment but should match the RGB value of the AROS window frame theme being used. There should be a way to query that color information for a closer match.

This is how I changed the foreground colors:

static void display(void) {
    glClear(GL_COLOR_BUFFER_BIT); //Black Background
    //glClearColor(1.0f, 1.0f, 1.0f, 0.0f); //White Background
    //glColor3f(1.0f, 0.0f, 0.0f); //red
    glColor3f(0.5f, 0.5f, 0.5f); //grey

//void glColor3f(
   //GLfloat red,
   //GLfloat green,
   //GLfloat blue
//);

There may also be a way to change the background color from black to white or light grey. I may allow User Preferences to Select Foreground & Background Colors. I plan to also have a ButtonBar Menu beside the Display Area (Mesh Window) and below that will be about eight Navigations Buttons to control view operations inside the Viewports. As far as User Preferences the ButtonBar and Navigation Buttons can be located on the Left or Right Side of the Window. The Toolbar can optionally be shown above the display area. But if you are like me and you prefer a "minimalist approach" then just showing the Display Window is perfectly fine! At that point it will all be Menu Operated rather than GUI Buttons. I kinda like having just a Display Area and a Menu System. It makes it easier.

I'm going to try to make the ButtonBar Menu and Navigation Buttons this weekend as well as an OpenGL Context to use an MUI/Zune display area instead of just a standard window. It has all been done before using StormMesa, but I enjoy the journey of discovery.

As far as my plan or my roadmap for this program, next week I plan to start out small reading the 3d object data from the IFF-RSCN "Scene File". I'll use the "Billiard Balls" scene or one similar with Spheres. They are easiest to model with wireframes. After displaying the wireframes in the Viewports I'll focus on sending Vector Data directly to the Raytracer to generate the final Rendered Image. On the other end I'm using a sample Raytracer called "Mini-Ray" to output the rendered images. It currently generates PPM files, but some people may not have the picture datatype for that, so I will modify it to also output TGA files.
Title: Re: 3D Modeler for Icaros
Post by: salvatore on September 08, 2019, 06:06:12 PM
currently I'm devoting myself to something else that is always part of the world of computer science, to create a job I had mentioned this thing in another thread since 2004 that I don't work and I had serious health problems, now I have recovered a lot of lucidity but not easy, anyway miker long ago the users of the old forum complained about the lack of such software thanks for your work :)
Title: Re: 3D Modeler for Icaros
Post by: miker1264 on September 08, 2019, 06:28:29 PM
One of my dilemmas is that I really want to produce programs and small utilities that the AROS community might find useful, but my notes and concepts for programs far outweigh my ability to code quickly! So I work on a few at a time, making incremental improvements in each.

I'm working on the 3D Renderer (AROS will have one!) as well as the Icon Functions that will be a part of Icon Factory. I have spent many hours on that but still have many more to go till I feel that it can be released. Time is a precious commodity.

Though I work full time during the day I enjoy working with graphics. During the week I can only program or test programs for a couple hours per night but sometimes I take a night off. I have health issues too. I can't stand or sit for long periods of time so that limits my programming. I really want to code but at times I have to stop. But I have very detailed notes to continue exactly where I left off. I'm making good progress on the Viewports and Wireframes using OpenGL.

The Raytracer program is one of those major projects that will either secure my reputation for writing good and useful AROS programs, or it will make me want to run away from it screaming!!

Title: Re: 3D Modeler for Icaros
Post by: salvatore on September 08, 2019, 06:36:30 PM
the work you are doing for the community is very important, my acts are other, I can help only with the support and comedy but those like you who work on aros even in the time clippings, I stopped taking many medicine that did not help me much but I had to take them , my aptitudes are other mikers, I thank you very much cmq and I'm glad you're intusian of aros :)
Title: Re: 3D Modeler for Icaros
Post by: salvatore on September 08, 2019, 06:44:30 PM
medicine no drugs :D
Title: Re: 3D Modeler for Icaros
Post by: miker1264 on September 09, 2019, 04:15:50 AM
Still working with OpenGL to draw wireframes in "Demo Mode" for the 3D Renderer.

I can change color of the wireframe in the Active Viewport. I have also drawn a thin
Bounding Box around the Viewport. This box will provide reference coordinates to
draw the Background Grid. The Red, Green and Blue lines are XYZ Axis Lines.

Over the next week I will put together an MUI/Zune window (OpenGL Context)
and attach a small Menu System. I'm considering releasing Version 1.0.0 when
I get the Viewports and Viewing Operations working correctly in Demo Mode.

The next version 1.0.1 will load 3D Objects from IFF-RSCN files  (Scene Files).
The 3d Objects will then be displayed as interactive wireframes in Viewports.
After that I can focus on translating the 3d Object Data into Vector Data to
send directly to the RayTracer to generate the Output Image (RenderPic).

I plan to include a nice "Rendering Progress" progressbar like the one at the
Start of Magellan with a blue progress indicator. The progressbar will be
driven by the number of lines in the output image. If there are 600 lines,
for every 6 lines the progress moves by 1%, and so on. There will also be
a Preview window at the end to display the most recently Rendered Image.

After I get the program to render a scene then I can go back to assemble
a Buttonbar Menu, Statusbar and Toolbar for the completed User Interface.
Title: Re: 3D Modeler for Icaros
Post by: dizzy on September 09, 2019, 03:44:54 PM
There is a basic MUI/Zune implementation on my STLView program. If I recall it correctly, there is one task allocated for the OpenGL implementation or something (renderer? Can't recall the details at the moment...). Only one task can access it at one time or something... Mostly concerns SMP as MUI/Zune renders things in turn.

On the STLView the grid is antialiazed (IIRC), makes it look a bit better in my mind. Antialiazing is suplied by OpenGL and doesn't hinder performance when GPU is at hand.
Title: Re: 3D Modeler for Icaros
Post by: salvatore on September 09, 2019, 04:05:51 PM
attemp the official release miker

thank you :)
Title: Re: 3D Modeler for Icaros
Post by: miker1264 on September 09, 2019, 04:38:08 PM
There is a basic MUI/Zune implementation on my STLView program. If I recall it correctly, there is one task allocated for the OpenGL implementation or something (renderer? Can't recall the details at the moment...). Only one task can access it at one time or something... Mostly concerns SMP as MUI/Zune renders things in turn.

On the STLView the grid is antialiazed (IIRC), makes it look a bit better in my mind. Antialiazing is suplied by OpenGL and doesn't hinder performance when GPU is at hand.

STLView? As in STL Mesh Viewer for 3D Printing? That's interesting.

Where can I find STLView? Is it part of Icaros?

I'd like to see the antialiased grid lines and what your program does.

I found the DropBox Link. I'll try it out.

Update: STLView has fewer modules and it is much easier to understand than the cpp from RayStorm sources. I much prefer C over Cpp.

Using C with Mui/Zune makes it easier to sort out Mui Classes and creating and using the OpenGL Context for drawing operations. 

Thanks.
Mike R.