Index  | Recent Threads  | List Attachments  | Search
 Welcome Guest  |  Register  |  Login
Login Name  Password
 

Sweet Home 3D Forum



No member browsing this thread
Thread Status: Active
Total posts in this thread: 30
Posts: 30   Pages: 3   [ 1 2 3 | Next Page ]
[ Jump to Last Post ]
Post new Thread
Author
Previous Thread This topic has been viewed 2192 times and has 29 replies Next Thread
Wendell_Burke
Member




Joined: Nov 3, 2024
Post Count: 51
Status: Offline
Reply to this Post  Reply with Quote 
Help creating new object & light source from scratch

Hello,
I was hoping I could get some help with a problem. I’m trying to build a structural brace with an illuminated panel on either or both sides as an object. The brace has a light source built into the opening in its center.

I’ve pretty much completed the brace itself, but now I need to add a light source to it. I don’t know whether you start on the lighting before you save the piece as an object, or after, and either way, I don’t understand how to create the light source.

I’ve already read several different threads on creating a light source from scratch, including the mini-guide for Sweet Home 3D users Editing SVG and other advanced furniture properties, but I require a significantly more in-depth explanation of the process, as I just don’t understand what I’ve read so far. Do I need to make the object SVG? I don’t really understand the SVG path commands at all. I’m new to Sweet Home 3D and have no real programming background.

I need to understand the whole process. Right now the space where the light should be is just an opening.

I’ll try to attach some pictures of what I’m talking about, though the last post I tried to make wouldn’t let me add them.

