Code Monkey home page Code Monkey logo

castle-engine / view3dscene Goto Github PK

View Code? Open in Web Editor NEW
82.0 16.0 18.0 37.52 MB

Viewer for many 3D and 2D model formats: glTF, X3D, VRML, Collada, 3DS, MD3, Wavefront OBJ, STL, Spine JSON, sprite sheets in Cocos2D and Starling XML formats

Home Page: https://castle-engine.io/view3dscene.php

Makefile 0.01% Shell 0.07% Pascal 99.90% Groovy 0.01% GLSL 0.01%
x3d vrml x3d-browser stl collada md3 spine pascal object-pascal fpc viewer castle-game-engine starling wavefront gltf cocos2d sprite-sheets hacktoberfest

view3dscene's Introduction

Castle Model Viewer (formerly view3dscene)

Viewer for all 3D and 2D model formats supported by Castle Game Engine.

Supported formats:

See also Castle Game Engine model formats.

Complete documentation on https://castle-engine.io/castle-model-viewer .

Using Castle Game Engine, see https://castle-engine.io/ .

castle-model-converter (formerly tovrmlx3d)

castle-model-converter is a simple command-line program to convert all supported model formats to X3D, and to pretty-print X3D and VRML. It can also be used to validate models.

Note that in simple cases, castle-model-viewer can also be used to convert models. Interactively (just open a model, and then use menu items "File -> Save As...") or from command-line (use --write and related options). But castle-model-converter has a bit more options and at the same time lighter requirements (it does not depend on any GUI libraries).

The documentation of command-line options to perform convertion is on https://castle-engine.io/castle-model-converter .

Building

Compile by:

License

GNU GPL >= 2.

view3dscene's People

Contributors

janadamec1 avatar michaliskambi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

view3dscene's Issues

Exception "EAccessViolation": Access violation

The view3dscene command-line options to --write-encoding=xml appear to fail with an Exception "EAccessViolation": Access violation when attempting to convert a GLTF object to X3D. The same process performed through the GUI menus with the same model works without issue.

To replicate this issue, pick one of the GLTF examples in https://castle-engine.io/demo_models.php and upload with defaults to https://castle-engine.io/convert.php. The service returns error code zero. Closer inspection on a local build reveals that view3Dscene produces "Exception "EAccessViolation": Access violation" which may reflect the same issue causing failures in https://castle-engine.io/convert.php.

Exporting to formats more commonly used in CAD programs

I've been looking for something to easily convert Collada (.dae) models from Sketchup into something commonly read by CAD programs preferably .step. view3dscene loads .dae files wonderfully, but the .x3d format is troublesome. Is there any chance of adding support for .step?

VRML2 IndexedFaceSets solid FALSE

thanks for the best VRML-viewer for Linux;
is there a way for VRML2- files to shade IndexedFaceSets from both sides -

  • (solid FALSE seems not to work).
    Franz

out of memory

I am using version 3.18.0. If I am loading a obj file which comes with an mtl and jpg as texture, I get the following message.
error

The obj file has a size of 50MB, the texture file is 7MByte. Other tools manage to show the 3D model with texture information. Is there any way of getting more information about the problem?

ImageBackground: can **not** animate texCoords!

Hi Michalis,

based on your 'animate_tex_coord.x3dv'-example, I tried to animate the background image:

<X3D profile="Full" version="3.3">
  <Scene>

    <Viewpoint/>

    <ImageBackground DEF="IB" color="1 0 1 0.5" texCoords="0 0 1 0 1 1 0 1">
      <PixelTexture DEF="PT" image="2 2 2 0xFFFF 0xFF80 0xFF80 0xFFFF ">
        <TextureProperties magnificationFilter="NEAREST_PIXEL"/>
      </PixelTexture>
    </ImageBackground>

    <Shape DEF='QUAD'>
      <Appearance><Material/><PixelTexture USE="PT"/></Appearance>
      <IndexedQuadSet index="0 1 2 3" solid="true">
        <Coordinate point="-2 -2 2, 2 -2 2, 2 2 2, -2 2 2"/>
        <TextureCoordinate DEF="TC" point="0 0 1 0 1 1 0 1"/>
      </IndexedQuadSet>
    </Shape>
    <Transform rotation='1 0 0  1.5707963268'><Shape USE='QUAD'/></Transform>
    <Transform rotation='1 0 0 -1.5707963268'><Shape USE='QUAD'/></Transform>
    <Transform rotation='0 1 0  1.5707963268'><Shape USE='QUAD'/></Transform>
    <Transform rotation='0 1 0 -1.5707963268'><Shape USE='QUAD'/></Transform>
    <Transform rotation='0 1 0  3.1415926536'><Shape USE='QUAD'/></Transform>

    <TimeSensor DEF="TS" loop="true" cycleInterval="10"/>
    <!--

      ' VBScript: compute texture coordinates for smooth quad rotation

      option explicit

      const S = .70710678118654752440084436210485 ' sqr(.5)
      const T = .01745329251994329576923690768489 ' pi/180 = degree to rad

      dim A,N,K,VALUE,KEY

      for  N =    0 to 360 step 10
       for K = -135 to 135 step 90
        A = ( N + K ) * T
        VALUE = VALUE & round( cos( A ) * S + .5, 5 ) & " "
        VALUE = VALUE & round( sin( A ) * S + .5, 5 ) & " "
       next
       VALUE = VALUE & chr(10)
      next

      wscript.echo( VALUE ) ' print keyValue

      for N = 0 to 36 step 1
       KEY = KEY & round( N / 36, 5 ) & " "
      next

      wscript.echo( KEY ) ' print key

    -->
    <CoordinateInterpolator2D DEF="CI"
      key="
        0
        0.02778 0.05556 0.08333 0.11111 0.13889 0.16667 0.19444 0.22222 0.25
        0.27778 0.30556 0.33333 0.36111 0.38889 0.41667 0.44444 0.47222 0.5
        0.52778 0.55556 0.58333 0.61111 0.63889 0.66667 0.69444 0.72222 0.75
        0.77778 0.80556 0.83333 0.86111 0.88889 0.91667 0.94444 0.97222 1
      "
      keyValue="
        0 0 1 0 1 1 0 1
        0.09442 -0.07923 1.07923 0.09442 0.90558 1.07923 -0.07923 0.90558
        0.20116 -0.14086 1.14086 0.20116 0.79884 1.14086 -0.14086 0.79884
        0.31699 -0.18301 1.18301 0.31699 0.68301 1.18301 -0.18301 0.68301
        0.43837 -0.20442 1.20442 0.43837 0.56163 1.20442 -0.20442 0.56163
        0.56163 -0.20442 1.20442 0.56163 0.43837 1.20442 -0.20442 0.43837
        0.68301 -0.18301 1.18301 0.68301 0.31699 1.18301 -0.18301 0.31699
        0.79884 -0.14086 1.14086 0.79884 0.20116 1.14086 -0.14086 0.20116
        0.90558 -0.07923 1.07923 0.90558 0.09442 1.07923 -0.07923 0.09442
        1 0 1 1 0 1 0 0
        1.07923 0.09442 0.90558 1.07923 -0.07923 0.90558 0.09442 -0.07923
        1.14086 0.20116 0.79884 1.14086 -0.14086 0.79884 0.20116 -0.14086
        1.18301 0.31699 0.68301 1.18301 -0.18301 0.68301 0.31699 -0.18301
        1.20442 0.43837 0.56163 1.20442 -0.20442 0.56163 0.43837 -0.20442
        1.20442 0.56163 0.43837 1.20442 -0.20442 0.43837 0.56163 -0.20442
        1.18301 0.68301 0.31699 1.18301 -0.18301 0.31699 0.68301 -0.18301
        1.14086 0.79884 0.20116 1.14086 -0.14086 0.20116 0.79884 -0.14086
        1.07923 0.90558 0.09442 1.07923 -0.07923 0.09442 0.90558 -0.07923
        1 1 0 1 0 0 1 0
        0.90558 1.07923 -0.07923 0.90558 0.09442 -0.07923 1.07923 0.09442
        0.79884 1.14086 -0.14086 0.79884 0.20116 -0.14086 1.14086 0.20116
        0.68301 1.18301 -0.18301 0.68301 0.31699 -0.18301 1.18301 0.31699
        0.56163 1.20442 -0.20442 0.56163 0.43837 -0.20442 1.20442 0.43837
        0.43837 1.20442 -0.20442 0.43837 0.56163 -0.20442 1.20442 0.56163
        0.31699 1.18301 -0.18301 0.31699 0.68301 -0.18301 1.18301 0.68301
        0.20116 1.14086 -0.14086 0.20116 0.79884 -0.14086 1.14086 0.79884
        0.09442 1.07923 -0.07923 0.09442 0.90558 -0.07923 1.07923 0.90558
        0 1 0 0 1 0 1 1
        -0.07923 0.90558 0.09442 -0.07923 1.07923 0.09442 0.90558 1.07923
        -0.14086 0.79884 0.20116 -0.14086 1.14086 0.20116 0.79884 1.14086
        -0.18301 0.68301 0.31699 -0.18301 1.18301 0.31699 0.68301 1.18301
        -0.20442 0.56163 0.43837 -0.20442 1.20442 0.43837 0.56163 1.20442
        -0.20442 0.43837 0.56163 -0.20442 1.20442 0.56163 0.43837 1.20442
        -0.18301 0.31699 0.68301 -0.18301 1.18301 0.68301 0.31699 1.18301
        -0.14086 0.20116 0.79884 -0.14086 1.14086 0.79884 0.20116 1.14086
        -0.07923 0.09442 0.90558 -0.07923 1.07923 0.90558 0.09442 1.07923
        0 0 1 0 1 1 0 1
      "
    />

    <ROUTE fromNode="TS" fromField="fraction_changed"
             toNode="CI"   toField="set_fraction"/>
    <ROUTE fromNode="CI" fromField="value_changed"
             toNode="IB"   toField="set_texCoords"/>
    <ROUTE fromNode="CI" fromField="value_changed"
             toNode="TC"   toField="set_point"/>

    <KeySensor DEF="KS"/>
    <BooleanFilter DEF="BF"/>

    <ROUTE fromNode="KS" fromField="controlKey"
             toNode="BF"   toField="set_boolean"/>
    <ROUTE fromNode="BF" fromField="inputNegate"
             toNode="TS"   toField="set_enabled"/>
  </Scene>
