Sketchup2room Tutorial - lisa-lionheart/sketchup2room GitHub Wiki
Quick start
- Create a folder for your project
- Copy the sketchup2room.exe and slapi.dll file to that folder from the bin folder in the distribution.
- Make your first room in SketchuUp and save it in the folder as room1.skp
- Make a new text file and call it build.cmd
- In that file enter the following:
sketchup2room --out build --html room.html room.skp
- Run the batch file by double clicking on it.
- As your project grows and you add additional, add extra lines to build.cmd for them.
How to compose your SketchuUp file for use with sketchup2room
Whilst naively making a room in SketchuUp should more or less work, there is a way to get the best results.
Components Basics
Sketchup2room will compile any ungrouped and grouped geometry into a main.obj file. Geometry in "components" will be saved as external OBJ files and have HTML for them generated. It is very important that when you have repeated features, that you make a single component for it and then create multiple instances of that component. Its also a good idea to make large pieces of geometry that are not repeated a component to cut down on load times. To create a component select some things in sketchup make a group and then select the make component option. I highly recommend changing the name from Group#x default name.
Additionally you can create "placeholders" by putting a '!' in front of the component name. For example you could create a link without any door frame by making a component and calling it !door and setting the instance name as described below.
Please check out the examples skp files, to see how this works in practice.
Default Material
Sketchup2room will cull faces that have the Default Material, to make sure faces are exported apply a material to them
Making dynamic objects.
By setting a name on individual instances of components you can tell sketchup2room to set the location of the entrance portal and create links to new rooms.
The format is, where the pipe character "|" separates sections:
$type|option1,option2=value|Text or URL
$origin
Give an instance the name $origin to specify the location of the entrance portal. The system will use the components local x (green) axis. So make sure you create your prop with the right orientation.
$link
Simple:
$link|room3.html
Advanced:
$link|noglow,notext|room3.html
$text
Creates a text element at the given position.
Example:
$text|text_col=1 1 1|JanusVR is cool
$paragraph
Exactly like $text but create a paragraph.
$nosolid
Create an instance of a model but do not use the geometry for collision detection. This is very important for high poly models.