[Nov 5, 2024, 7:57:21 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
Wendell_Burke
Member




Joined: Nov 3, 2024
Post Count: 51
Status: Offline
Reply to this Post  Reply with Quote 
Re: Help creating new object & light source from scratch

Sorry, having trouble with the pics. Here's the brace I've made so far, and an example of what I'm trying to do.
https://www.dropbox.com/scl/fi/l32eobgswe8pjc...&st=aejfqpot&dl=0

https://www.dropbox.com/scl/fi/c00s4rq4lffv4e...&st=bnlw73ld&dl=0
[Nov 6, 2024, 3:50:41 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
Keet
Advanced Member
Member's Avatar

Netherlands
Joined: Apr 8, 2022
Post Count: 1353
Status: Offline
Reply to this Post  Reply with Quote 
Re: Help creating new object & light source from scratch

A lightsource is basically a material name of your model that you define as a lightSourceMaterialName using the Furniture Library Editor.

How to do this:
You created the shape with walls. That makes it very easy! Select rooms from the toolbar and double click in the open space between the walls. This will create a room (floor) that will become your light. Modify the room and switch of the ceiling checkbox.
Export the floor and name it something like "light.obj".
Edit the light.obj file and change the line "usemtl room_1_1" to "usemtl light". Save the obj file.
Edit the light.mtl file that was created along the light.obj file.
Change the line "newmtl room_1_1" to "newmtl light". Save the mtl file.
Import the light.obj file.
Create your brace object by finishing the brace and inserting the light object. You can still change the color of your light part. Export the brace+light.

Use the Furniture Library Editor to create a new Furniture Library. (The FLE is a separate program from Sweet Home 3D.)
Drag your brace object into the library window. A line with the object will be added to the model list.
Double click the model and you will get a modify furniture dialog. On the bottom there is a list with all kind of special properties you can only add by using the a Furniture library. Scroll down until you see the item "lightSourceMaterialName". Set the value to "light" without the quotes.
Save the library. In Sweet Home 3D import your library (menu furniture, Import furniture library). Your brace will appear in the top left catalog pane in Sweet Home 3D.
Drag it into your 2D pane and when you modify the model it will now have a Light power setting on the bottom right. You will only see light when generating a photo with one of the two highest quality settings. You will probably need a power setting <5%.

You can use a different name for 'light', just make sure you replace the same name in both the obj and mtl file and set that name for the lightSourceMaterialName in the Library Editor.
----------------------------------------
Dodecagon.nl
1000+ 3D models, manuals, and projects
[Nov 6, 2024, 4:59:27 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
Wendell_Burke
Member




Joined: Nov 3, 2024
Post Count: 51
Status: Offline
Reply to this Post  Reply with Quote 
Re: Help creating new object & light source from scratch

Hey, sorry it's been a minute. I jumped in headfirst to this program and found myself swimming in questions. Ok, so I Selected 'Create rooms' and put a floor in the opening of the brace.

Question: Does it matter if the 'floor' reaches a little inside the brace form or does it have to end precisely on the line where the 'floor' and wall meet? Is there a way to smoothly curve the floor or do I have to just keep making more points until I make the curve manually?

I started reading the process you laid out but I don't understand what you mean by, 'Modify the room and switch of the ceiling checkbox.' I right clicked, selected 'Modify Rooms', which brings up the menu. I see the sections for 'floor', 'ceiling', 'Wall sides around room', and 'wall sides baseboard', but I don't know what I'm supposed to do here?
Clarification, please?
[Nov 8, 2024, 6:03:34 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
Keet
Advanced Member
Member's Avatar

Netherlands
Joined: Apr 8, 2022
Post Count: 1353
Status: Offline
Reply to this Post  Reply with Quote 
Re: Help creating new object & light source from scratch

Since you used walls to create the form of the brace you can just select the Create room function on the toolbar and double click in the open space of the brace walls. It will create the room completely filling the space.

Modify the room: select the Select objects arrow on the toolbar and double-click the room. A room consists of two parts: the floor and the ceiling. For your purpose you only want the floor so uncheck the "Display ceiling" checkbox.
(I'm not sure what dialog you got but the Modify Rooms dialog doesn't have a section for baseboards, that's a property of walls.)

With the room now drawn you can continue with the process I described before.
----------------------------------------
Dodecagon.nl
1000+ 3D models, manuals, and projects
[Nov 8, 2024, 6:40:11 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
Wendell_Burke
Member




Joined: Nov 3, 2024
Post Count: 51
Status: Offline
Reply to this Post  Reply with Quote 
Re: Help creating new object & light source from scratch

So, I selected the floor and saved it as an object file. Then imported it into Blender, but I've never really used Blender before. I checked and made sure nothing was hidden, though since I saved the floor and not the object itself, I don't even know if anything would appear in Blender. I've been looking for where it might say, "usemtl room_1_1" but I can't find that either. I've been at it for a bit but I'm not sure what I'm still doing wrong?
[Nov 11, 2024, 5:39:43 AM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
Keet
Advanced Member
Member's Avatar

Netherlands
Joined: Apr 8, 2022
Post Count: 1353
Status: Offline
Reply to this Post  Reply with Quote 
Re: Help creating new object & light source from scratch

Don't edit in Blender. The .obj and .mtl files are plain text files you can edit with a simple plain text editor.
In the manuals section on dodecagon.nl there's a manual about changing material names that explains the process in detail.
----------------------------------------
Dodecagon.nl
1000+ 3D models, manuals, and projects
[Nov 11, 2024, 9:23:52 AM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
Wendell_Burke
Member




Joined: Nov 3, 2024
Post Count: 51
Status: Offline
Reply to this Post  Reply with Quote 
Re: Help creating new object & light source from scratch

When you say, Edit the light.obj file and change the line "usemtl room_1_1" to "usemtl light", my Light object file says…

#
# Generated by Sweet Home 3D - Mon Nov 11 11:50:56 EST 2024
# http://www.sweethome3d.com/
#
mtllib Light.mtl
g room_1_1
usemtl room_1_1
v 1312.6152 0.0 276.20166
v 1306.3107 0.0 273.36084
v 1298.4929 0.0 274.36957
v 1292.1882 0.0 280.9264
v 1290.1708 0.0 291.26602
v 1297.2319 0.0 305.13626
v 1307.8237 0.0 327.07642
v 1321.9462 0.0 366.41742
v 1329.2595 0.0 391.63602
v 1337.3295 0.0 432.2379
v 1339.5991 0.0 457.45654
v 1341.8689 0.0 468.80487
v 1347.417 0.0 478.64014
v 1354.7303 0.0 484.44043
v 1366.583 0.0 489.48413
v 1570.6014 0.0 489.73633
v 1579.6802 0.0 488.97974
v 1585.2283 0.0 485.19696
v 1589.011 0.0 479.14453
v 1589.011 0.0 473.34424
v 1586.7413 0.0 466.28302
v 0.0 0.0 0.0
vn 1.0 0.0 0.0
vn 0.0 1.0 0.0
f 1//1 1//1 21//1
f 21//2 1//2 20//2
f 20//2 1//2 19//2
f 19//2 1//2 18//2
f 18//2 1//2 17//2
f 17//2 1//2 16//2
f 16//2 1//2 15//2
f 15//2 1//2 14//2
f 14//2 1//2 13//2
f 1//2 2//2 13//2
f 3//2 4//2 2//2
f 4//2 5//2 2//2
f 5//2 6//2 2//2
f 6//2 7//2 2//2
f 7//2 8//2 2//2
f 8//2 9//2 2//2
f 2//2 9//2 13//2
f 9//2 10//2 13//2
f 13//2 10//2 12//2
f 12//2 10//2 11//2

…So is
“mtllib Light.mtl
g room_1_1
usemtl room_1_1”
…the entire line that needs to be replaced with "usemtl light", or are these considered two or three different ‘lines’?


When you say, “Edit the light.mtl file that was created along the light.obj file. Change the line "newmtl room_1_1" to "newmtl light". Save the mtl file.”, my mtl file says…

#
# Generated by Sweet Home 3D - Mon Nov 11 11:50:56 EST 2024
# http://www.sweethome3d.com/
#

newmtl room_1_1
illum 1
Ka 0.2 0.2 0.2
Kd 1.0 1.0 1.0
Ks 0.0 0.0 0.0
Ns 1.0
Ni 1
d 1.0

…So do I just replace “newmtl room_1_1” with "newmtl light", or do I need to delete
“newmtl room_1_1
illum 1”?

Also, “Create your brace object by finishing the brace and inserting the light object. You can still change the color of your light part. Export the brace+light”

When I import the brace, I can’t see anything in the file and nothing shows up when I try to select it, but when I saved the file, I could see the rotating shape of the light in the file pic. So, is there no object there to manipulate or is there?
Also, I’m still trying to get the furniture library set up.
[Nov 11, 2024, 5:21:43 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
Keet
Advanced Member
Member's Avatar

Netherlands
Joined: Apr 8, 2022
Post Count: 1353
Status: Offline
Reply to this Post  Reply with Quote 
Re: Help creating new object & light source from scratch

You should really read the manual I have on the dodecagon.nl How-To's&Manuals page: How-To Change Material Names. With that you can understand what happens when you change material names, even with multiple parts and materials.

In short;
in the obj file: change only the line usemtl room_1_1 into usemtl light
in the mtl file: change only the line newmtl room_1_1 into newmtl light

All the rest remains as is.
----------------------------------------
Dodecagon.nl
1000+ 3D models, manuals, and projects
[Nov 11, 2024, 7:17:58 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
Wendell_Burke
Member




Joined: Nov 3, 2024
Post Count: 51
Status: Offline
Reply to this Post  Reply with Quote 
Re: Help creating new object & light source from scratch

Apologies. I jumped into this program kind of quickly and have been trying to juggle a lot of different threads, articles, and web pages since. I forgot about you mentioning that article. I'll go bookmark that now and start on it. Thank you again for answering my last questions. I do appreciate it.
[Nov 11, 2024, 9:51:07 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
Posts: 30   Pages: 3   [ 1 2 3 | Next Page ]
[ Jump to Last Post ]
Show Printable Version of Thread  Post new Thread

  Get Sweet Home 3D at SourceForge.net. Fast, secure and Free Open Source software downloads  
© Copyright 2024 Space Mushrooms - All rights reserved