|
Im sure this has been done before, but I realized an amusing application of
LDViews fly through camera mode is to look at the world through the eyes of a
minifig, particularly from perspectives where you couldnt normally fit a camera
(or your eyeballs).
Heres a quick example: sitting in a LEGO cockpit looking out at your wingman.
Travis, since I already had the LDView code set up I reduced the strafeAmount
and motionAmount values used in ModelWindow::processKeyDown to 0.05. This
made it much easier to make fine adjustments to the camera position; even
smaller values may be useful. Perhaps it would be worth adding a Preferences
setting to control these values?
(On a side note, I havent tinkered much more with Qt or a Universal LDView
build. Its still in the rotation, but I just havent gotten back to it.)
Anyway, thought this was fun so I thought I would share. Anyone else have any
similar examples?
Jim
|
|
|
In lugnet.cad, Jim DeVona wrote:
|
Im sure this has been done before, but I realized an amusing application of
LDViews fly through camera mode is to look at the world through the eyes
of a minifig, particularly from perspectives where you couldnt normally fit
a camera (or your eyeballs).
Heres a quick example: sitting in a LEGO cockpit looking out at your
wingman.
Anyway, thought this was fun so I thought I would share. Anyone else have any
similar examples?
|
Thats a nice pic Jim.
I seem to recall there was a view from inside a Santa Fe car a while back, cant
remember who rendered it though :(
ROSCO
|
|
|
In lugnet.cad, Jim DeVona wrote:
|
Heres a quick example: sitting in a LEGO cockpit looking out at your
wingman.
|
Its worth noting that if you get the POV-Ray camera info from LDView and render
in POV-Ray, you should get exactly the same view there (assuming you use the
same aspect ratio).
|
Travis, since I already had the LDView code set up I reduced the
strafeAmount and motionAmount values used in
ModelWindow::processKeyDown to 0.05. This made it much easier to make
fine adjustments to the camera position; even smaller values may be useful.
Perhaps it would be worth adding a Preferences setting to control these
values?
|
The sensitivity is pretty messed up. It doesnt properly track the frame rate,
so if you have a high frame rate it goes too fast, and if you have a low frame
rate, it goes too slow. I think the proper solution would be for me to fix
that.
--Travis
|
|
|
In lugnet.cad, Travis Cobbs wrote:
|
In lugnet.cad, Jim DeVona wrote:
|
Heres a quick example: sitting in a LEGO cockpit looking out at your
wingman.
|
Its worth noting that if you get the POV-Ray camera info from LDView and
render in POV-Ray, you should get exactly the same view there (assuming you
use the same aspect ratio).
|
I was thinking of that. I tried it briefly the other night but I must have had a
different aspect ratio, because the rendering appeared far outside the ship. Im
getting up to speed on POV-Ray, though, so Ill definitely try it again.
|
|
Travis, since I already had the LDView code set up I reduced the
strafeAmount and motionAmount values used in
ModelWindow::processKeyDown to 0.05. This made it much easier to make
fine adjustments to the camera position; even smaller values may be useful.
Perhaps it would be worth adding a Preferences setting to control these
values?
|
The sensitivity is pretty messed up. It doesnt properly track the frame
rate, so if you have a high frame rate it goes too fast, and if you have a
low frame rate, it goes too slow. I think the proper solution would be for
me to fix that.
|
Ah, I see. Sounds good. Yes, initially the camera would jump across or out of
the cockpit at the slightest touch. I changed the value so I could nudge it
around easier within that area.
Jim
|
|
|
In lugnet.cad, Jim DeVona wrote:
|
In lugnet.cad, Travis Cobbs wrote:
|
Its worth noting that if you get the POV-Ray camera info from LDView and
render in POV-Ray, you should get exactly the same view there (assuming you
use the same aspect ratio).
|
I was thinking of that. I tried it briefly the other night but I must have
had a different aspect ratio, because the rendering appeared far outside the
ship. Im getting up to speed on POV-Ray, though, so Ill definitely try it
again.
|
The aspect ratio shouldnt make enough of a difference to put the camera out of
the ship. It should only change the cropping. If you have the same aspect
ratio, you should should get nearly pixel-perfect alignment of all polygons that
dont involve reflection or refraction. Im not sure if this is a Mac-specific
bug, or if you did something that I havent done in my testing on Windows.
Heres an example of what Im talking about:
LDView (wide picture):
POV-Ray (640x480):
LDView (640x480):
--Travis
|
|
|
In lugnet.cad, Travis Cobbs wrote:
|
In lugnet.cad, Jim DeVona wrote:
|
In lugnet.cad, Travis Cobbs wrote:
|
Its worth noting that if you get the POV-Ray camera info from LDView and
render in POV-Ray, you should get exactly the same view there (assuming you
use the same aspect ratio).
|
I was thinking of that. I tried it briefly the other night but I must have
had a different aspect ratio, because the rendering appeared far outside the
ship. Im getting up to speed on POV-Ray, though, so Ill definitely try it
again.
|
The aspect ratio shouldnt make enough of a difference to put the camera out
of the ship. It should only change the cropping. If you have the same
aspect ratio, you should should get nearly pixel-perfect alignment of all
polygons that dont involve reflection or refraction. Im not sure if this
is a Mac-specific bug, or if you did something that I havent done in my
testing on Windows.
|
Youre right - it does work. I retried it with L3P output and the view is
positioned correctly. My previous effort used POV-Ray code from Antons
converter. Thats not necessarily the reason it didnt work before, though: it
was late and I was tired. At any rate, LDView is certainly exonerated (not that
it was accused).
This isnt the exact same position as my previous LDView screenshot, but it
confirms it works OK:
There seems to be an awful lot of refraction looking through that canopy,
incidentally, and some unexpected opacity in the front. I see povray did print a
bunch of parse warnings related to refraction, and two rendering warnings:
Rendering Warning: Camera is inside a non-hollow object. Fog and participating media may not work as expected.
Possible Rendering Error: Maximum trace level reached! If your scene contains black spots read more about the max_trace_level setting in the documentation!
so there are still some things to figure out.
Thanks,
Jim
|
|
|
--snip--
|
Youre right - it does work. I retried it with L3P output and the view is
positioned correctly. My previous effort used POV-Ray code from Antons
converter. Thats not necessarily the reason it didnt work before, though:
it was late and I was tired. At any rate, LDView is certainly exonerated (not
that it was accused).
This isnt the exact same position as my previous LDView screenshot, but it
confirms it works OK:
This POV is kind of trippy
There seems to be an awful lot of refraction looking through that canopy,
incidentally, and some unexpected opacity in the front. I see povray did
print a bunch of parse warnings related to refraction, and two rendering
warnings:
Rendering Warning: Camera is inside a non-hollow object. Fog and participating media may not work as expected.
Possible Rendering Error: Maximum trace level reached! If your scene contains black spots read more about the max_trace_level setting in the documentation!
so there are still some things to figure out.
Thanks,
Jim
|
Hi Jim,
The second error there is certainly to blame for the opacity. You need to add a
line
global_settings { max_trace_level N }
where N is high enough (probably 8 will do). Partially this is because LDraw
parts are constructed of surfaces rather than solid blocks of material so that
you end up passing through at least two transparent objects every time you go
through a clear brick.
Of course opacity is not neccessarily all that incorrect as a quick glance at a
brick built windscreen will show :)
Tim
|
|
|
In lugnet.cad, Timothy Gould wrote:
|
|
This POV is kind of trippy
There seems to be an awful lot of refraction looking through that canopy,
incidentally, and some unexpected opacity in the front. I see povray did
print a bunch of parse warnings related to refraction, and two rendering
warnings:
Rendering Warning: Camera is inside a non-hollow object. Fog and participating media may not work as expected.
Possible Rendering Error: Maximum trace level reached! If your scene contains black spots read more about the max_trace_level setting in the documentation!
so there are still some things to figure out.
Thanks,
Jim
|
Hi Jim,
The second error there is certainly to blame for the opacity. You need to add
a line
global_settings { max_trace_level N }
where N is high enough (probably 8 will do). Partially this is because LDraw
parts are constructed of surfaces rather than solid blocks of material so
that you end up passing through at least two transparent objects every time
you go through a clear brick.
|
Thanks for the tip, Tim! The point about LDraw (and POV-Ray) objectives being
comprised of surfaces rather than solids is worth keeping in mind, too.
After re-rendering the little test scene with max_trace_level set to 8, I
realized that the front part of the canopy I had previously considered opaque
is indeed transparent - the curvature of the canopy makes the nose of the ship
appear to bubble up in front:
|
Of course opacity is not neccessarily all that incorrect as a quick glance at
a brick built windscreen will show :)
|
I suppose not. I had just hoped this windscreen brick would present a more plausible internal perspective!
On an unrelated note, did you ever see my question
here about the sticker vectorization tool
you announced here? Im just curious what
became of it because I havent been able to find any other information about it.
Be well,
Jim
|
|
|
(Moved to lugnet.cad.ray.)
In lugnet.cad, Jim DeVona wrote:
|
In lugnet.cad, Travis Cobbs wrote:
|
The aspect ratio shouldnt make enough of a difference to put the camera out
of the ship. It should only change the cropping. If you have the same
aspect ratio, you should should get nearly pixel-perfect alignment of all
polygons that dont involve reflection or refraction. Im not sure if this
is a Mac-specific bug, or if you did something that I havent done in my
testing on Windows.
|
Youre right - it does work. I retried it with L3P output and the view is
positioned correctly. My previous effort used POV-Ray code from Antons
converter. Thats not necessarily the reason it didnt work before, though:
it was late and I was tired. At any rate, LDView is certainly exonerated (not
that it was accused).
|
I think Antons library isnt in LDraw units. Since the camera placement is in
LDraw units, it wont work right. If you know the conversion factor, you can
probably multiply the camera location by that and have it work.
--Travis
|
|
|
In lugnet.cad.ray, Travis Cobbs wrote:
|
(Moved to lugnet.cad.ray.)
In lugnet.cad, Jim DeVona wrote:
|
In lugnet.cad, Travis Cobbs wrote:
|
The aspect ratio shouldnt make enough of a difference to put the camera
out of the ship. It should only change the cropping. If you have the same
aspect ratio, you should should get nearly pixel-perfect alignment of all
polygons that dont involve reflection or refraction. Im not sure if this
is a Mac-specific bug, or if you did something that I havent done in my
testing on Windows.
|
Youre right - it does work. I retried it with L3P output and the view is
positioned correctly. My previous effort used POV-Ray code from Antons
converter. Thats not necessarily the reason it didnt work before, though:
it was late and I was tired. At any rate, LDView is certainly exonerated
(not that it was accused).
|
I think Antons library isnt in LDraw units. Since the camera placement is
in LDraw units, it wont work right. If you know the conversion factor, you
can probably multiply the camera location by that and have it work.
|
Ah, thats a logical explanation. I just looked in the manual.txt that came with
Antons part library and it does state that it considers a POV-Ray unit 1
millimeter. If one LDraw
unit is equal to 0.4 mm, then the conversion probably is straightforward (I
havent tried it). I hate to provoke feature creep, but maybe LDView could
select which units to output the camera in?
Jim
|
|
|
In lugnet.cad.ray, Jim DeVona wrote:
|
In lugnet.cad.ray, Travis Cobbs wrote:
|
(Moved to lugnet.cad.ray.)
In lugnet.cad, Jim DeVona wrote:
|
In lugnet.cad, Travis Cobbs wrote:
|
The aspect ratio shouldnt make enough of a difference to put the camera
out of the ship. It should only change the cropping. If you have the
same aspect ratio, you should should get nearly pixel-perfect alignment of
all polygons that dont involve reflection or refraction. Im not sure if
this is a Mac-specific bug, or if you did something that I havent done in
my testing on Windows.
|
Youre right - it does work. I retried it with L3P output and the view is
positioned correctly. My previous effort used POV-Ray code from Antons
converter. Thats not necessarily the reason it didnt work before, though:
it was late and I was tired. At any rate, LDView is certainly exonerated
(not that it was accused).
|
I think Antons library isnt in LDraw units. Since the camera placement is
in LDraw units, it wont work right. If you know the conversion factor, you
can probably multiply the camera location by that and have it work.
|
Ah, thats a logical explanation. I just looked in the manual.txt that came
with Antons part library and it does state that it considers a POV-Ray unit
1 millimeter. If one LDraw unit is equal to 0.4 mm, then the conversion probably is
straightforward (I havent tried it). I hate to provoke feature creep, but
maybe LDView could select which units to output the camera in?
Jim
|
Jim,
In the Converter I divide every coordinate the LDraw model has by 2.5 and then I
end up with the millimeter system I digitized everything with. I have (since I
started to build my Library starting in 1992) always used millimeters when
measuring every single brick.
Greetz,
Anton
|
|
|
In lugnet.cad.ray, Anton Raves wrote:
|
|
|
I think Antons library isnt in LDraw units. Since the camera placement
is in LDraw units, it wont work right. If you know the conversion factor,
you can probably multiply the camera location by that and have it work.
|
Ah, thats a logical explanation. I just looked in the manual.txt that came
with Antons part library and it does state that it considers a POV-Ray unit
1 millimeter. If one LDraw unit is equal to 0.4 mm, then the conversion probably is
straightforward (I havent tried it). I hate to provoke feature creep, but
maybe LDView could select which units to output the camera in?
|
In the Converter I divide every coordinate the LDraw model has by 2.5 and
then I end up with the millimeter system I digitized everything with. I have
(since I started to build my Library starting in 1992) always used
millimeters when measuring every single brick.
|
Hi, Anton! Thanks for the explanation. That is a straightforward conversion. I
divided LDViews reported camera location and look_at coordinates by 2.5,
reversed the sign of the y coordinates, used the default right vector
(positive x), and it came out right:
Relatively speaking, of course. The scene itself needs work.
I am pleased to discover your library and how to use it, thanks in large part to
James Reynolds recent video.
Thanks,
Jim
|
|
|
In lugnet.cad.ray, Jim DeVona wrote:
|
In lugnet.cad.ray, Anton Raves wrote:
|
|
|
I think Antons library isnt in LDraw units. Since the camera placement
is in LDraw units, it wont work right. If you know the conversion
factor, you can probably multiply the camera location by that and have it
work.
|
Ah, thats a logical explanation. I just looked in the manual.txt that came
with Antons part library and it does state that it considers a POV-Ray
unit 1 millimeter. If one
LDraw unit is equal
to 0.4 mm, then the conversion probably is straightforward (I havent tried
it). I hate to provoke feature creep, but maybe LDView could select which
units to output the camera in?
|
In the Converter I divide every coordinate the LDraw model has by 2.5 and
then I end up with the millimeter system I digitized everything with. I have
(since I started to build my Library starting in 1992) always used
millimeters when measuring every single brick.
|
Hi, Anton! Thanks for the explanation. That is a straightforward conversion.
I divided LDViews reported camera location and look_at coordinates by
2.5, reversed the sign of the y coordinates, used the default right
vector (positive x), and it came out right:
Relatively speaking, of course. The scene itself needs work.
I am pleased to discover your library and how to use it, thanks in large part
to James Reynolds recent video.
|
Jim,
Youre welcome! What you could do with the scene is put a hundreds of thousands
unit tall white box (not an infinitive plane, theyll add up to your rendering
times!) behind the camera, itll give you some indirectional lighting like I
have used for the many space scenes you can find on my website. You can find
some sample scenes there as well as ways to introduce your scene to the stars!
;-)
Greetz,
Anton
|
|
|