DesignCAD 3D Max 2027 box
Now available

DesignCAD 2027

Hatches that follow their boundaries, an on-screen dial to turn your model, and a way to find any command by name, in a clean Windows 11 look.

Yet Another 3D Viewer

Started by bdeck, April 12, 2014, 10:37:16 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

bdeck

Quote from: prl on April 22, 2014, 05:57:19 AM
Supposedly, version 24 will let us determine the view center with basiccad.

Prl,

Thanks.

Both the view center and the current zoom level are needed. I had thought I might work backwards from the 2D view window coordinates, sys(600-603), but that sounds too much like work.   ;)

Regards,

bd




bdeck

#31
New Version 0.07 (in message 27) updates sys() values prior to regen to reinstate hardware accel after F8.  Also F8 routine was changed.

Sam,

I think the changes made in v0.06 fix the behavior you described. F8 dialog (in DCv23) is no longer affected by vdd settings. So one can simply press F8, then Enter, and the previous Phong etc rendering settings will be applied.

After F8 vdd now reverts immediately to its previous accelerated settings when a navigation key is pressed.

DCv23 behavior in this area is an improvement over DCv20.

bd

samdavo

thanks heaps bdeck.
hours to fully check it out, but it yodels possibilities :)

samdavo

#33
Herewith an idea for (imo) an improvement:-
namely the ability to take snapshots at steps during the "walkthrough".   eg using the hotkey "S" ( within vdd.d3m).

Not sure who I am appealing to here (but I'm thinking prl, your champion lol)

I suspect the filename(s) of the screensnaps would have to be linked to the time (eg @now),  so that bmp's/jpegs can be sorted later - then turned into a gifmovie as per prl's macro (attached).
The following excerpt is adapted from that macro, but still needs work.   

Quotegosub SnapPic

'subroutines follow

SnapPic:
    xx = xx + 1
    precision 0
    a$ = abs(xx)
   
    'put graphic file name in following format, 001 or 012 or 113
    if len(a$)=1 then a$="00"+a$
    if len(a$)=2 then a$="0"+a$
    pic$="c:\stuff\pic"+a$+".png" 'a directory of your choosing
   
    >shadeview
    {
    <ShowLine 0
    }

    >SaveBmp
    {
    <ShowLine 0
    <Filename [pic$]
    }
Return

prl

#34
If we take out the >shadeview portion (since we are controlling that already elsewehere in vdd.d3m), we will have an interactive gif maker of sorts.

Now animated Gif files do tend to be large files, and probably best to host them off-site if one wants to have them linked for viewing on this forum.


samdavo

#35
ok I have reallocated the spacebar to "snapshot".  (edit - because I can use mouse-wheel to pan)
Note that I have a directory called c:\stuff,  based on prl's idea of course ( he uses v:\stuff).   You start by cleaning that directory out - deleting all old files.

As you do your walkthrough, you hit spacebar and later on, open up that directory to find all the PNG files. (2 cents)

(Again I thank adriank for that file - I trust acceptable to use it for demonstration of the broad and distant principles here).

(edit) revised version of V0.07S - tidies up the explanation (first lines).

Note that, If you get half way through the walkthrough,  turn vddsnap off - and then continue later, you will need to set the png files to start after the current numbers - at the moment you must go into the macro and reset xx = starter for file names,  approx line 15. (2 cents)

prl

Sam, thanks, I've been tilting at windmills lately. 

I do come up with creative names (stuff).  You should see how many basiccad programs I have labeled now, now1, now2, now3. . . .

bdeck

#37
I'm running out of names, too.  And every day I come up with a better use for the spacebar than the one I've assigned to it.

Today I'm thinking of bringing up the help window with the space bar,  but first it needs a bit of organizing.  Any ideas?

Sam, I included your save idea (clever how I freed up the S key a few versions back, eh?) and of course I steal ideas from prl whenever I can. 

Thinking of prl's lust for screen space I added a new E mode to the macro to keep the window filled with either the entire drawing or a selection. (warning: it might make you sick)

Had trouble hiding  the saveas dialog in v23 win 2K (see notes in code). Anybody else?


This version adds the following key commands:

M  micro viewing mode toggle

S  save command for saving bitmaps, 2d projections, or views    

E  eccentric viewing mode toggle  (emode keeps all entities or all selections in view regardless of view center)

D deselect toggle   Toggles highlighting of selection.
     Selection is restored automatically at end of macro, but macro makes no attempt to restore handles.
     Selections can be un highlighted even after entering emode 2.  (emode 2 results from pressing the e key while a selection is highlighted)
    (emode 1 results from pressing the e key while no selection is highlighted) Regards,

BD

PS  Sam is that a water tower converted to a, ahem,  bachelor pad?

samdavo

#38
QuoteToday I'm thinking of bringing up the help window with the space bar,  but first it needs a bit of organizing.  Any ideas?

Lol - well, imo, H is great for help :)
The option of saving a view as 2D dcd mid-macro (or jpeg or png etc) is pretty impressive.