</X3D>

but ImageBackground seems to ignore everything, despite the fact, that it does not ignore vertical or horizontal scaling via texCoords!

You wrote, that 'ImageBackground rendering is a little special' -- is that the cause or am I missing something?

BTW.:

  • It would be cool, if the user could set the default screen geometry in the 'Preferences'-menu of View3DScene (so that it ends up in the 'view3dscene.conf' file) and View3DScene from that point on would always start with the prefered screen size -- the example above for instance only works acceptable for quadratic ImageBackgrounds.

  • I think it would have been more 'elegant' to use a spline based interpolation for the computation of the texture coordinates, but SplinePositionInterpolator2D is for SFVec2f-output only. I tried to compensate the linear interpolation of CoordinateInterpolator2D by using 36 x 4 different s,t positions on the circular circumfence of the quad ...

  • Some of your animation examples on github (like animate_tex_coord.x3dv) were appearantly shifted to a deeper nested directory, so that all the texture/movie_texture references do not work anymore. In demo_models-3.9.0.zip everything seems to be alright.

  • I still couldn't find the reason, why InstantPlayer doesn't run on my system -- does it need
    Win10 Professional, a pure Intel processor as stated here (I've got a AMD E1-2500 mobility APU) or some exotic additional libraries/.dlls? -- I have trieded dozens of things, like installing as administrator, installing the old 32-bit versions of InstantReality, copying the mfc/vcrt120.dlls into InstantRealitiy's bin-directory, using sfc.exe and dism.exe to check for integrity faults in Win10's component store (WinSxS) and repair them etc. -- nothing worked: still error 0xC000007B -- and according to the internet, I am the only one among 7 billion inhabitants of this planet, who is experiencing this problem :(

But never mind -- if you please could:

  • add a geometry option to 'Preferences'-menu and 'view3dscene.conf'-file and
  • fix the ImageBackground texCoords animation issue or
  • tell me where I am mistaken,

I would be glad.

Please keep in mind, that I can not test my X3D files with InstantPlayer [see above] to see, if they work there -- so don't be angry at me, if I ask for something, that does not even work with InstantPlayer.

With best regards,

Elmar

P.S.: here are the test files: view3dscene_issue_19.zip

some collada files not rendered

looking at
https://github.com/KhronosGroup/glTF-Sample-Models/tree/master/sourceModels

2CylinderEngine : https://raw.githubusercontent.com/andreasplesch/glTF-Sample-Models/master/sourceModels/2CylinderEngine/2CylinderEngine.dae
has shapes and geometry but perhaps no materials ?
Buggy, GearBoxAssy: same issue

Duck, Brainstem, Monster work fine. It is possible to directly use the https raw links.
exported x3d here: https://github.com/andreasplesch/Library/tree/master/glTFSourceModels

(Brainstem has a great animation, but I see that animations are not supported.)

amdgpu shader compile fails - "unsized array index must be constant"

latest build / latest demos

3 warnings:

VRML/X3D: Cannot use GLSL shader for shape "Teapot": Geometry shader not compiled:
0:30(32): error: unsized array index must be constant
0:31(32): error: unsized array index must be constant
0:33(27): error: unsized array index must be constant
0:52(33): error: unsized array index must be constant
0:53(33): error: unsized array index must be constant
0:55(28): error: unsized array index must be constant

VRML/X3D: Cannot use GLSL shader for shape "Teapot": Geometry shader not compiled:
0:30(32): error: unsized array index must be constant
0:31(32): error: unsized array index must be constant
0:33(27): error: unsized array index must be constant
0:52(33): error: unsized array index must be constant
0:53(33): error: unsized array index must be constant
0:55(28): error: unsized array index must be constant

VRML/X3D: Cannot use GLSL shader for shape "Teapot": Geometry shader not compiled:
0:30(32): error: unsized array index must be constant
0:31(32): error: unsized array index must be constant
0:33(27): error: unsized array index must be constant
0:52(33): error: unsized array index must be constant
0:53(33): error: unsized array index must be constant
0:55(28): error: unsized array index must be constant

Scene URL: "....../demo_models/shaders/geometry_shader.x3dv".
Use "File->View Warnings" menu to view these warnings again.

noticed quite a while ago, didn't report due to thinking it was platform dependent, would be fixed, and this platform being rare, but still there and platform getting less rare?

HAnim conversion to xml inverts rotations

Converting the Lucy model from
http://www.seamless3d.com/browser_test/lucy_test0.x3dvz
to X3D XML encoding with 3.18 results in this file:
https://raw.githubusercontent.com/andreasplesch/x3dom/HAnim_work/test/functional/HAnim/Lucy_test0.x3d

It seems during conversion the rotations somehow get inverted.

Here is X3D XML encoded scene:
https://raw.githubusercontent.com/andreasplesch/x3dom/HAnim_work/test/functional/HAnim/Lucy_test0b.x3d
converted by
http://doc.instantreality.org/tools/x3d_encoding_converter/
It has correct rotations.

Cannot open Tinkercad OBJ files

As I heard view3dscene can convert files to X3D/VRML, the only main color formats supported by Shapeways, I tried opening an OBJ file from Tinkercad, which stores the model's solid colors in its MTL file. When opening a file from Tinkercad, this error appears:

Error while loading scene from [file path]: "0.0" is a invalid integer.

The MTL file it tries to read contains this:

# Color definition for Tinkercad Obj File 2015

newmtl color_16089887
Ka 0 0 0 
Kd 0.9607843137254902 0.5137254901960784 0.12156862745098039
d 1.0
illum 0.0

newmtl color_14900002
Ka 0 0 0 
Kd 0.8901960784313725 0.3568627450980392 0.13333333333333333
d 1.0
illum 0.0

newmtl color_16749622
Ka 0 0 0 
Kd 1 0.5803921568627451 0.21176470588235294
d 1.0
illum 0.0

newmtl color_16755294
Ka 0 0 0 
Kd 1 0.6666666666666666 0.3686274509803922
d 1.0
illum 0.0

newmtl color_16249585
Ka 0 0 0 
Kd 0.9686274509803922 0.9490196078431372 0.9450980392156862
d 1.0
illum 0.0

newmtl color_15708628
Ka 0 0 0 
Kd 0.9372549019607843 0.6941176470588235 0.8313725490196079
d 1.0
illum 0.0

newmtl color_16291485
Ka 0 0 0 
Kd 0.9725490196078431 0.5882352941176471 0.615686274509804
d 1.0
illum 0.0

newmtl color_7583832
Ka 0 0 0 
Kd 0.45098039215686275 0.7215686274509804 0.34509803921568627
d 1.0
illum 0.0

newmtl color_16448250
Ka 0 0 0 
Kd 0.9803921568627451 0.9803921568627451 0.9803921568627451
d 1.0
illum 0.0

newmtl color_8768998
Ka 0 0 0 
Kd 0.5215686274509804 0.803921568627451 0.9019607843137255
d 1.0
illum 0.0

newmtl color_4634441
Ka 0 0 0 
Kd 0.27450980392156865 0.7176470588235294 0.28627450980392155
d 1.0
illum 0.0

newmtl color_6550119
Ka 0 0 0 
Kd 0.38823529411764707 0.9490196078431372 0.403921568627451
d 1.0
illum 0.0

newmtl color_1206582
Ka 0 0 0 
Kd 0.07058823529411765 0.4117647058823529 0.21176470588235294
d 1.0
illum 0.0

newmtl color_2829873
Ka 0 0 0 
Kd 0.16862745098039217 0.1803921568627451 0.19215686274509805
d 1.0
illum 0.0

Reproducing

To reproduce this error, just extract the model files from this ZIP file then attempt to open the OBJ file in view3dscene. That error will appear then it will cancel loading the model.

New Juice Cylinder (1).zip

IntegerSequencer intervals

This test scene:

http://x3dom-sequencer-interval-test.glitch.me/IntegerKeyTest.x3d

has sequence keys=0,0.5,1 and keyValues=0,1,2

Most x3d browsers show this result:
key < 0: value is 0
key = 0: value is 0
key = 0.25: value is 0
key = 0.5: value is 1
key = 1: value is 2
key > 1: value is 2

However, view3dscene shows this result:
key < 0: value is 0
key = 0: value is 0
key = 0.25: value is 0
key = 0.5: value is 0
key = 1: value is 2
key > 1: value is 2

For key = 0.5 the second interval [0.5,1) should be selected giving a keyValue of 1 since 0.5 is part of this interval. 0.5 is excluded from the first interval [0,0.5).

It could be a floating point comparison issue.
This is probably more a castle-engine issue.

Viewpoint: centerOfRotation shifted in a strange way

Hi Michalis,

while testing some of my X3D files I came across a problem with the Viewpoint node:

centerOfRotation seems to get altered by some internal View3DScene mechanism under certain conditions (even when there is no explicit Viewpoint given in the X3D file)!

Here is a simple example:

<X3D profile="Full" version="3.3">
<Scene>

 <NavigationInfo type='"EXAMINE"'/>

 <Viewpoint/>

 <Shape>
   <Appearance>
     <Material/>
   </Appearance>
   <Box/>
 </Shape>

 <Transform DEF="CR">
   <Transform translation=".122 -.074 -.2">
     <Shape>
       <Text string='"test rotation centre (C) 22.09.2019 Elmar Knittel"'>
         <FontStyle size=".00426" family='"SANS"' justify='"END","END"'/>
       </Text>
     </Shape>
   </Transform>
 </Transform>

 <ProximitySensor DEF="PS" size="1e4 1e4 1e4"/>

 <ROUTE fromNode="PS" fromField="position_changed"
          toNode="CR"   toField="set_translation"/>
 <ROUTE fromNode="PS" fromField="orientation_changed"
          toNode="CR"   toField="set_rotation"/>

</Scene>
</X3D>

Try to rotate the cube and you'll see what I mean ...

My best guess: some automatic scene centering mechanism tries to compensate the movement of the Text node (which makes the scene somewhat 'a-symetrical').

I can correct this behavior partially by adding a big (size="40 40 40") fully transparent cube to the scene, but that's not really a good solution.

BTW.: When I try to print out the Viewpoint settings with "Clipboard -> Print Current Camera...", I only get position and orientation but not centerOfRotation and fieldOfView, which are essential to re-create the exact view!

So please:

  • Add centerOfRotation and fieldOfView to the "Print Current Camera..." menu and
  • Tell me how to get around the centerOfRotation problem.

With best regards,

Elmar

P.S.: here is the the test file: view3dscene_issue_20.zip

MouseWheel not working on Walk navigation

MouseWheel works on Walk navigation only after you select Fly (where Wheel works) and then select Walk again.

Can be reproduced by opening demo-models/navigation/type_nav.wrl

Still I think walking using MouseWheel is very strange. I still feel it would be best to use it to Rotate Up/Down instead for all of us who navigate using mouse exclusively.

Regardless on resolving the MouseWheel for walking or tilting, it is not possible to rotate the look even in view3dscene. It is very frustrating. What about setting keyU / keyJ (or any standard key, PageUp perhaps?) as defaults for Input_UpRotate / Input_DownRotate in CastleCameras for all CGE apps?

Converting X3D to VRML

In README.md there is mention on converting into VRML:

You can also convert all models to X3D or VRML.

But if open *.x3d file in view3dscene there are NO .wrl format to choose in "File > Save as VRML/X3D (classic encoding)..." — only *.x3dv is available to choose.

Also there are NO any CLI-arguments in tovrmlx3d to convert input files into VRML format (only X3D):

Make sure description fields from X3D4 are implemented in view3dscene (accessibility)

view3dscene reports an excess field, description, in at least 2 nodes. This is due to a number of description fields being added to X3D4. Two I found serendipitously are in nodes ImageTexture and HAnimDisplacer. As documented in emails from myself and Doug Sanden, the X3D Tooltips report that these are new to X3D4 (yellow background). AFAIK, this should not affect any functionality that i know of, except accessibility.

LayerSet/Layer seem **not** to work!

Hi Michalis,

I have been trying to establish a kind of static background image for one of my models.

In X3DOM there is the <Background backUrl='test.jpg'></Background>-trick (non-standard of course).

In Instant Reality Player there is PolygonBackground and ImageBackground (both non-standard too),

and then there are at least two ways to do it in standard-X3D:
<ScreenGroup> with <Billboard> and <LayerSet> with <Layer>

but all my attempts to make these two work in View3DScene failed!

The most interesting one for me is the LayerSet/Layer-approach, because this works in x_ite 4.5.11:

test_LayerSet_X_ITE_snapshot

Is there any other standard-X3D possibility to set a static background I have overlooked?

Please help!

Either give me a hint, how to do it, or fix the LayerSet/Layer-nodes, because they are very usefull for a lot of things, like HUDs, Copyrights, Backdrops etc.

With best regards,

Elmar

P.S.: here are my test files: view3dscene_issue_18.zip

Default Viewpoint at 0,0,0

In X3D scenes without an explicit viewpoint node, the initial camera position is at 0,0,0. However, the default X3D viewpoint position is at 0,0,10.
It is easy to use the menu to navigate to the default X3D viewpoint but it took me a while to realize that there was not any problem with a scene itself, just the ciew3dscene initial camera position.
Here is an example:
http://x3dom-integertrigger.glitch.me/IntegerTrigger_test.x3d

tovrmlx3d: glTF does not convert to X3D with tovrmlx3d and neither does .bin. I'm just interested in X3D at this point.

I'm hoping you can look into my glTF to X3D conversion request for your software? I think the glTF may have an embedded .bin file. I don't know if that's convertible or not. I don't even know what a .bin file is. It would seem that the glTF file including (or not including) the scene.bin would convert though. I guess X3DOM has a way to read .bin's. Here is the glTF link in question: http://www.kshell.com/pages/gltfassets/toomuchcoffee/scene.gltf There may be a creative commons license. Go to http://www.kshell.com/pages/gltfassets/toomuchcoffee/ for License and original model. I would love to see a snapshot of the scene in view3dscene on Linux! If you like, I will file an issue in your github repository. I assume I file it against the view3dscene repository?

GLTF Import Issue

Wasn't sure whether to put this in CGE or here but found it here so...

Kenney stuff is all CC0 so perfect for CGE...

Go grab the latest Kenney pack - https://www.kenney.nl/assets/city-kit-suburban

Extract it and navigate to Models/GLTF format

Try opening one of the *.glb models - Access Violation under Ubunto 20 + Windows 10

Works in Blender...

The OBJ is fine

Extrusion not working

Hi everyone,

I'm doing a comparision between different X3D players for my master thesis with Dr. Brutzman at the Naval Postgraduate School. I created a scene showing the Olympic Rings using extrusions. Your player gave me the hint, that something with my extrusion was wrong. I fixed the model and there are no more errors in the console. Octaga and Instant Reality are displaying it perfectly.
Could you help me to find out, whether it is an issue with my model or with the player?

You can find the model on gitlab.nps.edu:

https://gitlab.nps.edu/Savage/mv3204x3dforwebauthors/-/blob/master/assignments/DirectedStudy/Tobias/Scenes/OlympicRings.x3d

Thank you very much for your help.

Special Characters in default fonts are missing

I did some tests on localization with the default font. The German characters "ß,ä,ü,ö" are missing.

Console output:

3 warnings:

Font is missing glyph for character ß (Unicode number 223)
Font is missing glyph for character ä (Unicode number 228)
No further warnings about missing glyphs will be reported for this font (to avoid slowing down the application by flooding the log with warnings)

Scene URL: "file:///C:/NetBeans/mv3204x3dforwebauthors/assignments/DirectedStudy/Tobias/Scenes/HelloGermany.x3d".
snip
image

Cannot click buttons on macOS Retina screen

When running view3dscene on macOS (I have macOS 13.1 Ventura), I cannot click on any toolbar button. When I run menu command Help - About, I cannot even click the Close button, but I can close the About box using Enter.

Tested both on the stable release (v4.2.0) and daily snapshot (v4.3.0).

It seems the scene steals all mouse clicks, as I can drag-rotate the scene when I click on the toolbar buttons.

view3dscene 3.18.0 shader-pipeline issues on AMD E1-2500 APU (Radeon HD 8200/R3)

Hi, Michalis!

My name is Elmar Knittel and I live in Germany.

I've just tested the new version 3.18.0 of your fantastic
program "view3dscene" (best VRML-viewer ever) on Windows.

    view3dscene_3.18.0-win64-x86_64 on
    Windows 10.0.17763.134-x64-Home

The new shader-pipeline has some issues running on my
AMD E1-2500 APU (AMD Radeon HD 8200 / R3 Series, see below),
that weren't there with the fixed pipeline in ver 3.17.0
and which vanish if I use "--debug-enable-fixed-function"
or if I use additional VRML/X3D nodes (see examples).

===================================================================

A simple VRML 1.0 file like:

    #VRML V1.0 ascii
    Separator {
     Texture2 { image 1 1 3 -1 }
     Coordinate3 { point [ 0 1 0, -1 -1 0, 1 -1 0 ] }
     IndexedFaceSet { coordIndex [ 0,1,2,-1 ] }
    }

dosn't work, but adding:

    "MaterialBinding { value PER_PART }"

makes view3dscene 3.18.0 display the triangle correctly,
even without "--debug-enable-fixed-function" set:

    #VRML V1.0 ascii
    Separator {
     Texture2 { image 1 1 3 -1 }
     MaterialBinding { value PER_PART } # added line!
     Coordinate3 { point [ 0 1 0, -1 -1 0, 1 -1 0 ] }
     IndexedFaceSet { coordIndex [ 0,1,2,-1 ] }
    }

===================================================================

Almost the same goes for VRML97/X3D:

    #VRML V2.0 utf8
    Shape {
     appearance Appearance { material Material {}
      texture PixelTexture { image 1 1 3 -1 }
     }
     geometry IndexedFaceSet { coordIndex [ 0,1,2,-1 ]
      coord Coordinate { point [ 0 1 0, -1 -1 0, 1 -1 0 ] }
     }
    }

doesn't work, but adding:

    "color Color { color .8 .8 .8 } colorIndex [ 0,0,0 ]"

does the job:

    #VRML V2.0 utf8
    Shape {
     appearance Appearance { material Material {}
      texture PixelTexture { image 1 1 3 -1 }
     }
     geometry IndexedFaceSet { coordIndex [ 0,1,2,-1 ]
      coord Coordinate { point [ 0 1 0, -1 -1 0, 1 -1 0 ] }
      color Color { color .8 .8 .8 } colorIndex [ 0,0,0 ] # added line!
     }
    }

===================================================================

A second (minor) issue is that anti-aliasing is disabled when the option:

    "Screenshot to Image (Transparent Background) ..." or
    "Screenshot to Video / Multiple Images (Transparent Background) ..."

from the "Display" menu is chosen (all tested versions).

The resulting snapshots look pretty "jagged" at the object edges.

===================================================================

A third (minor) issue is that view3dscene (in all versions) doesn't
gracefully handle situations when the "view3dscene.conf" file is
read-only to guarantee the same settings for all VRML/X3D files.

    Exception 'EFCreateError'
    Unable to create file
    'C:\User\XXXX\AppData\Local\view3dscene\view3dscene.conf'

    An unhandled exception occurred at $000000010003293B:
    EFCreateError: Unable to create file
    'C:\User\XXXX\AppData\Local\view3dscene\view3dscene.conf'
    $000000010003293B
    $000 ... etc.

===================================================================

A fourth issue might be (I'm not shure) that "freetype-6.dll" is missing
in the downloadable ZIP-file from:

    "https://michalis.ii.uni.wroc.pl/view3dscene-snapshots/".

===================================================================

And at last a Cristmas wish:

    *Please* implement ECMA-Script for view3dscene,
    to make it more standard conformant and because
    there are thousands of VRML/X3D files using it.

With best regards, Elmar.

===================================================================

Radeon Softwareversion - 17.7
Radeon Software Edition - Crimson ReLive
Grafik-Chipsatz - AMD Radeon HD 8200 / R3 Series
CPU-Typ - AMD E1-2500 APU with Radeon(TM) HD Graphics

Driver Version - 17.30.1091.1011-170922a-318486C
Direct3D® Version - 9.14.10.01304
OpenGL® Version - 6.14.10.13492
OpenCL™ Version - 22.19.677.257
AMD Mantle-Version - 9.1.10.0220
AMD Mantle API-Version - 102400
Vulkan™ Driver Version - 1.6.0
Vulkan™ API Version - 1.0.51

===================================================================

OpenGL information (detected by view3dscene):

Version:
Version string: 4.5.13492 Compatibility Profile Context 22.19.677.257
Version parsed: major: 4, minor: 5, release exists: True, release: 13492,
vendor-specific information: "Compatibility Profile Context 22.19.677.257"
Vendor-specific version parsed: major: 22, minor: 19, release: 677
Vendor: ATI Technologies Inc.
Vendor type: ATI

Renderer: AMD Radeon HD 8200 / R3 Series
Fglrx (ATI on Linux): False
Mesa: False

Buggy glGenerateMipmap(EXT): False
Buggy GL_LIGHT_MODEL_TWO_SIDE: False
Buggy VBO: False
Buggy shader shadow map: False
Buggy FBO rendering to multi-sampling texture: False
Buggy FBO rendering to cube map texture: False
Buggy swap buffers with non-standard glViewport: False
Buggy 32-bit depth buffer: False
Buggy GLSL gl_FrontFacing: False
Buggy GLSL read varying: False
Buggy Pure Shader Pipeline: False


Real versions available:
(checks both version string and actual functions availability in GL library,
to secure from buggy OpenGL implementations)

1.2: True
1.3: True
1.4: True
1.5: True
2.0: True
2.1: True
3.0: True
3.1: True
3.2: True
3.3: True
4.0: True


Features:
Shaders (GLSL) support: Standard
=> Enable deprecated (fixed-function) support: False
Multi-texturing: True
Framebuffer Object: Standard (or ARB "core extension")
Multi-sampling for FBO buffers and textures: True
Vertex Buffer Object: True
GenerateMipmap available (and reliable): True
Cube map textures: Standard
Compressed textures supported: [DXT1_RGB, DXT1_RGBA, DXT3, DXT5]
3D textures: Standard
Textures non-power-of-2: True
Blend constant parameter: True
Float textures: True
Depth textures: True
Packed depth + stencil: True

All extensions:
GL_AMDX_debug_output
GL_AMD_blend_minmax_factor
GL_AMD_conservative_depth
GL_AMD_debug_output
GL_AMD_depth_clamp_separate
GL_AMD_draw_buffers_blend
GL_AMD_framebuffer_sample_positions
GL_AMD_gcn_shader
GL_AMD_gpu_shader_int64
GL_AMD_interleaved_elements
GL_AMD_multi_draw_indirect
GL_AMD_name_gen_delete
GL_AMD_occlusion_query_event
GL_AMD_performance_monitor
GL_AMD_pinned_memory
GL_AMD_query_buffer_object
GL_AMD_sample_positions
GL_AMD_seamless_cubemap_per_texture
GL_AMD_shader_atomic_counter_ops
GL_AMD_shader_stencil_export
GL_AMD_shader_stencil_value_export
GL_AMD_shader_trace
GL_AMD_shader_trinary_minmax
GL_AMD_sparse_texture
GL_AMD_sparse_texture_pool
GL_AMD_stencil_operation_extended
GL_AMD_texture_cube_map_array
GL_AMD_texture_texture4
GL_AMD_transform_feedback3_lines_triangles
GL_AMD_transform_feedback4
GL_AMD_vertex_shader_layer
GL_AMD_vertex_shader_viewport_index
GL_ARB_ES2_compatibility
GL_ARB_ES3_1_compatibility
GL_ARB_ES3_compatibility
GL_ARB_arrays_of_arrays
GL_ARB_base_instance
GL_ARB_bindless_texture
GL_ARB_blend_func_extended
GL_ARB_buffer_storage
GL_ARB_clear_buffer_object
GL_ARB_clear_texture
GL_ARB_clip_control
GL_ARB_color_buffer_float
GL_ARB_compatibility
GL_ARB_compressed_texture_pixel_storage
GL_ARB_compute_shader
GL_ARB_conditional_render_inverted
GL_ARB_conservative_depth
GL_ARB_copy_buffer
GL_ARB_copy_image
GL_ARB_cull_distance
GL_ARB_debug_output
GL_ARB_depth_buffer_float
GL_ARB_depth_clamp
GL_ARB_depth_texture
GL_ARB_derivative_control
GL_ARB_direct_state_access
GL_ARB_draw_buffers
GL_ARB_draw_buffers_blend
GL_ARB_draw_elements_base_vertex
GL_ARB_draw_indirect
GL_ARB_draw_instanced
GL_ARB_enhanced_layouts
GL_ARB_explicit_attrib_location
GL_ARB_explicit_uniform_location
GL_ARB_fragment_coord_conventions
GL_ARB_fragment_layer_viewport
GL_ARB_fragment_program
GL_ARB_fragment_program_shadow
GL_ARB_fragment_shader
GL_ARB_framebuffer_no_attachments
GL_ARB_framebuffer_object
GL_ARB_framebuffer_sRGB
GL_ARB_geometry_shader4
GL_ARB_get_program_binary
GL_ARB_get_texture_sub_image
GL_ARB_gl_spirv
GL_ARB_gpu_shader5
GL_ARB_gpu_shader_fp64
GL_ARB_half_float_pixel
GL_ARB_half_float_vertex
GL_ARB_imaging
GL_ARB_indirect_parameters
GL_ARB_instanced_arrays
GL_ARB_internalformat_query
GL_ARB_internalformat_query2
GL_ARB_invalidate_subdata
GL_ARB_map_buffer_alignment
GL_ARB_map_buffer_range
GL_ARB_multi_bind
GL_ARB_multi_draw_indirect
GL_ARB_multisample
GL_ARB_multitexture
GL_ARB_occlusion_query
GL_ARB_occlusion_query2
GL_ARB_pipeline_statistics_query
GL_ARB_pixel_buffer_object
GL_ARB_point_parameters
GL_ARB_point_sprite
GL_ARB_program_interface_query
GL_ARB_provoking_vertex
GL_ARB_query_buffer_object
GL_ARB_robust_buffer_access_behavior
GL_ARB_sample_shading
GL_ARB_sampler_objects
GL_ARB_seamless_cube_map
GL_ARB_seamless_cubemap_per_texture
GL_ARB_separate_shader_objects
GL_ARB_shader_atomic_counters
GL_ARB_shader_ballot
GL_ARB_shader_bit_encoding
GL_ARB_shader_draw_parameters
GL_ARB_shader_group_vote
GL_ARB_shader_image_load_store
GL_ARB_shader_image_size
GL_ARB_shader_objects
GL_ARB_shader_precision
GL_ARB_shader_stencil_export
GL_ARB_shader_storage_buffer_object
GL_ARB_shader_subroutine
GL_ARB_shader_texture_image_samples
GL_ARB_shader_texture_lod
GL_ARB_shader_viewport_layer_array
GL_ARB_shading_language_100
GL_ARB_shading_language_420pack
GL_ARB_shading_language_packing
GL_ARB_shadow
GL_ARB_shadow_ambient
GL_ARB_sparse_buffer
GL_ARB_sparse_texture
GL_ARB_stencil_texturing
GL_ARB_sync
GL_ARB_tessellation_shader
GL_ARB_texture_barrier
GL_ARB_texture_border_clamp
GL_ARB_texture_buffer_object
GL_ARB_texture_buffer_object_rgb32
GL_ARB_texture_buffer_range
GL_ARB_texture_compression
GL_ARB_texture_compression_bptc
GL_ARB_texture_compression_rgtc
GL_ARB_texture_cube_map
GL_ARB_texture_cube_map_array
GL_ARB_texture_env_add
GL_ARB_texture_env_combine
GL_ARB_texture_env_crossbar
GL_ARB_texture_env_dot3
GL_ARB_texture_float
GL_ARB_texture_gather
GL_ARB_texture_mirror_clamp_to_edge
GL_ARB_texture_mirrored_repeat
GL_ARB_texture_multisample
GL_ARB_texture_non_power_of_two
GL_ARB_texture_query_levels
GL_ARB_texture_query_lod
GL_ARB_texture_rectangle
GL_ARB_texture_rg
GL_ARB_texture_rgb10_a2ui
GL_ARB_texture_snorm
GL_ARB_texture_stencil8
GL_ARB_texture_storage
GL_ARB_texture_storage_multisample
GL_ARB_texture_swizzle
GL_ARB_texture_view
GL_ARB_timer_query
GL_ARB_transform_feedback2
GL_ARB_transform_feedback3
GL_ARB_transform_feedback_instanced
GL_ARB_transform_feedback_overflow_query
GL_ARB_transpose_matrix
GL_ARB_uniform_buffer_object
GL_ARB_vertex_array_bgra
GL_ARB_vertex_array_object
GL_ARB_vertex_attrib_64bit
GL_ARB_vertex_attrib_binding
GL_ARB_vertex_buffer_object
GL_ARB_vertex_program
GL_ARB_vertex_shader
GL_ARB_vertex_type_10f_11f_11f_rev
GL_ARB_vertex_type_2_10_10_10_rev
GL_ARB_viewport_array
GL_ARB_window_pos
GL_ATI_draw_buffers
GL_ATI_envmap_bumpmap
GL_ATI_fragment_shader
GL_ATI_separate_stencil
GL_ATI_texture_compression_3dc
GL_ATI_texture_env_combine3
GL_ATI_texture_float
GL_ATI_texture_mirror_once
GL_EXT_abgr GL_EXT_bgra
GL_EXT_bindable_uniform
GL_EXT_blend_color
GL_EXT_blend_equation_separate
GL_EXT_blend_func_separate
GL_EXT_blend_minmax
GL_EXT_blend_subtract
GL_EXT_compiled_vertex_array
GL_EXT_copy_buffer
GL_EXT_copy_texture
GL_EXT_depth_bounds_test
GL_EXT_direct_state_access
GL_EXT_draw_buffers2
GL_EXT_draw_instanced
GL_EXT_draw_range_elements
GL_EXT_fog_coord
GL_EXT_framebuffer_blit
GL_EXT_framebuffer_multisample
GL_EXT_framebuffer_object
GL_EXT_framebuffer_sRGB
GL_EXT_geometry_shader4
GL_EXT_gpu_program_parameters
GL_EXT_gpu_shader4
GL_EXT_histogram
GL_EXT_multi_draw_arrays
GL_EXT_packed_depth_stencil
GL_EXT_packed_float
GL_EXT_packed_pixels
GL_EXT_pixel_buffer_object
GL_EXT_point_parameters
GL_EXT_polygon_offset_clamp
GL_EXT_provoking_vertex
GL_EXT_rescale_normal
GL_EXT_secondary_color
GL_EXT_separate_specular_color
GL_EXT_shader_image_load_store
GL_EXT_shader_integer_mix
GL_EXT_shadow_funcs
GL_EXT_stencil_wrap
GL_EXT_subtexture
GL_EXT_texgen_reflection
GL_EXT_texture3D
GL_EXT_texture_array
GL_EXT_texture_buffer_object
GL_EXT_texture_compression_bptc
GL_EXT_texture_compression_latc
GL_EXT_texture_compression_rgtc
GL_EXT_texture_compression_s3tc
GL_EXT_texture_cube_map
GL_EXT_texture_edge_clamp
GL_EXT_texture_env_add
GL_EXT_texture_env_combine
GL_EXT_texture_env_dot3
GL_EXT_texture_filter_anisotropic
GL_EXT_texture_integer
GL_EXT_texture_lod
GL_EXT_texture_lod_bias
GL_EXT_texture_mirror_clamp
GL_EXT_texture_object
GL_EXT_texture_rectangle
GL_EXT_texture_sRGB
GL_EXT_texture_sRGB_decode
GL_EXT_texture_shared_exponent
GL_EXT_texture_snorm
GL_EXT_texture_storage
GL_EXT_texture_swizzle
GL_EXT_timer_query
GL_EXT_transform_feedback
GL_EXT_vertex_array
GL_EXT_vertex_array_bgra
GL_EXT_vertex_attrib_64bit
GL_IBM_texture_mirrored_repeat
GL_INTEL_fragment_shader_ordering
GL_KHR_context_flush_control
GL_KHR_debug
GL_KHR_robust_buffer_access_behavior
GL_KHR_robustness
GL_KTX_buffer_region
GL_NV_alpha_to_coverage_dither_control
GL_NV_blend_square
GL_NV_conditional_render
GL_NV_copy_depth_to_color
GL_NV_copy_image
GL_NV_depth_buffer_float
GL_NV_explicit_multisample
GL_NV_float_buffer
GL_NV_half_float
GL_NV_primitive_restart
GL_NV_texgen_reflection
GL_NV_texture_barrier
GL_OES_EGL_image
GL_SGIS_generate_mipmap
GL_SGIS_texture_edge_clamp
GL_SGIS_texture_lod
GL_SUN_multi_draw_arrays
GL_WIN_swap_hint
WGL_EXT_swap_control


OpenGL utility (GLU) version:
Version string: 1.2.2.0 Microsoft Corporation
Version parsed: major: 1, minor: 2, release exists: True, release: 2,
vendor-specific information: ".0 Microsoft Corporation"
Extensions: GL_EXT_bgra


Current buffers bit depths:
Color (red / green / blue / alpha): 8 / 8 / 8 / 8
Depth: 24
Index: 0
Stencil: 8
Accumulation (red / green / blue / alpha): 0 / 0 / 0 / 0
Double buffer: True
Multisampling (full-screen antialiasing): True
Current: 8 samples per pixel


Stack depths:
Attributes: 16
Client attributes: 16
Modelview: 32
Projection: 10
Texture: 10
Name: 64


Limits:
Max clip planes: 8
Max lights: 8
Max eval order: 40
Max list nesting: 64
Max pixel map table: 256
Max texture size: 16384
Max viewport dims: width 16384 / height 16384
Max texture units (shader pipeline): 32
Max texture units (fixed-function): 8
Max cube map texture size: 16384
Max 3d texture size: 2048
Max texture max anisotropy: 16
Query counter bits (for occlusion query): 32
Max renderbuffer size: 16384


Memory (in Kb):
Total: 0 (unknown)
Current: 0 (unknown)
Current for VBO: 0 (unknown)
Current for Textures: 0 (unknown)
Current for Renderbuffers: 0 (unknown)

Compilation from sources instructions do not work.

Can not be compiled from source.

When trying step 7 of https://castle-engine.io/compiling_from_source.php

2021-12-12 23_40_33-Total Commander (x64) 9 51 - LLC RPE ''Informatsia-Ekonomika''

Looks trivial, but who knows.

Also, probably unrelated, when i click on the striken-out files and then say "no" to new file creation prompt - the IDE gives me a totalyl undecipherable AV window.

Also, why compilation from sources manual contain those "copy exe file" instructions? Won't it be better to setuup the project just to output release exe there? Maybe i am saying something stupid, as i am coming from Delphi background, but that is what i'd be doing in Delphi as default option.

white space in front of castlescript: identifier

In x3d encoding, leading white space in front of the castlescript: identifier in the value for the url field of a script node provokes a parsing error.

Perhaps this is intended but probably not. Could provide an example by converting the ballgame example to x3d and adding a space.

4th order NurbsPatchSurface node **not** rendered correctly!

Hi Michalis,

I have found a Utah teapot that uses Bezier-patches in Renderman .RIB format here and converted it with the help of Ayam 1.26 and WhiteDune 1.212 and a lot of manual simplification to X3D/X3DOM!

Rendered with X3DOM-1.8.1-dev snapshot it looks like this:
uteapot_x3dom

but rendered with View3dscene 3.18.0-20190817 (zoomed to the max) it looks like this:
uteapot_view3dscene

Am I missing something?

Because this renders O.K.! -- look here:
v3_NurbsPatchSurface_xonon_VIEW3DSCENE

I don't get it! Why does the spaceship (composed of 6 order-4-NurbsPatchSurface-nodes) work and the teapot (composed of 64 order-4-NurbsPatchSurface-nodes) doesn't?

May-be because I omitted the weight-property?

It would be: weight='1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1' for all NurbsPatchSurface-Nodes and seems to be omittable, because according to the spec, the default weight of 1.0 is assumed for each control point.

Please help me!

With best regards,

Elmar

P.S.: I attach the used files: view3dscene_issue_17.zip

ecmascript: protocol not recognized

Script nodes can have inlined code using a special ecmascript protocol. Here is an example:

http://www.web3d.org/x3d/content/examples/ConformanceNist/Miscellaneous/Script/ScriptNodeEventOutControl_EcmaScriptIndex.html

The x3d:
http://www.web3d.org/x3d/content/examples/ConformanceNist/Miscellaneous/Script/ScriptNodeEventOutControl_EcmaScript.x3d

There is an error that no supported protocol is found and script is ignored,

This is especially useful for protos in order to keep everything in a single file.

tovrmlx3d hangs on conversion

I have a VRML 2.0 file created by a third party that I am trying to convert to X3D. When using tovrmlx3d it prints a load of warnings such as:
tovrmlx3d: Warning: VRML/X3D: Cycles in VRML/X3D graph: USE clause inside node "Caution_1_d31" refers to the same node
but then seems to just hang and never completes. I have tried v4.0.0 and v4.1.0.

Can anyone offer any guidance?

View3dScene isn't network enabled

OK - maybe I'm expecting too much :)

I just threw together a test for the new and really useful TextureNode.LoadFromImage(TextureImage, TakeOwnership, ImageURL);

I noticed I can set the URL to wherever I want so I set it to the real URL (even though testing with a local copy) and used the new SaveNode method to write out the x3dv

Loading the x3dv back into view3dscene raises the following warnings...

The 'back.jpg' I can actually correct for now (static, local) but the internetified image (its real) needs TDownload enabling

2 warnings:

Texture: Cannot load the texture:
  Error EDownloadError when loading texture from URL "https://c1.scryfall.com/file/scryfall-cards/large/front/1/6/161d1277-05e8-4503-a3a5-4d47309abdd0.jpg?1600982001;": Downloading network resources (from "http" or "https" protocols) is not enabled
Texture: Cannot load the texture:
  Error EDownloadError when loading texture from URL "castle-data:/back.png": Error when downloading "castle-data:/back.png": Exception "EFOpenError":
Unable to open file "C:\dev\view3dscene\back.png": The system cannot find the file specified.

Scene URL: "C:\dev\play\ArtCards\data\scene.x3dv".
Use "File->View Warnings" menu to view these warnings again.

negative scale (reflected) geometry has incorrect lighting

below code, (white box with reflected box next to it) produces this....

box_0

<?xml version="1.0" encoding="UTF-8"?>
<X3D profile="Interchange" version="3.0">
<head>
	<meta name="generator" content="view3dscene, http://castle-engine.sourceforge.net/view3dscene.php" />
</head>
<Scene>
	<Shape DEF="whitebox">
		<Appearance>
			<Material />
		</Appearance>
		<Box />
	</Shape>
	<Transform
		scale="-1 1 1"
		translation="2 0 0">
		<Shape USE="whitebox" />
	</Transform>
</Scene>
</X3D>

Material node changed behavior after introduction of PhysicalMaterial/UnlitMaterial

Hi Michalis,

it's me, Elmar (again).

I recently stumbled over a regression issue in the newest CGE/View3DScene:

view3dscene-3.18.0-win64-x86_64.zip - 2020-04-01 08:27

Since the introduction of PhysicalMaterial/UnlitMaterial the old (v3.x-style)
Material node behaves differently regarding emissiveColor and its relation to
diffuseColor.

#X3D V3.3 utf8
PROFILE Full
Shape {
 appearance Appearance {
  material Material { diffuseColor 0 0 0 emissiveColor 1 0 0 }
 }
 geometry Box {}
}

used to produce a pure emissive red material -- but now its pitch black and
by this breaks backward compatibility to over 1500 of my VRML/X3D-files.

Increasing the amount of diffuseColor just a tiny bit, like so:

#X3D V3.3 utf8
PROFILE Full
Shape {
 appearance Appearance {
  material Material { diffuseColor 1e-6 1e-6 1e-6 emissiveColor 1 0 0 }
 }
 geometry Box {}
}

brings back the original behavior that worked for many years...

You probably understand, that I would rather not change all my existing files
to comply with the new behavior - though I intend to use UnlitMaterial in
future files as soon as X3D v4.0 is official.

Meanwhile I use:

#X3D V3.3 utf8
PROFILE Full
Shape {
 appearance Appearance {
  texture PixelTexture { image 1 1 3 0xFF0000 }
 }
 geometry Box {}
}

which is shorter and an acceptable workaround for the time beeing...

I hope it is possible to fix this, without tempering with the new PBR features!

With best regards,

Elmar

P.S.:

The new glTF/glb feature (skinned animation) is really cool - though it does
not work with all files I've tested so far, e.g. "Bee.glb" that came with
Microsoft's 3D-Viewer v5.1811.27012.0: it takes very long to load (normal),
does not display any of the textures (just dull grey) and the animations are
extremly slowly
- even when I throttle up animation speed to maximum!

PasGLTFViewer (https://github.com/BeRo1985/pasgltf) has no issues with "Bee.glb"!

You can download "Bee.glb" (20MB) from:

https://github.com/leation/mydata/raw/master/Bee.glb

Error when initializing GLSL shader for ScreenEffects

Hi Michalis,

its me, Elmar.

I discovered that recent view3dscene win64 compiles (view3dscene-3.19.0-win64-x86_64.zip - 24-Jan-2021 19:59 - 6573059) show an GLSL shader compile error in the logfile (see attached/zipped view3dscene.log) for all built-in effect shaders,

Warning: GLSL: Error when initializing GLSL shader for ScreenEffect[Visualize Depth]: Fragment shader not compiled:
Fragment shader failed to compile with the following errors:
ERROR: 0:247: error(#132) Syntax error: ")" parse error
ERROR: error(#273) 1 compilation errors.  No code generated

that didn't occur with older versions of view3dscene (like: view3dscene_3.19.0-win64-x86_64 - 23-Oct-2020 08:00), so that
the built-in effect shaders can't be activated from the menu (e.g.: View->Screen Effects->Visualize Depth) anymore, no matter
if used with or without --debug-enable-fixed-function

Effect shaders within loaded x3d/x3dv-files (example included in zip file) seem to work, as far I can tell.

Please help...

Yours,
Elmar

view3dscene_log_plus_example_x3dv.zip

SpotLight ambientIntensity being applied regionally.(as Intensity.)

bit of rare case, but saw it, so reporting.

example; (with lighting setup to maximise effect.)

light_street_lights_radius_0
(view3dscene 3.18 phong lighting)

#VRML V2.0 utf8

DEF _1 SpotLight {
  intensity 0
  ambientIntensity 1
  location 1.27471 2 1.64777e-08
  direction -7.45057e-09 1.49012e-08 -1
}

Shape {
  appearance Appearance {
    material Material {
      ambientIntensity 1
    }
  }
  geometry Box {
    size 3.09537 3.09537 10.7638
  }
}

NavigationInfo {
  headlight FALSE
}

Examine: scale/rotate produce odd results

Hi Michalis,

it's again me, Elmar!

I've tested the latest view3dscene-4.3.0-win64-x86_64 from 14-Dec-2022 02:55.

When I scale in and out my test-scene (see attachment), the scaling gets "stuck" at some point and rotating disjoints the red cube from its center position.

The latter problem vanishes if I out-comment "ROUTE PS.position_changed TO COPYRIGHT.set_translation".

These problems do not occur with version 4.2.0 of view3dscene ...

Please help!

Regards,

Elmar

#X3D V4.0 utf8

PROFILE Full

Viewpoint { fieldOfView .4 }

DEF RED_BOX Shape {
 appearance Appearance { material Material { diffuseColor 1 0 0 } }
 geometry Box {}
}
DEF BLUE_BACKGROUND Transform {
 scale -20 20 20 children Shape {
  appearance Appearance { material UnlitMaterial { emissiveColor 0 0 .5 } }
  geometry Box {}
 }
}
DEF COPYRIGHT Transform {
 children Transform {
  translation .056 -.037 -.2 children Shape {
   geometry Text {
    string "test scale/rotate (C) 09.12.2022 Elmar Knittel"
    fontStyle FontStyle { size 0.00213 family "SANS" justify "END" }
   }
  }
 }
}
DEF PS ProximitySensor { size 1e4 1e4 1e4 }
ROUTE PS.position_changed TO COPYRIGHT.set_translation
ROUTE PS.orientation_changed TO COPYRIGHT.set_rotation

view3dscene_issue_46.zip

Anchor causes access violation in View3dScene

When I use an Anchor to switch from one VRML (or X3D) file to another, View3DScene reports an "access violation", although you can continue to browse the new file. My experimentation finds that this occurs only if there is a script in the 2nd file of type "castlescript". Because if I overtype the script type with "javascript", although this would keep the script from working, it does get rid of the access violation.

To help you recreate the bug, I have attached two small vrml files redcube.txt and bluecube.txt. Change the extension of both to .wrl then open redcube.wrl in View3DScene. Click on the red cube, which will transfer you to bluecube.wrl. A do-nothing castlescript was included in bluecube.wrl, which causes the access violation. Try replacing "castlescript:" with "javascript:", and see if this eliminates this fault.

bluecube.txt
redcube.txt

view3dscene gLTF error on NVIDIA

Hi,

I got this error when open gLTF model on view3dscene (NVIDIA)
this problem about my model or view3dscene?
(after disable NVIDIA on device manager, everything working normal)

e1

1 warnings:

VRML/X3D: Cannot use GLSL shader for shape "IndexedTriangleSet": Fragment shader not compiled:
0(167) : error C1317: qualified actual parameter #2 cannot be converted to less qualified parameter ("materialInfo")

Scene URL: "file:///I:/Ortak/nesne%2015.04/agac.gltf".
Use "File->View Warnings" menu to view these warnings again.


OpenGL information (detected by view3dscene):


Version:
Version string: 4.6.0 NVIDIA 417.35
Version parsed: major: 4, minor: 6, release exists: True, release: 0, vendor-specific information: "NVIDIA 417.35"
Vendor-specific version parsed: major: 417, minor: 35, release: 0
Vendor: NVIDIA Corporation
Vendor type: Nvidia

Renderer: GeForce GTX 1050 Ti/PCIe/SSE2
Fglrx (ATI on Linux): False
Mesa: False

Buggy glGenerateMipmap(EXT): False
Buggy GL_LIGHT_MODEL_TWO_SIDE: False
Buggy VBO: False
Buggy shader shadow map: False
Buggy FBO rendering to multi-sampling texture: False
Buggy FBO rendering to cube map texture: False
Buggy swap buffers with non-standard glViewport: False
Buggy 32-bit depth buffer: False
Buggy GLSL gl_FrontFacing: False
Buggy GLSL read varying: False
Buggy Pure Shader Pipeline: False


Real versions available:
(checks both version string and actual functions availability in GL library, to secure from buggy implementations)

1.2: True
1.3: True
1.4: True
1.5: True
2.0: True
2.1: True
3.0: True
3.1: True
3.2: True
3.3: True
4.0: True


Features:
Shaders (GLSL) support: Standard
=> Enable deprecated (fixed-function) support: False
Multi-texturing: True
Framebuffer Object: Standard (or ARB "core extension")
Multi-sampling for FBO buffers and textures: True
Vertex Buffer Object: True
GenerateMipmap available (and reliable): True
Cube map textures: Standard
Compressed textures supported: [DXT1_RGB, DXT1_RGBA, DXT3, DXT5]
3D textures: Standard
Textures non-power-of-2: True
Blend constant parameter: True
Float textures: True
Depth textures: True
Packed depth + stencil: True

All extensions: GL_AMD_multi_draw_indirect GL_AMD_seamless_cubemap_per_texture GL_AMD_vertex_shader_viewport_index GL_AMD_vertex_shader_layer GL_ARB_arrays_of_arrays GL_ARB_base_instance GL_ARB_bindless_texture GL_ARB_blend_func_extended GL_ARB_buffer_storage GL_ARB_clear_buffer_object GL_ARB_clear_texture GL_ARB_clip_control GL_ARB_color_buffer_float GL_ARB_compatibility GL_ARB_compressed_texture_pixel_storage GL_ARB_conservative_depth GL_ARB_compute_shader GL_ARB_compute_variable_group_size GL_ARB_conditional_render_inverted GL_ARB_copy_buffer GL_ARB_copy_image GL_ARB_cull_distance GL_ARB_debug_output GL_ARB_depth_buffer_float GL_ARB_depth_clamp GL_ARB_depth_texture GL_ARB_derivative_control GL_ARB_direct_state_access GL_ARB_draw_buffers GL_ARB_draw_buffers_blend GL_ARB_draw_indirect GL_ARB_draw_elements_base_vertex GL_ARB_draw_instanced GL_ARB_enhanced_layouts GL_ARB_ES2_compatibility GL_ARB_ES3_compatibility GL_ARB_ES3_1_compatibility GL_ARB_ES3_2_compatibility GL_ARB_explicit_attrib_location GL_ARB_explicit_uniform_location GL_ARB_fragment_coord_conventions GL_ARB_fragment_layer_viewport GL_ARB_fragment_program GL_ARB_fragment_program_shadow GL_ARB_fragment_shader GL_ARB_fragment_shader_interlock GL_ARB_framebuffer_no_attachments GL_ARB_framebuffer_object GL_ARB_framebuffer_sRGB GL_ARB_geometry_shader4 GL_ARB_get_program_binary GL_ARB_get_texture_sub_image GL_ARB_gl_spirv GL_ARB_gpu_shader5 GL_ARB_gpu_shader_fp64 GL_ARB_gpu_shader_int64 GL_ARB_half_float_pixel GL_ARB_half_float_vertex GL_ARB_imaging GL_ARB_indirect_parameters GL_ARB_instanced_arrays GL_ARB_internalformat_query GL_ARB_internalformat_query2 GL_ARB_invalidate_subdata GL_ARB_map_buffer_alignment GL_ARB_map_buffer_range GL_ARB_multi_bind GL_ARB_multi_draw_indirect GL_ARB_multisample GL_ARB_multitexture GL_ARB_occlusion_query GL_ARB_occlusion_query2 GL_ARB_parallel_shader_compile GL_ARB_pipeline_statistics_query GL_ARB_pixel_buffer_object GL_ARB_point_parameters GL_ARB_point_sprite GL_ARB_polygon_offset_clamp GL_ARB_post_depth_coverage GL_ARB_program_interface_query GL_ARB_provoking_vertex GL_ARB_query_buffer_object GL_ARB_robust_buffer_access_behavior GL_ARB_robustness GL_ARB_sample_locations GL_ARB_sample_shading GL_ARB_sampler_objects GL_ARB_seamless_cube_map GL_ARB_seamless_cubemap_per_texture GL_ARB_separate_shader_objects GL_ARB_shader_atomic_counter_ops GL_ARB_shader_atomic_counters GL_ARB_shader_ballot GL_ARB_shader_bit_encoding GL_ARB_shader_clock GL_ARB_shader_draw_parameters GL_ARB_shader_group_vote GL_ARB_shader_image_load_store GL_ARB_shader_image_size GL_ARB_shader_objects GL_ARB_shader_precision GL_ARB_shader_storage_buffer_object GL_ARB_shader_subroutine GL_ARB_shader_texture_image_samples GL_ARB_shader_texture_lod GL_ARB_shading_language_100 GL_ARB_shader_viewport_layer_array GL_ARB_shading_language_420pack GL_ARB_shading_language_include GL_ARB_shading_language_packing GL_ARB_shadow GL_ARB_sparse_buffer GL_ARB_sparse_texture GL_ARB_sparse_texture2 GL_ARB_sparse_texture_clamp GL_ARB_spirv_extensions GL_ARB_stencil_texturing GL_ARB_sync GL_ARB_tessellation_shader GL_ARB_texture_barrier GL_ARB_texture_border_clamp GL_ARB_texture_buffer_object GL_ARB_texture_buffer_object_rgb32 GL_ARB_texture_buffer_range GL_ARB_texture_compression GL_ARB_texture_compression_bptc GL_ARB_texture_compression_rgtc GL_ARB_texture_cube_map GL_ARB_texture_cube_map_array GL_ARB_texture_env_add GL_ARB_texture_env_combine GL_ARB_texture_env_crossbar GL_ARB_texture_env_dot3 GL_ARB_texture_filter_anisotropic GL_ARB_texture_filter_minmax GL_ARB_texture_float GL_ARB_texture_gather GL_ARB_texture_mirror_clamp_to_edge GL_ARB_texture_mirrored_repeat GL_ARB_texture_multisample GL_ARB_texture_non_power_of_two GL_ARB_texture_query_levels GL_ARB_texture_query_lod GL_ARB_texture_rectangle GL_ARB_texture_rg GL_ARB_texture_rgb10_a2ui GL_ARB_texture_stencil8 GL_ARB_texture_storage GL_ARB_texture_storage_multisample GL_ARB_texture_swizzle GL_ARB_texture_view GL_ARB_timer_query GL_ARB_transform_feedback2 GL_ARB_transform_feedback3 GL_ARB_transform_feedback_instanced GL_ARB_transform_feedback_overflow_query GL_ARB_transpose_matrix GL_ARB_uniform_buffer_object GL_ARB_vertex_array_bgra GL_ARB_vertex_array_object GL_ARB_vertex_attrib_64bit GL_ARB_vertex_attrib_binding GL_ARB_vertex_buffer_object GL_ARB_vertex_program GL_ARB_vertex_shader GL_ARB_vertex_type_10f_11f_11f_rev GL_ARB_vertex_type_2_10_10_10_rev GL_ARB_viewport_array GL_ARB_window_pos GL_ATI_draw_buffers GL_ATI_texture_float GL_ATI_texture_mirror_once GL_S3_s3tc GL_EXT_texture_env_add GL_EXT_abgr GL_EXT_bgra GL_EXT_bindable_uniform GL_EXT_blend_color GL_EXT_blend_equation_separate GL_EXT_blend_func_separate GL_EXT_blend_minmax GL_EXT_blend_subtract GL_EXT_compiled_vertex_array GL_EXT_Cg_shader GL_EXT_depth_bounds_test GL_EXT_direct_state_access GL_EXT_draw_buffers2 GL_EXT_draw_instanced GL_EXT_draw_range_elements GL_EXT_fog_coord GL_EXT_framebuffer_blit GL_EXT_framebuffer_multisample GL_EXTX_framebuffer_mixed_formats GL_EXT_framebuffer_multisample_blit_scaled GL_EXT_framebuffer_object GL_EXT_framebuffer_sRGB GL_EXT_geometry_shader4 GL_EXT_gpu_program_parameters GL_EXT_gpu_shader4 GL_EXT_multi_draw_arrays GL_EXT_packed_depth_stencil GL_EXT_packed_float GL_EXT_packed_pixels GL_EXT_pixel_buffer_object GL_EXT_point_parameters GL_EXT_polygon_offset_clamp GL_EXT_post_depth_coverage GL_EXT_provoking_vertex GL_EXT_raster_multisample GL_EXT_rescale_normal GL_EXT_secondary_color GL_EXT_separate_shader_objects GL_EXT_separate_specular_color GL_EXT_shader_image_load_formatted GL_EXT_shader_image_load_store GL_EXT_shader_integer_mix GL_EXT_shadow_funcs GL_EXT_sparse_texture2 GL_EXT_stencil_two_side GL_EXT_stencil_wrap GL_EXT_texture3D GL_EXT_texture_array GL_EXT_texture_buffer_object GL_EXT_texture_compression_dxt1 GL_EXT_texture_compression_latc GL_EXT_texture_compression_rgtc GL_EXT_texture_compression_s3tc GL_EXT_texture_cube_map GL_EXT_texture_edge_clamp GL_EXT_texture_env_combine GL_EXT_texture_env_dot3 GL_EXT_texture_filter_anisotropic GL_EXT_texture_filter_minmax GL_EXT_texture_integer GL_EXT_texture_lod GL_EXT_texture_lod_bias GL_EXT_texture_mirror_clamp GL_EXT_texture_object GL_EXT_texture_shared_exponent GL_EXT_texture_sRGB GL_EXT_texture_sRGB_R8 GL_EXT_texture_sRGB_decode GL_EXT_texture_storage GL_EXT_texture_swizzle GL_EXT_timer_query GL_EXT_transform_feedback2 GL_EXT_vertex_array GL_EXT_vertex_array_bgra GL_EXT_vertex_attrib_64bit GL_EXT_window_rectangles GL_EXT_import_sync_object GL_IBM_rasterpos_clip GL_IBM_texture_mirrored_repeat GL_KHR_context_flush_control GL_KHR_debug GL_EXT_memory_object GL_EXT_memory_object_win32 GL_EXT_win32_keyed_mutex GL_KHR_parallel_shader_compile GL_KHR_no_error GL_KHR_robust_buffer_access_behavior GL_KHR_robustness GL_EXT_semaphore GL_EXT_semaphore_win32 GL_KTX_buffer_region GL_NV_alpha_to_coverage_dither_control GL_NV_bindless_multi_draw_indirect GL_NV_bindless_multi_draw_indirect_count GL_NV_bindless_texture GL_NV_blend_equation_advanced GL_NV_blend_equation_advanced_coherent GL_NVX_blend_equation_advanced_multi_draw_buffers GL_NV_blend_minmax_factor GL_NV_blend_square GL_NV_clip_space_w_scaling GL_NV_command_list GL_NV_compute_program5 GL_NV_conditional_render GL_NV_conservative_raster GL_NV_conservative_raster_dilate GL_NV_conservative_raster_pre_snap_triangles GL_NV_copy_depth_to_color GL_NV_copy_image GL_NV_depth_buffer_float GL_NV_depth_clamp GL_NV_draw_texture GL_NV_draw_vulkan_image GL_NV_ES1_1_compatibility GL_NV_ES3_1_compatibility GL_NV_explicit_multisample GL_NV_feature_query GL_NV_fence GL_NV_fill_rectangle GL_NV_float_buffer GL_NV_fog_distance GL_NV_fragment_coverage_to_color GL_NV_fragment_program GL_NV_fragment_program_option GL_NV_fragment_program2 GL_NV_fragment_shader_interlock GL_NV_framebuffer_mixed_samples GL_NV_framebuffer_multisample_coverage GL_NV_geometry_shader4 GL_NV_geometry_shader_passthrough GL_NV_gpu_program4 GL_NV_internalformat_sample_query GL_NV_gpu_program4_1 GL_NV_gpu_program5 GL_NV_gpu_program5_mem_extended GL_NV_gpu_program_fp64 GL_NV_gpu_shader5 GL_NV_half_float GL_NV_light_max_exponent GL_NV_memory_attachment GL_NV_multisample_coverage GL_NV_multisample_filter_hint GL_NV_occlusion_query GL_NV_packed_depth_stencil GL_NV_parameter_buffer_object GL_NV_parameter_buffer_object2 GL_NV_path_rendering GL_NV_path_rendering_shared_edge GL_NV_pixel_data_range GL_NV_point_sprite GL_NV_primitive_restart GL_NV_query_resource GL_NV_query_resource_tag GL_NV_register_combiners GL_NV_register_combiners2 GL_NV_sample_locations GL_NV_sample_mask_override_coverage GL_NV_shader_atomic_counters GL_NV_shader_atomic_float GL_NV_shader_atomic_float64 GL_NV_shader_atomic_fp16_vector GL_NV_shader_atomic_int64 GL_NV_shader_buffer_load GL_NV_shader_storage_buffer_object GL_NV_stereo_view_rendering GL_NV_texgen_reflection GL_NV_texture_barrier GL_NV_texture_compression_vtc GL_NV_texture_env_combine4 GL_NV_texture_multisample GL_NV_texture_rectangle GL_NV_texture_rectangle_compressed GL_NV_texture_shader GL_NV_texture_shader2 GL_NV_texture_shader3 GL_NV_transform_feedback GL_NV_transform_feedback2 GL_NV_uniform_buffer_unified_memory GL_NV_vertex_array_range GL_NV_vertex_array_range2 GL_NV_vertex_attrib_integer_64bit GL_NV_vertex_buffer_unified_memory GL_NV_vertex_program GL_NV_vertex_program1_1 GL_NV_vertex_program2 GL_NV_vertex_program2_option GL_NV_vertex_program3 GL_NV_viewport_array2 GL_NV_viewport_swizzle GL_NVX_conditional_render GL_NVX_gpu_memory_info GL_NVX_multigpu_info GL_NVX_nvenc_interop GL_NV_shader_thread_group GL_NV_shader_thread_shuffle GL_KHR_blend_equation_advanced GL_KHR_blend_equation_advanced_coherent GL_OVR_multiview GL_OVR_multiview2 GL_SGIS_generate_mipmap GL_SGIS_texture_lod GL_SGIX_depth_texture GL_SGIX_shadow GL_SUN_slice_accum GL_WIN_swap_hint WGL_EXT_swap_control


OpenGL utility (GLU) version:
Version string: 1.2.2.0 Microsoft Corporation
Version parsed: major: 1, minor: 2, release exists: True, release: 2, vendor-specific information: ".0 Microsoft Corporation"
Extensions: GL_EXT_bgra


Current buffers bit depths:
Color (red / green / blue / alpha): 8 / 8 / 8 / 0
Depth: 24
Index: 0
Stencil: 8
Accumulation (red / green / blue / alpha): 16 / 16 / 16 / 16
Double buffer: True
Multisampling (full-screen antialiasing): True
Current: 1 samples per pixel


Stack depths:
Attributes: 16
Client attributes: 16
Modelview: 32
Projection: 4
Texture: 10
Name: 128


Limits:
Max clip planes: 8
Max lights: 8
Max eval order: 8
Max list nesting: 64
Max pixel map table: 65536
Max texture size: 32768
Max viewport dims (width, height): 32768 32768
Max texture units (shader pipeline): 32
Max texture units (fixed-function): 4
Max cube map texture size: 32768
Max 3d texture size: 16384
Max texture max anisotropy: 16
Query counter bits (for occlusion query): 32
Max renderbuffer size: 32768


Memory (in Kb):
Total: 4194304
Current: 4027964
Current for VBO: 0 (unknown)
Current for Textures: 0 (unknown)
Current for Renderbuffers: 0 (unknown)

diffuseColor should be ignored when there's an RGB texture

According to the spec, when a shape is lit and there's an RGB texture, IDRGB should not be used.

Some further discussion at create3000/x_ite#50, including a note that ignoring the spec does give more flexibility, but the concerns about feasibility of detecting RGB vs intensity textures shouldn't apply in a non-web context (although I don't know what other considerations may be at play).

This affects ability to view spec compliant files, although switching a default now could adversely affect compatibility with assets intended for use with Castle Engine.

DiffuseColor.zip (relevant file is HelloWorld.wrl)

macOS 64 bit release

Hi i was using view3dscene. since i updated to mac os catalina i'm not able to run the app anymore. does it exists a 64 bit release for mac os?

is there any other free software able to view wrl files on mac os?

Effect Shader does *NOT* work anymore

Hi Michalis,

it's me, Elmar (again) ...

I've just tested the latest snapshot of View3DScene.exe

view3dscene-3.18.0-win64-x86_64.zip | 2020-03-10 06:09 | 4.1M | Latest Windows version (64-bit)

and got following complaint by view3dscene when I use an 'Effect' shader:

VRML/X3D: Plug name "texture_apply" not declared (in shader type "Fragment")

although this file worked perfectly with an older view3dscene snapshot from 2020-02-20!

it should look like this:
BackFog_animated fx

It does work when I use a complete 'ComposedShader' --- am I missing something?

I'll attach the test files (both: Effect shader and ComposedShader version) for you to test.

Please help!

With best regards,

Elmar

view3dscene_issue_24.zip

Errors when reading simple Wavefront Object file (.obj+.mtl)

Hi Michalis,

it's me again, Elmar...

I just found a problem when loading a simple Wavefront .obj/.mtl file that I exported from MeshLab 2021.07 (https://github.com/cnr-isti-vclab/meshlab/releases):

#### ccube_meshlab.obj ######################################################
#
# OBJ File Generated by Meshlab
#
####
# Object ccube_meshlab.obj
#
# Vertices: 8
# Faces: 6
#
####
mtllib ./ccube_meshlab.obj.mtl

v -1.000000 -1.000000 -1.000000
v 1.000000 -1.000000 -1.000000
v -1.000000 1.000000 -1.000000
v 1.000000 1.000000 -1.000000
v -1.000000 -1.000000 1.000000
v 1.000000 -1.000000 1.000000
v -1.000000 1.000000 1.000000
v 1.000000 1.000000 1.000000
# 8 vertices, 0 vertices normals


usemtl material_0
f 2 1 3 4

usemtl material_1
f 3 1 5 7

usemtl material_2
f 5 1 2 6

usemtl material_3
f 6 8 7 5

usemtl material_4
f 7 8 4 3

usemtl material_5
f 4 8 6 2
# 6 faces, 0 coords texture

# End of File ###############################################################

#### ccube_meshlab.obj.mtl ##################################################
#
# Wavefront material file
# Converted by Meshlab Group
#

newmtl material_0
Ka 0.200000 0.200000 0.200000
Kd 1.000000 0.000000 0.000000
Ks 1.000000 1.000000 1.000000
Tr 1.000000
illum 2
Ns 0.000000

newmtl material_1
Ka 0.200000 0.200000 0.200000
Kd 0.000000 1.000000 0.000000
Ks 1.000000 1.000000 1.000000
Tr 1.000000
illum 2
Ns 0.000000

newmtl material_2
Ka 0.200000 0.200000 0.200000
Kd 0.000000 0.000000 1.000000
Ks 1.000000 1.000000 1.000000
Tr 1.000000
illum 2
Ns 0.000000

newmtl material_3
Ka 0.200000 0.200000 0.200000
Kd 1.000000 0.000000 1.000000
Ks 1.000000 1.000000 1.000000
Tr 1.000000
illum 2
Ns 0.000000

newmtl material_4
Ka 0.200000 0.200000 0.200000
Kd 0.000000 1.000000 1.000000
Ks 1.000000 1.000000 1.000000
Tr 1.000000
illum 2
Ns 0.000000

newmtl material_5
Ka 0.200000 0.200000 0.200000
Kd 1.000000 1.000000 0.000000
Ks 1.000000 1.000000 1.000000
Tr 1.000000
illum 2
Ns 0.000000

# End of File ###############################################################

View3DScene (view3dscene-4.1.0-win64-x86_64.zip | 10-Sep-2021 22:42 | 7270675) issues the following:

16 warnings:

Wavefront material "material_0" specifies specular exponent (Ns) as zero, ignoring
Wavefront material "material_1" specifies specular exponent (Ns) as zero, ignoring
Wavefront material "material_2" specifies specular exponent (Ns) as zero, ignoring
Wavefront material "material_3" specifies specular exponent (Ns) as zero, ignoring
Wavefront material "material_4" specifies specular exponent (Ns) as zero, ignoring
Wavefront material "material_5" specifies specular exponent (Ns) as zero, ignoring
X3D: Invalid number of items in a normal or texture coordinate array for shape "IndexedFaceSet": Invalid index: 6, but we have 5 items
X3D: Invalid number of items in a normal or texture coordinate array for shape "IndexedFaceSet": Invalid index: 5, but we have 5 items
X3D: Invalid number of items in a normal or texture coordinate array for shape "IndexedFaceSet": Invalid index: 5, but we have 5 items
X3D: Invalid number of items in a normal or texture coordinate array for shape "IndexedFaceSet": Invalid index: 6, but we have 5 items
X3D: Invalid number of items in a normal or texture coordinate array for shape "IndexedFaceSet": Invalid index: 7, but we have 5 items
X3D: Invalid number of items in a normal or texture coordinate array for shape "IndexedFaceSet": Invalid index: 6, but we have 5 items
X3D: Invalid number of items in a normal or texture coordinate array for shape "IndexedFaceSet": Invalid index: 5, but we have 5 items
X3D: Invalid number of items in a normal or texture coordinate array for shape "IndexedFaceSet": Invalid index: 5, but we have 5 items
X3D: Invalid number of items in a normal or texture coordinate array for shape "IndexedFaceSet": Invalid index: 6, but we have 5 items
X3D: Invalid number of items in a normal or texture coordinate array for shape "IndexedFaceSet": Invalid index: 7, but we have 5 items

Scene URL: "file:///C:/Temp/ccube_meshlab.obj".

Please help...

with best regards,

Elmar

I attach the .obj+.mtl files and the view3dscene.log: view3dscene_issue_40.zip

Multiple Problems with latest View3DScene

Hi Michalis,

it's me again, Elmar...

I just found some problems with View3DScene.exe from 12-Jun-2022 19:30: https://jenkins.castle-engine.io/public/builds/view3dscene/view3dscene-4.1.0-win64-x86_64.zip

  1. TextureProperties {} does not set the defaults (like: magnificationFilter to "FASTEST") anymore.
    See: https://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/components/texturing.html#TextureProperties
    This forces me to manually alter hundreds of files that are carefully formatted to keep a 80 characters line limit...

  2. PLUG_texture_apply is now deprecated.
    View3DScene gives the following error message:

Using PLUG_texture_apply is deprecated. Upgrade to 1. PLUG_main_texture_apply (to do something after main texture application; but remember that it happens before lighting application in case of Phong shading), 2. or PLUG_fragment_modify (to do final fragment color adjustment)

You had fixed this in 2020:

#24
michaliskambi commented on 11 Mar 2020
I pushed a simple fix to enable PLUG name texture_apply for backward compatibility.

This forces me to manually alter hundreds of files that are carefully formatted to keep a 80 characters line limit...

  1. Export to JP2 (JEPEG2000) files does not work at all.
    View3DScene gives the following error message (that cannot be send to clipboard):

Unable to save screen: Cannot save image to file format jp2 using Vampyre Imaging

Please help...

with best regards,

Elmar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.