Giter VIP home page Giter VIP logo

Comments (5)

datan8457 avatar datan8457 commented on August 11, 2024

I've summarized the process / outputs of my use of the X3D Exporter in this post.

Disclaimer -
My x3d experience is limited to exactly the below. I made no edits to theFranke's .cs script.
I am also not a Unity/.cs expert. I have only worked in this area for a few months.


I placed the unityx3d.cs file in my Unity project's "Assets" folder as shown below:
explorerdirectoryview_s

My Unity project consists of a semi-spherical volume composed of scaled cubes.
unitysceneview1

The individual cubes are untextured and simply have a material with the shader qualities noted below:
gameobjectmaterial

Then per the readme, I selected the empty gameObject that contains all the cells and selected "Assets-> X3D -> Export X3D...":
unitysceneview2

It then runs for a few minutes and the .x3d file appears.

Opening the file in InstantReality and selecting Navigation -> Show All provides the below view:
x3doutputwhite

I then opened the .x3d file in a text editor and did a find+replace all "<appearance />" with the below:
x3dappearancechanged

There was no specific reason why I chose the RGB values, Any valid color should work.

This then produced:
x3doutputfront
x3doutputiso
x3doutputtop


In summary, works pretty well (though the output file is over 10mb in size).

I have attached an output from a much coarser run of the project that is ~500kb.

smallX3DoutputSample.txt

from unityx3d.

thefranke avatar thefranke commented on August 11, 2024

TextureCoordinate2D as

@brutzman The potential fix is missing. Which node did you mean?

from unityx3d.

thefranke avatar thefranke commented on August 11, 2024

CommonSurfaceShader - see X3D Programmable Shaders Component

@brutzman The CommonSurfaceShader is an Avalon-only component and is used because the regular Material node does not support the rich variety of parameters used commonly in renderers today. You can however switch it off if you untick Unity -> Preferences -> UnityX3D -> Use CommonSurfaceShader

from unityx3d.

thefranke avatar thefranke commented on August 11, 2024

I've pushed a round of fixes for everything except the header part "ISO//Web3D//DTD X3D 3.3//EN", which somehow I can't get to work right now with the XML C# API.

from unityx3d.

andreasplesch avatar andreasplesch commented on August 11, 2024
doctype = doc.CreateDocumentType("X3D", "ISO//Web3D//DTD X3D 3.3//EN", "http://www.web3d.org/specifications/x3d-3.3.dtd", null);

seems to work, at least here:

https://dotnetfiddle.net/d3UFIt

I can submit an (untested) PR if desired.

from unityx3d.

Related Issues (2)

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.