One minor point, but I found that if rendering hangs up, it is sometimes worth hitting F8 to "remind it of what it's trying to do" (2 cents)
thanks again

PS As for that bedroom in the sky - it's a brilliant design and drawing by adriank :)  Comes complete with a pool.  All credit to him.   

bdeck

#39
Quote from: samdavo on April 24, 2014, 06:06:22 PM
The option of saving a view as 2D dcd mid-macro (or jpeg or png etc) is pretty impressive.

Well on my (win2K) machine that function works in every DC version except 23. Does it work for you?
EDIT- Fixed in later version.
bd

PS, found some truncated lines in the save menu, and fixed them with a right paren (v.09b) also, removed some lines from the dcsaver subroutine.

samdavo

#40
bd,
Well, I am using V22.1 at home (windows 7) all good, saves jpegs and 2D drawings bumplessly.

Lol - later I forgot I was in the 2D version (having by then opened it up),  and got the fright of my life when I rotated it to see it (partially) flatten out (!)  Normally you would not be able to change view angles of a 2D drawing (!) but you can with vdd. (at least to 45degs about V axis).

Back to 3D ...  One thing I am finding, I am gonna have to make a thimble that sits over the "esc" key - sick of accidentally turning it off :)
Or maybe I'll reassign F10 or some such. - 2 cents.

samdavo

Finally succeeded in making a walkthrough! - using vddsnap,d3m
Eureka!

bdeck

#42
Sam,

Very impressive, especially considering the dearth of specialized walkthrough tools in the original vdd macro.

I like the the dedicated approach of your macro, without need for submenus.

bd

ps:  I'm sure the ladies will be impressed, too.  :D

samdavo

#43
bdeck,
I'm using some tips from prl to make that walkthrough -

once you get all those png files in C:\stuff (using vddsnap.d3m spacebar in my case),
you open irfanview, (freeware), open Files\Batch convert
and you convert them all to gif files in one fell swoop (C:\STUFF-OUT),

then you open unfreez (more freeware), set each frame to 40/100 of a second (or slower if you wish),
and drag all the gif files into one "animated gif". 
I'm not saying it couldn't be a lot better - in fact I doubt it could be much worse - but at least I'm on the right track (I think lol).
cheers.

PS I note in your vdd09, hotkey "s" offers bitmap jpeg png and tiff - could it also offer gif (?)  { as well as view save and 2D projection}.
Just a question, no biggie.  PS I'm guessing not, since gif is not amongst the options under  DCAD\Save Image

I note that your files are automatically saved using date-and-time (compare @now) or similar - easily sorted, and I plan to use that in future - thanks.

samdavo

#44
Here's a better walkthrough - using adriank's bedroom on stilts.   I thank him for his (formal) permission to use it.
It ends at sunset - (as I wind back the light, and the shadows take over).

Also , without changing the view centre (= centre of room) then when you increase the view distance (from about 4m), you are suddenly no longer circling inside the room, but instead you are outside.  (2 cents)